summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
AgeCommit message (Collapse)AuthorFilesLines
2014-03-12Merge remote-tracking branch 'asoc/topic/enum' into asoc-nextMark Brown22-352/+325
2014-03-12Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown5-33/+63
2014-03-12Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown7-9/+9
2014-03-12ASoC: tlv320aic23: Remove spurious bits per word settingMark Brown1-1/+0
regmap should handle any byte ordering issues required, it is looking for a byte stream from the bus, so don't set 16 bits per word. This is likely to have tested out OK due to use of an unmerged SPI controller driver. Signed-off-by: Mark Brown <broonie@linaro.org> Tested-by: Max Filippov <jcmvbkbc@gmail.com>
2014-03-11ASoC: io: New signature for snd_soc_codec_set_cache_io()Xiubo Li11-24/+14
Now that all users have been converted to regmap and the config.reg_bits and config.val_bits can be setted by each user through regmap core API. So these two params are redundant here. Since the only control type that left is SND_SOC_REGMAP, so remove it. Drop the control params and add struct regmap *regmap to simplify the code. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-11ASoC: codec: Simplify ASoC probe code.Xiubo Li73-562/+13
For some CODEC drivers like who act as the MFDs children are ignored by this patch. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-11Merge branches 'topic/ad193x', 'topic/tlv320aic23', 'topic/tlv320aic32x4', ↵Mark Brown14-235/+524
'topic/wm8991', 'fix/si476x' and 'fix/88pm860' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-io
2014-03-10Merge remote-tracking branches 'asoc/fix/88pm860', 'asoc/fix/omap' and ↵Mark Brown2-1/+4
'asoc/fix/si476x' into asoc-linus
2014-03-10ASoC: 88pm860: Fix IO setupLars-Peter Clausen1-0/+3
The 88pm860 is a MFD device and the CODEC driver is using the regmap struct of the parent device, hence automatic IO setup will not work and we need to manually call snd_soc_codec_set_cache_io(). The issue was introduced in commit f9ded3b2e7 ("ASoC: 88pm860x: Use regmap for I/O"). Fixes: f9ded3b2e7 ("ASoC: 88pm860x: Use regmap for I/O"). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2014-03-10ASoC: si476x: Fix IO setupLars-Peter Clausen1-1/+1
The si476x is a MFD device and the CODEC driver is using the regmap struct of the parent device, hence automatic IO setup will not work and we need to manually call snd_soc_codec_set_cache_io(). The issue was introduced commit d6173df35f ("ASoC: si476x: Remove custom register I/O implementation") Fixes: d6173df35f ("ASoC: si476x: Remove custom register I/O implementation") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2014-03-09ASoC: tlv320aic32x4: Sort Makefile in alphabetic orderJyri Sarha1-2/+2
The tlv320aic32x4 related lines were wrongly placed after tlv320aic3x lines. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Support new fratio encoding on the wm5110 rev DCharles Keepax1-29/+101
The reference clock path on newer IP FLLs requires a different configuration, and should avoid integer mode operation. This patch adds support for both the new encoding and updates the calculation. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Calculate FLL gain lastCharles Keepax1-12/+12
No part of the FLL calculation depends on the value determined for the gain but the gain does depend on other values. In preparation for future updates this patch moves the gain to be the last thing calculated. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Calculate OUTDIV firstCharles Keepax1-12/+12
OUTDIV will remain unchanged whilst the rest of the FLL configuration is calculated so do this first. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Don't pass Fout into arizona_calc_fllCharles Keepax1-8/+7
As we now calculate the FLL configuration at a later stage in the process the fout member of the FLL structure will contain the desired Fout frequency so no need to pass this in seperately. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Move calculation of FLL configurationCharles Keepax1-35/+44
Currently the FLL configuration is calculated before it is known which FLL path the configuration will be applied to. Newer versions of the IP have differences in the configuration required for each FLL path, which makes it complicated to calculate the FLL configuration in advance. This patch simply checks the validity of a requested input and output frequency before we know which FLL path they will be applied to and saves the actual calculation of the configuration until we know where the settings will be applied. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Move set of OUTDIV in to arizona_apply_fllCharles Keepax1-16/+12
Since we know in arizona_apply_fll if we are setting the sync or ref path there is no need to set the outdiv seperately anymore. This patch moves this from arizona_enable_fll to arizona_apply_fll. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Add defines for FLL configuration constantsCharles Keepax1-5/+11
Improve readability by adding defines for some of the constants associated with FLL configuration. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: An OUTDIV of 1 is not valid, avoid thisCharles Keepax1-1/+1
One is not a valid value for the OUTDIV start searching at 2 instead. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: tlv320aic23: add missing EXPORT_SYMBOLsMax Filippov1-0/+2
This fixes the following build errors when aic23 is configured as module: >> ERROR: "tlv320aic23_probe" >> [sound/soc/codecs/snd-soc-tlv320aic23-i2c.ko] undefined! >> ERROR: "tlv320aic23_regmap" >> [sound/soc/codecs/snd-soc-tlv320aic23-i2c.ko] undefined! Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: pcm512x: Fix duplicate const warningMark Brown1-4/+4
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: pcm512x: Split out bus driversMark Brown6-129/+176
Move to the new style of defining the bus interfaces in separate modules in order to simplify dependencies. Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-07ASoC: tlv320aic23: add support for SPI control modeMax Filippov6-45/+147
tlv320aic23 chip control interface may work in either I2C or SPI mode depending on the MODE pin state. Functionality and register layout are independent of the control mode. Implement bus-specific parts as separate modules. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-07ASoC: wm_adsp: Correct type specifier in printfCharles Keepax1-1/+1
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06Merge branch 'topic/pcm' of ↵Mark Brown7-9/+9
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-enum Conflicts: include/sound/soc.h
2014-03-06ASoC: Add helper function to check whether a CODEC is activeLars-Peter Clausen7-9/+9
Instead of directly checking the 'active' field of the CODEC struct add a new helper function that will return either true or false depending on whether the CODEC is active. This will make the migration to the component level easier. The patch also updates all CODEC drivers that check the active attribute to use the new helper function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06ASoC: sirf: Add SiRF internal audio codec driverRongjun Ying4-0/+614
SiRF internal audio codec is integrated in SiRF atlas6 and prima2 SoC. Features include: 1. Stereo DAC and ADC with 16-bit resolution amd 48KHz sample rate 2. Support headphone and/or speaker output 3. Integrate headphone and speaker output amp 4. Support LINE and MIC input 5. Support single ended and differential input mode Signed-off-by: Rongjun Ying <rongjun.ying@csr.com> --v5: 1. Drop all inlines. 2. Reordering the Kconfig and Makefile 3. Remove the sirf_audio_codec_reg_bits struct, use the new controls instead it. 4. Add some SND_SOC_DAPM_OUT_DRV instead of HP and SPK enable driver 5. Add audio codec clock supply instead of adc event callback 6. Fixed playback and capture can't concurrent work bug. -- .../devicetree/bindings/sound/sirf-audio-codec.txt | 17 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 1 + sound/soc/codecs/sirf-audio-codec.c | 533 ++++++++++++++++++++ sound/soc/codecs/sirf-audio-codec.h | 75 +++ 5 files changed, 631 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sirf-audio-codec.txt create mode 100644 sound/soc/codecs/sirf-audio-codec.c create mode 100644 sound/soc/codecs/sirf-audio-codec.h Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06ASoC: wm_adsp: Split firmware load into smaller chunksCharles Keepax1-17/+31
The firmware files can be quite large and allocating the whole firmware a single DMA safe buffer can be problematic if the system is under a high memory load. Ease the requirements slightly by writing the firmware out in page sized chunks. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06ASoC: cs4271: Fix build error without CONFIG_SPI_MASTERTakashi Iwai1-16/+16
cs4271_common_probe() is called from cs4271_i2c_probe() but defined in CONFIG_SPI_MASTER block, thus it results in a build error when CONFIG_SPI_MASTER=n: sound/soc/codecs/cs4271.c:721:2: error: implicit declaration of function ‘cs4271_common_probe’ [-Werror=implicit-function-declaration] Move the function out of #if block. Fixes: d6cf89ee07cb ('ASoC: cs4271: claim reset GPIO in bus probe function') Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Daniel Mack <daniel@zonque.org> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-05ASoC: ak4104: Remove superfluous codec->control_data initializationLars-Peter Clausen1-2/+0
The driver uses automatic IO setup, which will also initialize the control_data field of the CODEC, no need to do it manually. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-04ASoC: da732x: Replace hw_read usage with snd_soc_read()Mark Brown1-8/+8
Pre-merge code was using direct hw_read() calls as an out of framework way of doing volatile register I/O when not using regmap. This has never functioned correctly in mainline due to the regmap conversion, the hw_read() implementation still does caching. In order to facilitate removal of the subsystem level I/O code convert to use snd_soc_read(), there should be no functional impact. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
2014-03-04ASoC: wm{5102, 5110, 8997}: Replace codec->control_data with arizona->regmapLars-Peter Clausen3-3/+3
With the ongoing component-ization of the ASoC framework and the continuing migration to using regmap for IO the control_data field of the snd_soc_codec struct will eventually be removed. Prepare the wm5192, wm5110 and wm8997 drivers for this by using arizona->regmap instead of accessing the CODEC's control_data field. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-04ASoC: wm8753: Remove superfluous 'codec->cache_sync = 1'Lars-Peter Clausen1-1/+0
The wm8763 driver uses regmap for IO which means that codec->cache_sync is not used. The line was added in commit d3398ff ('ASoC: Convert WM8753 to direct regmap API usage'). Presumably this was meant to be regcache_mark_dirty(), but since we already call regcache_mark_dirty() in the core when suspending the CODEC it is safe to just remove the line. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-01ASoC: wm8995: Use SOC_ENUM_SINGLE_VIRT_DECL()Lars-Peter Clausen1-1/+1
For the upcoming consolidation for MUXs and virtual MUXs we need to mark virtual enums as such. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-01ASoC: wm8994: Use SOC_ENUM_SINGLE_VIRT_DECL()Lars-Peter Clausen1-2/+1
For the upcoming consolidation for MUXs and virtual MUXs we need to mark virtual enums as such. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-01ASoC: mc13783: Use SOC_ENUM_SINGLE_VIRT_DECL()Lars-Peter Clausen1-4/+2
For the upcoming consolidation for MUXs and virtual MUXs we need to mark virtual enums as such. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Philippe Rétornaz <philippe.retornaz@epfl.ch> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-01ASoC: max98090: Use SOC_ENUM_SINGLE_VIRT_DECL()Lars-Peter Clausen1-1/+1
For the upcoming consolidation for MUXs and virtual MUXs we need to mark virtual enums as such. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-01ASoC: adau1373: Use SOC_ENUM_SINGLE_VIRT_DECL()Lars-Peter Clausen1-2/+2
For the upcoming consolidation for MUXs and virtual MUXs we need to mark virtual enums as such. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-01Merge branches 'topic/dapm', 'topic/sign', 'topic/adau1373', ↵Mark Brown9-190/+242
'topic/max98090', 'topic/mc13783', 'fix/wm8994' and 'topic/wm8995' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-enum
2014-02-28ASoC: sgtl5000: Simplify ASoC probe codeXiubo Li1-8/+0
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-27Merge remote-tracking branch 'asoc/fix/wm8958' into asoc-linusMark Brown1-1/+1
2014-02-27Merge remote-tracking branches 'asoc/fix/da732x' and 'asoc/fix/sta32x' into ↵Mark Brown2-1/+13
asoc-linus
2014-02-27ASoC: sta32x: Fix wrong enum for limiter2 release rateTakashi Iwai1-1/+1
There is a typo in the Limiter2 Release Rate control, a wrong enum for Limiter1 is assigned. It must point to Limiter2. Spotted by a compile warning: In file included from sound/soc/codecs/sta32x.c:34:0: sound/soc/codecs/sta32x.c:223:29: warning: ‘sta32x_limiter2_release_rate_enum’ defined but not used [-Wunused-variable] static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_release_rate_enum, ^ include/sound/soc.h:275:18: note: in definition of macro ‘SOC_ENUM_DOUBLE_DECL’ struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \ ^ sound/soc/codecs/sta32x.c:223:8: note: in expansion of macro ‘SOC_ENUM_SINGLE_DECL’ static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_release_rate_enum, ^ Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: <stable@vger.kernel.org>
2014-02-26ASoC: da732x: Mark DC offset control registers volatileMark Brown1-0/+12
The driver reads from the DC offset control registers during callibration but since the registers are marked as volatile and there is a register cache the values will not be read from the hardware after the first reading rendering the callibration ineffective. It appears that the driver was originally written for the ASoC level register I/O code but converted to regmap prior to merge and this issue was missed during the conversion as the framework level volatile register functionality was not being used. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Cc: stable@vger.kernel.org
2014-02-25ASoC: wm8958-dsp: Fix firmware block loadingLars-Peter Clausen1-1/+1
The codec->control_data contains a pointer to the device's regmap struct. But wm8994_bulk_write() expects a pointer to the parent wm8998 device. The issue was introduced in commit d9a7666f ("ASoC: Remove ASoC-specific WM8994 I/O code"). Fixes: d9a7666f ("ASoC: Remove ASoC-specific WM8994 I/O code") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2014-02-25ASoC: wm8962: Replace codec->control_data with wm8962->regmapLars-Peter Clausen1-1/+3
With the ongoing component-ization of the ASoC framework and the continuing migration to using regmap for IO the control_data field of the snd_soc_codec struct will eventually be removed. Prepare the wm8962 driver for this by using wm8962->regmap instead of accessing the CODEC's control_data field. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25ASoC: wm8996: Replace codec->control_data with wm8996->regmapLars-Peter Clausen1-4/+4
With the ongoing component-ization of the ASoC framework and the continuing migration to using regmap for IO the control_data field of the snd_soc_codec struct will eventually be removed. Prepare the wm8996 driver for this by using wm8996->regmap instead of accessing the CODEC's control_data field. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25ASoC: wm8993: Remove unused pointer in wm8993_remove()Christian Engelmayer1-2/+0
Commit 88b5bdfd (ASoC: wm8993: drop regulator_bulk_free of devm_ allocated data) eliminated the last user of driver data pointer 'wm8993' in function wm8993_remove() - Thus remove it. Detected by Coverity: CID 1186208. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25ASoC: da732x: Use da732x->regmap instead of codec->control_dataLars-Peter Clausen1-3/+3
With the ongoing component-ization of the ASoC framework and the continuing migration to using regmap for IO the control_data field of the snd_soc_codec struct will eventually be removed. Prepare the da732x driver for this by using da732x->regmap instead of accessing the CODEC's control_data field. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-24ASoC: da732x: Remove leftover cache size settingMark Brown1-1/+0
The da732x driver no longer uses the ASoC level register cache but the cache size setting had been left in the driver by mistake. Remove it. Signed-off-by: Mark Brown <broonie@linaro.org>