summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic3x.c
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'asoc/topic/tlv320aic3x', 'asoc/topic/width', ↵Mark Brown2014-08-041-6/+7
|\ \ | | | | | | | | | 'asoc/topic/wm0010', 'asoc/topic/wm8904' and 'asoc/topic/wm8962' into asoc-next
| * | ASoC: tlv320aic3x: Convert to params_width()Mark Brown2014-08-011-6/+5
| | | | | | | | | | | | | | | | | | The CODEC doesn't care how data is laid out in memory. Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: tlv320aic3x: Add support for S24_LE formatPeter Ujfalusi2014-06-301-1/+3
| | | | | | | | | | | | | | | | | | | | | The codec need to be configured to 24bit mode in case of S24_LE format. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/oom' and ↵Mark Brown2014-08-041-6/+2
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| 'asoc/topic/pxa' into asoc-next
| | * ASoC: tlv320aic3x: Remove redundant OOM messageSachin Kamat2014-06-271-6/+2
| |/ | | | | | | | | | | | | Let memory subsystem handle the error logging. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: tlv320aic3x: Correct S24_3LE supportPeter Ujfalusi2014-06-301-1/+1
|/ | | | | | | | | | Correct the hw_params callback to configure the codec correctly in case of S24_3LE format since in case of S24_3LE the codec has been configured to 16bit format mode. S24_LE is not defined as supported format for the codec. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'asoc/fix/pxa' and 'asoc/fix/tlv320aic3x' ↵Mark Brown2014-06-031-1/+1
|\ \ | | | | | | | | | into asoc-linus
| | * ASoC: tlv320aci3x: Fix custom snd_soc_dapm_put_volsw_aic3x() functionPeter Ujfalusi2014-06-011-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | For some unknown reason the parameters for snd_soc_test_bits() were in wrong order: It was: snd_soc_test_bits(codec, val, mask, reg); /* WRONG!!! */ while it should be: snd_soc_test_bits(codec, reg, mask, val); Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* | ASoC: tlv320aic3x: fix shared reset pin for DTSebastian Reichel2014-04-151-2/+7
|/ | | | | | | | | | | | Currently the second tlv320aic3x instance fails to be probed from DT if the reset pin is shared with the first one. This patch fixes it by moving the list add of the reset pin into the i2c_probe method. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: codec: Simplify ASoC probe code.Xiubo Li2014-03-111-6/+0
| | | | | | | | 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>
* ASoC: tlv320aic3x: no mono controls 3007 modelJan Weitzel2013-12-091-43/+83
| | | | | | | | | | | | | | | if codec driver is used for AIC3X_MODEL_3007 the mono iout controls overwrite registers for class-d amplifier. classd amplifier controls are only used for AIC3X_MODEL_3007. Removing all mono snd_kcontrol_new, snd_soc_dapm_widget, snd_soc_dapm_route and aic3x_init stuff from common code and call only for not AIC3X_MODEL_3007 codecs. Testet only with AIC3X_MODEL_3007 Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/topic/tlv320aic3x' into asoc-nextMark Brown2013-10-241-121/+113
|\
| * ASoC: tlv320aic3x: Include linux/of.h headerSachin Kamat2013-10-161-0/+1
| | | | | | | | | | | | | | 'of_match_ptr' is defined in linux/of.h. Include it explicitly. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: tlv320aic3x: Convert to direct regmap API usageMark Brown2013-09-241-78/+73
| | | | | | | | | | | | | | | | | | | | | | | | This is slightly more complex than a standard regmap conversion due to the moderately detailed cache control and the open coding of a register patch for the class D speaker on the TLV320AIC3007. Although the device supports paging this is not currently implemented as the additional pages are only used during the application of the patch for the TLV320AIC3007. Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: tlv320aic3x: Don't reference cache datastructure directlyMark Brown2013-09-241-5/+6
| | | | | | | | | | | | | | Rather than referencing the cache directly read back the values we are going to restore, supporting refactoring to use regmap. Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: tlv320aic3x: Move to table based DAPM initMark Brown2013-09-241-6/+4
| | | | | | | | Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: tlv320aic3x: Move to table based control initMark Brown2013-09-241-2/+2
| | | | | | | | Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: tlv320aic3x: Move resource acquisition to I2C probeMark Brown2013-09-241-30/+33
| | | | | | | | | | | | This is more idiomatic and interacts better with deferred probing. Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: tlv320aic3x: Remove nonsense comment for register cacheMark Brown2013-09-241-6/+0
| | | | | | | | | | | | | | Every statement in this comment is incorrect either through bitrot or (mostly) through never having corresponded to reality in the first place. Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: tlv320aic3x: Connect 'Left Line1R Mux' and 'Right Line1L Mux'Peter Ujfalusi2013-10-071-0/+4
|/ | | | | | | | | | The two paths were not connected in the DAPM route causing the associated routes to be non working and the following warnings printed in the logs: tlv320aic3x-codec 0-001b: ASoC: mux Right Line1L Mux has no paths tlv320aic3x-codec 0-001b: ASoC: mux Left Line1R Mux has no paths Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/topic/tlv320aic3x' into asoc-nextMark Brown2013-08-221-0/+4
|\
| * ASoC: tlv320aic3x: List tlv320aic3106 as a supported deviceMark Brown2013-07-161-0/+2
| | | | | | | | | | | | | | Currently there is no specific handling for it but the tlv320aic3106 is supported using this driver. Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: tlv320aic3x: Add compatible strings for specific devicesMark Brown2013-07-161-0/+2
| | | | | | | | | | | | | | | | The driver supports a range of devices but currently doesn't allow those device names to be used for enumeration on DT. Add the currently listed I2C IDs as compatible strings. Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: dapm: Add a helper to get the CODEC for DAPM kcontrolLars-Peter Clausen2013-07-291-4/+3
| | | | | | | | | | | | | | | | | | | | We use the same 3 lines to get the CODEC for a kcontrol in a quite a few places. This patch puts them into a common helper function. Having this encapsulated in a helper function will also make it more easier to eventually change the data layout of the kcontrol's private data. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: tlv320aic3x: Use snd_soc_dapm_mixer_update_powerLars-Peter Clausen2013-07-241-33/+16
|/ | | | | | | | Use snd_soc_dapm_mixer_update_power() instead of reimplementing its functionality. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: tlv320aix3x: Use SOC_SINGLE_EXT() instead of open-coding itLars-Peter Clausen2013-06-191-4/+2
| | | | | Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: tlv320aic3x: Remove deadlock from snd_soc_dapm_put_volsw_aic3x()Andreas Irestål2013-06-071-5/+5
| | | | | | | | | | When calling snd_soc_dapm_sync(), it eventually tries to lock the same mutex already locked in snd_soc_dapm_put_volsw_aic3x() and a deadlock occurs. By moving the mutex unlock to just before snd_soc_dapm_sync(), this deadlock is prevented. This problem was introduced in Linux 3.5 Signed-off-by: Andreas Irestål <Andreas.Irestal@axis.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/topic/tlv320aic3x' into asoc-nextMark Brown2013-02-111-6/+77
|\
| * ASoC: tlv320aic3x: Convert mic bias to a supply widgetHebbar Gururaja2013-02-041-6/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert MicBias widgets to supply widget. On tlv320aic3x, Mic bias power on/off shares the same register bits with output mic bias voltage. So, when power on mic bias, we need reclaim it to voltage value. Provide a new platform data so that the micbias voltage can be sent according to board requirement. Now since tlv320aic3x codec driver is DT aware, update dt files and functions to handle this new "micbias-vg" platform data. Because of sharing of bits, when enabling the micbias, voltage also needs to be updated. So use SND_SOC_DAPM_POST_PMU & SND_SOC_DAPM_PRE_PMD macro to create an event to handle this. Since micbias is converted to supply widget, updated machine drivers as well. This change is runtime tested on da850-evm with audio loopback (arecord|aplay) for confirmation. Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: tlv320aic3x: Remove mono supportBenoît Thébaudeau2013-01-301-2/+2
|/ | | | | | | | | | | Playing a mono stream on the TLV320AIC3x results in too fast playback rate. Remove mono support so that mono streams can be played correctly on this codec. Tested with imx-ssi (i.MX25) and TLV320AIC3104. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tlv320aic3x: Add device tree bindingsHebbar, Gururaja2012-08-271-0/+31
| | | | | | | Device tree support for tlv320aic3x CODEC driver. Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tlv320aic3x: Use module_i2c_driverSachin Kamat2012-08-061-17/+1
| | | | | | | | module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge tag 'asoc-3.6' of ↵Takashi Iwai2012-07-191-2/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for 3.6 This has been a pretty quiet release - very little activity in framework terms, mostly just a few new drivers and updates: - Added the ability to add and remove DAPM paths dynamically, mostly for reparenting on clock changes. - New machine drivers for Marvell Brownstone, ST-Ericsson Ux500 reference platform and ttc-dkp. - New CPU drivers for Blackfin BF6xx SPORTs in I2S mode, Marvell MMP, Synopsis Designware I2S controllers, and SPEAr DMA and S/PDIF - New CODEC drivers for Dialog DA732x, ST STA529, ST-Ericsson AB8500, TI Isabelle and Wolfson Microelectronics WM5102 and WM5110
| * ASoC: tlv320aic3x: add input clock selectionJiri Prchal2012-07-101-0/+6
| | | | | | | | | | | | | | | | This patch adds input selection of main codec clock - from what pin. Both registers set same value since codec uses clock divider or pll at one time. Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: tlv320aic3x: add AGC settingsJiri Prchal2012-07-101-0/+25
| | | | | | | | | | | | | | | | This patch adds AGC target level and times settings for TLV320AIC3x. Enums uses small arrays of two channels left and right since it uses different registers. Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: tlv320aic3x: add deemphasis switchJiri Prchal2012-07-091-0/+3
| | | | | | | | | | | | | | This patch adds missing deemphasis switch. Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: tlv320aic3x: extending registers cacheJiri Prchal2012-07-041-1/+3
| | | | | | | | | | | | | | Adds missing register default values to cache. Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: tlv320aic3x: Change Class-D amplifier gain control nameJarkko Nikula2012-06-031-1/+1
| | | | | | | | | | | | | | | | | | ALSA mixers cannot classify this "Class-D Amplifier Gain" speaker output gain control as a playback control. Fix this by changing the name as "Class-D Playback Volume". Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: tlv320aic3x: Fix codec pll configure bugHebbar, Gururaja2012-06-291-3/+1
|/ | | | | | | | | | | | | | | | | | | | | | | In sound/soc/codecs/tlv320aic3x.c data = snd_soc_read(codec, AIC3X_PLL_PROGA_REG); snd_soc_write(codec, AIC3X_PLL_PROGA_REG, data | (pll_p << PLLP_SHIFT)); In the above code, pll-p value is OR'ed with previous value without clearing it. Bug is not seen if pll-p value doesn't change across Sampling frequency. However on some platforms (like AM335x EVM-SK), pll-p may have different values across different sampling frequencies. In such case, above code configures the pll with a wrong value. Because of this bug, when a audio stream is played with pll value different from previous stream, audio is heard as differently(like its stretched). Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* ASoC: tlv320aic3x: Remove unused, non-standard headset detectionMark Brown2012-05-141-18/+0
| | | | | | | aic3x_set_headset_detection() isn't made available outside the driver or referenced within the driver which sparse notices and complains about. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: codecs: Remove rtd->codec usage from CODEC driversMark Brown2012-04-041-2/+1
| | | | | | | | | | In order to support CODEC<->CODEC links remove the assumption that there is only a single CODEC on a DAI link by removing the use of the CODEC pointer in the rtd from the CODEC drivers. They are already being passed their DAI whenever they are passed an rtd and can get the CODEC from there. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tlv320aic3x: Remove even more unused codeMark Brown2012-02-071-24/+0
| | | | | | | | Now that we're not implementing GPIO or microphone detection support there's no users for the read() function any more. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
* ASoC: tlv320aic3x: remove unused codeFelipe Contreras2012-02-061-36/+0
| | | | | | | Looks like nobody is or will be using this code. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Add support for DAI and machine kcontrols.Liam Girdwood2012-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently ASoC can only add kcontrols using codec and platform component device handles. It's also desirable to add kcontrols for DAIs (i.e. McBSP) and for SoC card machine drivers too. This allows the kcontrol to have a direct handle to the parent ASoC component DAI/SoC Card/Platform/Codec device and hence easily get it's private data. This change makes snd_soc_add_controls() static and wraps it in the folowing calls (card and dai are new) :- snd_soc_add_card_controls() snd_soc_add_codec_controls() snd_soc_add_dai_controls() snd_soc_add_platform_controls() This patch also does a lot of small mechanical changes in individual codec drivers to replace snd_soc_add_controls() with snd_soc_add_codec_controls(). It also updates the McBSP DAI driver to use snd_soc_add_dai_controls(). Finally, it updates the existing machine drivers that register controls to either :- 1) Use snd_soc_add_card_controls() where no direct codec control is required. 2) Use snd_soc_add_codec_controls() where there is direct codec control. In the case of 1) above we also update the machine drivers to get the correct component data pointers from the kcontrol (rather than getting the machine pointer via the codec pointer). Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Set idle_bias_off flag in snd_soc_codec_driverAxel Lin2012-01-271-1/+1
| | | | | | | | | Since commit 33c5f969 "ASoC: Allow idle_bias_off to be specified in CODEC drivers", now we can set idle_bias_off flag in struct snd_soc_codec_driver for devices can unconditionally support idle_bias_off. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert tlv320aic3x to devm_kzalloc()Axel Lin2012-01-021-4/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Drop unused state parameter from CODEC suspend callbackLars-Peter Clausen2011-12-021-1/+1
| | | | | | | | | | The existence of this parameter is purely historical. None of the CODEC drivers uses it and we always pass in the same value anyway, so it should be safe to remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove unneeded platform_device.h inclusions from CODECsMark Brown2011-11-271-1/+0
| | | | | | They've not been needed for a long time if they were ever required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen2011-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure") introduced the possibility to have constant DAI ops structures, yet this is barley used in both existing drivers and also new drivers being submitted, although none of them modifies its DAI ops structure. The later is not surprising since existing drivers are often used as templates for new drivers. So this patch just constifies all existing snd_soc_dai_ops structs to eliminate the issue altogether. The patch was generated with the following coccinelle semantic patch: // <smpl> @@ identifier ops; @@ -struct snd_soc_dai_ops ops = +const struct snd_soc_dai_ops ops = { ... }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove conditional I2C usage from tlv320aic3x driverMark Brown2011-11-221-6/+0
| | | | | | | The driver only supports I2C so doesn't need to do things conditionally. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com>
OpenPOWER on IntegriCloud