aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker9-0/+9
Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-27Merge branch 'topic/asoc' into for-linusTakashi Iwai74-1594/+13727
2011-10-27ASoC: wm8940: Properly set codec->dapm.bias_levelAxel Lin1-0/+2
Reported-by: Chris Paulson-Ellis <chris@edesix.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2011-10-26Merge branch 'topic/remove-irqf_disable' into for-linusTakashi Iwai41-382/+2540
2011-10-22ASoC: max98095: Convert codec->hw_write to snd_soc_writeAxel Lin1-7/+6
codec->hw_write is broken now, convert codec->hw_write to snd_soc_write. The hardware has 2 banks of registers sharing a section in I2C register space. The 1st bank is the primary one and is cached. The 2nd bank is for loading coefficients only and they do not need cache. These coefficients registers are therefore direct writes. Thus we set cache_bypass flag to deal with this before calling snd_soc_write. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-22ASoC: sgtl5000: Fix wrong mask in some snd_soc_update_bits callsAxel Lin1-6/+6
Ensure all mask bits are clear before setting new value. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Dong Aisheng <b29396@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-22ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2Axel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-10-22ASoC: da7210: Add support for line out and DACAshish Chavan1-0/+96
DA7210 has three line outputs. OUT1 Left, OUT1 Right and OUT2 (mono). This patch adds support for gain controls for these three line outs. It also adds support for overall DAC gain control. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-22ASoC: da7210: Add support for DAPMAshish Chavan1-24/+121
This patch adds support for DAPM covering all inputs and outputs as well as ADC and DAC. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-21ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask valueAxel Lin1-3/+3
We have defined SGTL5000_LINREG_VDDD_MASK in sgtl5000.h, use it instead of hardcoded (0x1 << 4) - 1 for the mask. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-21ASoC: Set sgtl5000->ldo in ldo_regulator_registerAxel Lin1-0/+2
Otherwise calling ldo_regulator_remove() does not unregister regulator and free memories. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-20ASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 CaptureAxel Lin1-2/+2
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-10-20ASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 CaptureAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-10-20ASoC: rt5631: Remove unused codec field from struct rt5631_privAxel Lin1-2/+0
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-20ASoC: ak4671: Use snd_soc_update_bits for read-modify-writeAxel Lin1-12/+6
Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-20ASoC: Fix reg_word_size for ak4104Axel Lin1-1/+1
According to the register map in datasheet, the registers are 8 bit. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-20ASoC: wm9081: Fix setting soft VMID ramp enable with VMID 2*240kAxel Lin1-1/+1
According to the datasheet: BIT 2:1 VMID_SEL[1:0] VMID Divider Enable and Select 00 = VMID disabled 01 = 2x40k Omh divider 10 = 2x240k Omh divider 11 = 2x5k Omh divider To set VMID 2*240k, we should OR reg with 0x04 instead of 0x40. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-19ASoC: ak4641: Use SND_SOC_DAPM_DAC for Voice Playback stream widgetAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-19ASoC: da7210: Add support for ALC and Noise suppressionAshish Chavan1-0/+110
This patch adds controls to set following ALC parameters, - Max gain, Min gain, Noise gain, Attack rate, Release rate and delay It also adds a switch to enable/disable noise suppression. As per DA7210 data sheet, ALC and noise suppression can be enabled only if certain conditions are met. This condition checks are handled by simply using "_EXT" version of controls to capture change events. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Acked-by: Liam Girdwod <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-19ASoC: da7210: Add support for mute and zero cross controlsAshish Chavan1-0/+44
This patch adds support for below set of controls, (1) Mute controls for MIC, AUX and ADC (2) Zero cross controls for head phone, AUX, INPGA and line out (3) Head phone mode selection - class H or G It also adds digital_mute() call back. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-19ASoC: ak4641: Remove unused codec field from struct ak4641_privAxel Lin1-1/+0
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-19ASoC: ssm2602: Use snd_soc_update_bits for read-modify-writeAxel Lin1-14/+16
Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-19ASoC: WM9081 interrupt status register is volatileMark Brown1-0/+1
Not that we have interrupt handling in the driver at the minute. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-10-19ASoC: sgtl5000: Fix setting mic bias resistorAxel Lin1-6/+3
According to the datasheet: CHIP_MIC_CTRL 0x002A BITS[9:8] BIAS_RESISTOR 0x0 = Powerd off 0x1 = 2.0 kohm 0x2 = 4.0 kohm 0x3 = 8.0 kohm To set mic bias resistor, we need to update bits[9:8] of SGTL5000_CHIP_MIC_CTRL register. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-19ASoC: sgtl5000: Fix define for SGTL5000_BIAS_R_MASKAxel Lin1-1/+1
According to the datasheet: CHIP_MIC_CTRL 0x002A BITS[9:8] BIAS_RESISTOR 0x0 = Powerd off 0x1 = 2.0 kohm 0x2 = 4.0 kohm 0x3 = 8.0 kohm Thus SGTL5000_BIAS_R_MASK should be defined as 0x0300 instead of 0x0200. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-19ASoC: ad193x: Use snd_soc_update_bits for read-modify-writeAxel Lin1-16/+15
Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Barry Song <21cnbao@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-18ASoC: Convert WM9081 to table based control initMark Brown1-2/+2
At least for the core controls, the optionally selected controls are still added programatically. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-10-18ASoC: Update WM1811 DCS codes for latest evaluation resultsMark Brown1-2/+2
Evaluation of larger quantities of material has provided new DCS codes values to be applied for WM1811. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-10-17ASoC: wm8580: Use snd_soc_update_bits for read-modify-writeAxel Lin1-13/+9
Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-17ASoC: wm8900: Use snd_soc_update_bits for read-modify-writeAxel Lin1-67/+42
Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-17ASoC: wm8900: Fix the mask definesAxel Lin1-7/+7
Now we have done bitwise NOT against the mask bits for the defines of WM8900_REG_CLOCKING1_BCLK_MASK, WM8900_REG_CLOCKING1_OPCLK_MASK and WM8900_LRC_MASK. But we don't have the bitwise NOT against the mask bits for the defines of WM8900_REG_CLOCKING2_DAC_CLKDIV, WM8900_REG_CLOCKING2_ADC_CLKDIV and WM8900_REG_DACCTRL_AIF_LRCLKRATE. It is error prone to mix the inconsistent meaning for different mask defines. So lets make the defines for each mask to be corresponding to the bits defines in datasheet. Don't add extra "bitwise NOT" to the defines. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-17ASoC: wm8900: Fix wrong mask for setting DAC_CLKDIV/ADC_CLKDIV/LRCLK_MODEAxel Lin1-3/+3
After checking the datasheet, I think what we want to do here is to clear the WM8900_REG_CLOCKING2_DAC_CLKDIV/WM8900_REG_CLOCKING2_ADC_CLKDIV/ WM8900_REG_DACCTRL_AIF_LRCLKRATE bits and then OR with div value. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-17ASoC: wm8741: Use snd_soc_cache_sync to sync reg_cache with the hardwareAxel Lin1-9/+1
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-17ASoC: wm8741: Fix setting interface format for DSP modesAxel Lin1-2/+2
According to the datasheet: Format Control (05h) BITS[3:2] FMT[1:0] Audio data format selection 00 = right justified mode 01 = left justified mode 10 = I2S mode 11 = DSP mode BIT[4] LRP Polarity selec for LRCLK/DSP mode select 0 = normal LRCLK poalrity/DSP mode A 1 = inverted LRCLK poarity/DSP mode B For SND_SOC_DAIFMT_DSP_A, we should set 0x000C instead of 0x0003. For SND_SOC_DAIFMT_DSP_B, we should set 0x001C instead of 0x0013. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-10-17ASoC: da7210: Add support for High pass and Voice filters for ADC and DACAshish Chavan1-25/+32
This patch add controls for setting cut-off for high pass and voice filters of ADC and DAC. There are also switches to enable/disable these filters. Also removed hard coded, fixed values of these parameters used by previous version of driver. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-17ASoC: da7210: Add support for ADC & DAC equalizersAshish Chavan1-0/+37
This patch adds support for ADC and DAC five band equalizers available on DA7210 codec. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: twl6040: Request core to inline the DAPM sequencePeter Ujfalusi1-0/+1
We need to have as less time between McPDM shutdown, and power down of the DAC on the twl6040 codec as possible. Request core to ignore the pmdown_time for the playback stream. Backround: with the McPDM protocol we are sendning not only the pure audio stream, but OMAP McPDM also transmits additional information (for example offset cancellation). If McPDM is stopped prior to the DAC this information will be not sent to the codec, which can result noise rendered by the twl6040 codec. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: da7210: bugfix for head phone volume controlAshish Chavan1-4/+6
This patch takes care of reserved bits of headphone volume register by using correct volume range. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: ad193x: Fix define of AD193X_PLL_INPUT_MASKAxel Lin2-2/+2
Current code defines AD193X_PLL_INPUT_MASK as (~0x6) which is quite different from other MASK defines. To make it consistent with other mask defines, define AD193X_PLL_INPUT_MASK as 0x6 and change the code accordingly. I think this change improves the readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: wm8990: Use snd_soc_update_bits for read-modify-writeAxel Lin1-40/+27
Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write This patch also includes a comment fix in wm8990_set_dai_pll(), if freq_in and freq_out are 0, what we do is to clear WM8990_PLL_ENA bit. Thus the comment should be "Turn off PLL". Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: wm8990: Fix wrong bit setting for WM8990_POWER_MANAGEMENT_2Axel Lin1-1/+1
If (fakepower & ((1 << WM8990_INMIXR_PWR_BIT) | (1 << WM8990_AINRMUX_PWR_BIT))) is false, we should clear WM8990_AINR_ENA bits instead of WM8990_AINL_ENA. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: wm8400: Fix wrong bit setting for WM8400_POWER_MANAGEMENT_2Axel Lin1-1/+1
If (fakepower & ((1 << WM8400_INMIXR_PWR) | (1 << WM8400_AINRMUX_PWR))) is false, we should clear WM8400_AINR_ENA bits instead of WM8400_AINL_ENA. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: wm8991: Use snd_soc_update_bits for read-modify-writeAxel Lin1-11/+9
Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: wm8991: Fix wrong bit setting for WM8991_POWER_MANAGEMENT_2Axel Lin1-1/+1
If (fakepower & ((1 << WM8991_INMIXR_PWR_BIT)|(1 << WM8991_AINRMUX_PWR_BIT)))) is false, we should clear WM8991_AINR_ENA bits instead of WM8991_AINL_ENA. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: wm8961: Convert codec->hw_read to snd_soc_readAxel Lin1-1/+3
codec->hw_read is broken now, let's covert to snd_soc_read. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: tlv320aic3x: Convert codec->hw_read to snd_soc_readAxel Lin1-1/+4
codec->hw_read is broken now, let's covert to snd_soc_read. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: alc5623: Convert codec->hw_read to snd_soc_readAxel Lin1-1/+3
codec->hw_read is broken now, let's covert to snd_soc_read. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: tlv320aic23: convert to soc-cacheAxel Lin1-115/+52
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14ASoC: Convert DA7210 to table based DAPM initMark Brown1-3/+3
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-13ASoC: tlv320aic32x4: Use snd_soc_update_bits for read-modify-writeAxel Lin1-37/+24
Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>