Commit Graph

1944 Commits

Author SHA1 Message Date
Mark Brown 98dd932b6a ASoC: Fix sort of jz4740 in Makefile
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-02 13:31:13 +00:00
Mark Brown 8aafc43556 ASoC: Sort LM4857 with the CODECs in the Makefile
Having a separate list for amps is a little confusing now the official
driver model for them is the same as for other CODECs so let's sort them
into the CODEC list, but only do this for those that are actual CODEC
drivers so it's easier to remember which ones need updating.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-02 13:31:11 +00:00
Mark Brown 00ae3b8691 ASoC: Disable MICBIAS and SYSCLK when stopping WM8962 accessory detection
They aren't needed any more. If machines need them for other purposes then
further changes will be required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01 18:56:55 +00:00
Mark Brown a5ef988408 ASoC: WM8962 accessory detection requires MICBIAS
Force MICBIAS on as well as SYSCLK as the WM8962 accessory detection can't
function without both. No point in making machine drivers manually enable
it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01 18:56:33 +00:00
Mark Brown db0e55438c ASoC: Enable SYSCLK last when enabling WM8962 mic detection
Ensure everything is set up before we start detecting.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01 18:56:26 +00:00
Mark Brown 2a761cde31 ASoC: Start WM8962 FLL if SYSCLK is enabled
Since we have code to automatically manage the start and stop of the FLL
based on the SYSCLK widget if SYSCLK is already enabled and the FLL is
configured then we need to start it up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01 18:56:21 +00:00
Mark Brown 0b7dd6ad92 ASoC: Ensure we always delay for WM8962 FLL when starting from SYSCLK
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-01 18:52:05 +00:00
Mark Brown 2af8de8c39 ASoC: Ensure the WM8962 oscillator and PLLs start up disabled
Since there is no current software control for these they would otherwise
be left enabled, consuming power.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-01 18:51:49 +00:00
Mark Brown 4f4488abc9 ASoC: Ensure WM8962 PLL registers are reset
The WM8962 has a separate software reset for the PLL registers. Ensure that
these are reset also on startup.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-01 18:44:55 +00:00
Paul Gortmaker da155d5b40 sound: Add module.h to the previously silent sound users
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-31 19:31:21 -04:00
Mark Brown 64964e8264 ASoC: Fix return value of wm5100_gpio_direction_out()
We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:08:31 +00:00
Mark Brown 3ff51c859f ASoC: Convert wm8400 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:08:22 +00:00
Mark Brown 8a709d92c7 ASoC: Convert wm8900 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:08:14 +00:00
Mark Brown dcd658c56b ASoC: Convert wm8904 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:08:08 +00:00
Mark Brown 187774cbe3 ASoC: Convert wm8960 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:08:04 +00:00
Mark Brown 20abf08879 ASoC: Convert wm8961 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:07:58 +00:00
Mark Brown 48dd231b0b ASoC: Convert wm8974 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:53 +00:00
Mark Brown 605b151ae3 ASoC: Convert wm8983 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:40 +00:00
Mark Brown 812f8a3524 ASoC: Convert wm8985 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:35 +00:00
Mark Brown be48f20d8f ASoC: Convert wm8988 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:30 +00:00
Mark Brown e1fc3f21c2 ASoC: Convert wm8990 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:25 +00:00
Mark Brown b6406a8027 ASoC: Convert wm8991 MICBIAS to a supply widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:18 +00:00
Mark Brown 9ce316236b ASoC: Convert wm8995 MICBIASes to supply widgets
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31 19:06:10 +00:00
Hong Xu 5a7c5f26df ASoC: WM8904: Set `invert' bit for Capture Switch
Set `invert' bit for Capture Switch. Otherwise analogue is muted when
Capture Switch is ON.

Signed-off-by: Hong Xu <hong.xu@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-31 12:50:03 +00:00
Axel Lin d558cfc300 ASoC: Leave input audio data bit length settings untouched in wm8711_set_dai_fmt
Current implementation in wm8711_set_dai_fmt always clear BIT[3:2]
(the Input Audio Data Bit Length Select) of WM8711_IFACE(07h) register.
Input Audio Data Bit Length Select bits are set by wm8711_hw_params,
we should leave BIT[3:2] untouched in wm8711_set_dai_fmt.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-31 12:38:28 +00:00
Axel Lin 04c57163c8 ASoC: wm8711: Fix wrong mask for setting input audio data bit length select
The Input Audio Data Bit Length Select is controlled by BIT[3:2] of
WM8711_IFACE(07h) register.
Current code incorrectly masks BIT[1:0] which is for Audio Data Format Select.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-31 12:38:18 +00:00
Axel Lin 68e4798143 ASoC: tlv320aic3x: Clear BIT_CLK_MASTER and WORD_CLK_MASTER bits for for slave mode
According to the datasheet:

Page0 / Register8: Audio Serial Data interface Control Register A
BIT 7: Bit Clock Directional Control
        0: Bit clock is an input (slave mode)
        1: Bit clock is an output (master mode)

BIT 6: Word Clock Directional Control
        0: Word clock is an input (slave mode)
        1: Word clock is an output (master mode)

Current code sets BIT_CLK_MASTER and WORD_CLK_MASTER bits for master mode,
but does not clear these bits for slave mode.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-27 12:00:15 +02:00
Axel Lin b01a3d69f8 ASoC: tlv320aic23: Clear TLV320AIC23_MS_MASTER bit for slave mode
According to the datasheet:

Digital Audio Interface Format (07h) register:
BIT6:	Master/slave mode
	0: Slave
	1: Master

Current code sets TLV320AIC23_MS_MASTER bit for master mode,
but does not clear it for slave mode.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-27 12:00:14 +02:00
Axel Lin b272cc769a ASoC: wm8940: Fix mask for setting BCLKDIV
According to the datasheet:
BCLK is controlled by BIT[4:2] of WM8940_CLOCK(06h) register.

Signed-off-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>
2011-10-27 11:59:26 +02:00
Axel Lin 9c173d15f9 ASoC: tlv320aic3x: Use snd_soc_update_bits for read-modify-write
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-27 11:58:28 +02:00
Takashi Iwai bb14eb0da7 Merge branch 'topic/asoc' into for-linus 2011-10-27 10:43:40 +02:00
Axel Lin 5927f94700 ASoC: wm8940: Properly set codec->dapm.bias_level
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-27 09:17:08 +02:00
Takashi Iwai 9430148d80 Merge branch 'topic/remove-irqf_disable' into for-linus 2011-10-26 23:51:48 +02:00
Axel Lin bdb527e9ae ASoC: wm8940: Fix a typo for the mask of setting WM8940_BCLKDIV
The registers are 16 bits, thus remove an extra F for the mask.

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-24 14:09:50 +02:00
Axel Lin 49fa4d9b5a ASoC: wm8940: Fix setting PLL Output clock division ratio
According to the datasheet:
The PLL Output clock division ratio is controlled by BIT[5:4] of
WM8940_GPIO register(08h).
Current code read/write the WM8940_ADDCNTRL(07h) register which is wrong.

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-24 14:09:42 +02:00
Axel Lin 753ddf5215 ASoC: wm8996: Avoid a redundant i2c_get_clientdata call in wm8996_i2c_remove
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-24 14:09:33 +02:00
Axel Lin 1d533de998 ASoC: wm8400: Fix setting Fout clock divider for FLL Control 4
What we want here is to clear the WM8400_FLL_OUTDIV_MASK bits then
OR with factors.outdiv.

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-24 14:09:26 +02:00
Axel Lin 0d8d293898 ASoC: max98095: Convert codec->hw_write to snd_soc_write
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-22 11:09:54 +01:00
Axel Lin 33cb92cff9 ASoC: sgtl5000: Fix wrong mask in some snd_soc_update_bits calls
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-22 10:35:20 +01:00
Axel Lin 3205e6629b ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_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-22 10:34:59 +01:00
Ashish Chavan 52082d8f56 ASoC: da7210: Add support for line out and DAC
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-22 10:34:50 +01:00
Ashish Chavan 6950c60dc1 ASoC: da7210: Add support for DAPM
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-22 10:34:22 +01:00
Axel Lin 064a4bcee4 ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
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-21 09:56:06 +01:00
Axel Lin 5b13de7aa7 ASoC: Set sgtl5000->ldo in ldo_regulator_register
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-21 09:55:43 +01:00
Axel Lin ff39dbe935 ASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 Capture
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-20 15:03:23 +01:00
Axel Lin 35024f4922 ASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 Capture
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-20 15:03:05 +01:00
Axel Lin 6765ff778e ASoC: rt5631: Remove unused codec field from struct rt5631_priv
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-20 15:02:34 +01:00
Axel Lin f96c255df7 ASoC: ak4671: Use snd_soc_update_bits for read-modify-write
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-20 15:02:26 +01:00
Axel Lin cf0feafbc3 ASoC: Fix reg_word_size for ak4104
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-20 15:02:09 +01:00
Axel Lin 9f9619a078 ASoC: wm9081: Fix setting soft VMID ramp enable with VMID 2*240k
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-20 14:48:22 +01:00
Axel Lin 24441e17fe ASoC: ak4641: Use SND_SOC_DAPM_DAC for Voice Playback stream widget
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-19 18:01:43 +01:00
Ashish Chavan de5eaf844e ASoC: da7210: Add support for ALC and Noise suppression
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-19 17:59:08 +01:00
Ashish Chavan 5eda19497b ASoC: da7210: Add support for mute and zero cross controls
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-19 17:58:58 +01:00
Axel Lin 812b404c90 ASoC: ak4641: Remove unused codec field from struct ak4641_priv
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-19 17:58:49 +01:00
Axel Lin 2ee9c183f3 ASoC: ssm2602: Use snd_soc_update_bits for read-modify-write
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-19 15:22:01 +01:00
Mark Brown f8faadb6f2 ASoC: WM9081 interrupt status register is volatile
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-19 13:10:01 +01:00
Axel Lin dc56c5a862 ASoC: sgtl5000: Fix setting mic bias resistor
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-19 13:08:39 +01:00
Axel Lin 56c09aa520 ASoC: sgtl5000: Fix define for SGTL5000_BIAS_R_MASK
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-19 13:08:18 +01:00
Axel Lin 54c96cfd1a ASoC: ad193x: Use snd_soc_update_bits for read-modify-write
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-19 12:07:43 +01:00
Mark Brown 680fa1f807 ASoC: Convert WM9081 to table based control init
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-18 11:16:15 +01:00
Mark Brown 6473a14805 ASoC: Update WM1811 DCS codes for latest evaluation results
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-18 11:15:36 +01:00
Axel Lin a6785d7df8 ASoC: wm8580: Use snd_soc_update_bits for read-modify-write
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-17 22:49:28 +01:00
Axel Lin 29c6a01df8 ASoC: wm8900: Use snd_soc_update_bits for read-modify-write
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-17 22:49:28 +01:00
Axel Lin de5035b1dd ASoC: wm8900: Fix the mask defines
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-17 22:49:28 +01:00
Axel Lin 151b75995a ASoC: wm8900: Fix wrong mask for setting DAC_CLKDIV/ADC_CLKDIV/LRCLK_MODE
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-17 22:49:28 +01:00
Axel Lin df3431b74e ASoC: wm8741: Use snd_soc_cache_sync to sync reg_cache with the hardware
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-17 22:47:01 +01:00
Axel Lin 3a340104fa ASoC: wm8741: Fix setting interface format for DSP modes
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-17 22:46:41 +01:00
Ashish Chavan 4ced2b96f3 ASoC: da7210: Add support for High pass and Voice filters for ADC and DAC
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-17 22:43:33 +01:00
Ashish Chavan 0ee6e9e721 ASoC: da7210: Add support for ADC & DAC equalizers
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-17 22:43:32 +01:00
Peter Ujfalusi 35dec69757 ASoC: twl6040: Request core to inline the DAPM sequence
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-14 20:42:21 +01:00
Ashish Chavan 7a0e67b687 ASoC: da7210: bugfix for head phone volume control
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-14 20:29:31 +01:00
Axel Lin f3aa7219b1 ASoC: ad193x: Fix define of AD193X_PLL_INPUT_MASK
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-14 20:29:05 +01:00
Axel Lin 79d0726513 ASoC: wm8990: Use snd_soc_update_bits for read-modify-write
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-14 20:29:05 +01:00
Axel Lin 790f932500 ASoC: wm8990: Fix wrong bit setting for WM8990_POWER_MANAGEMENT_2
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-14 20:29:05 +01:00
Axel Lin 1a8e8d2234 ASoC: wm8400: Fix wrong bit setting for WM8400_POWER_MANAGEMENT_2
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-14 20:29:05 +01:00
Axel Lin c639adc68f ASoC: wm8991: Use snd_soc_update_bits for read-modify-write
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-14 20:29:05 +01:00
Axel Lin 3f387a2170 ASoC: wm8991: Fix wrong bit setting for WM8991_POWER_MANAGEMENT_2
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-14 20:29:04 +01:00
Axel Lin 370f464533 ASoC: wm8961: Convert codec->hw_read to snd_soc_read
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-14 20:29:04 +01:00
Axel Lin 38c436aa9f ASoC: tlv320aic3x: Convert codec->hw_read to snd_soc_read
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-14 20:29:04 +01:00
Axel Lin 524205ce71 ASoC: alc5623: Convert codec->hw_read to snd_soc_read
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-14 20:29:04 +01:00
Axel Lin f9dfbf91cb ASoC: tlv320aic23: convert to soc-cache
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14 20:29:04 +01:00
Mark Brown a6f096f3b6 ASoC: Convert DA7210 to table based DAPM init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-14 20:18:49 +01:00
Axel Lin bc6ae96a44 ASoC: tlv320aic32x4: Use snd_soc_update_bits for read-modify-write
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-13 17:38:36 +01:00
Peter Ujfalusi 694b00010b ASoC: twl6040: Rename the Earphone Driver event handler
Since the event handler is only used by the Earphone Driver, it is better
to rename it from twl6040_power_mode_event to twl6040_ep_drv_event.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-13 17:19:40 +01:00
Peter Ujfalusi aa1a41082f ASoC: twl6040: Change event ordering for Earphone driver
It is better to switch HS Power Mode (if it was in low power mode) before
we enable the Earpiece driver. The switched off EP driver can filter out
noise coming from the Low Power to High Performance transition on the
HSL DAC.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-13 17:19:40 +01:00
Peter Ujfalusi fac2f3e4dc ASoC: twl6040: Remove PLL usage restrictions
There is no limitation dictated by outputs or inputs regarding to the
selected PLL (LP/HP).
Remove the checks for this, and allow all path with any PLL configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-13 17:19:39 +01:00
Peter Ujfalusi f872826e94 ASoC: twl6040: Remove Capture restriction for 17.64MHz sysclk
Capture is supported in all PLL configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-13 17:19:39 +01:00
Mark Brown 1cba77c163 ASoC: Update WM5100 accessory detection for revision A
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-13 12:20:24 +01:00
Axel Lin 7c04241acb ASoC: ak4535: fixup cache register table
ak4535_reg should be 8bit, but cache table is defined as 16bit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-13 11:59:20 +01:00
Kuninori Morimoto 19b115e523 ASoC: ak4642: fixup cache register table
ak4642 register was 8bit, but cache table was defined as 16bit.
ak4642 doesn't work correctry without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-13 11:58:10 +01:00
Axel Lin edf413f689 ASoC: sta32x: Write the register default value to cache for reserved registers
Chip documentation explicitly requires that the reset values
of reserved register bits are left untouched.

codec->hw_read is broken now.
Here we use below trick to avoid writing to reserved registers while resume.
Write the register default value to cache for reserved registers,
so the write to the these registers are suppressed by the cache
restore code when it skips writes of default registers.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-13 11:50:05 +01:00
Axel Lin f0bbc2b55f ASoC: sta32x: Set reg_cache_default to sta32x_regs
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-13 11:50:05 +01:00
Ashish Chavan 0f8ea586d7 ASoC: da7210: Add support for other DAI word lengths, format and mode
This patchs adds support for following,
(1) DAI 20 and 32 bit word sizes
(2) DAI left and right justified formats
(3) DAI slave mode

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-12 15:57:06 +01:00
Peter Ujfalusi 33b6816ca3 ASoC: twl6040: Workaround for headset DC offset caused pop noise
Both Headset DAC need to be turned on/off at the same time before
any of the output drivers are enabled (HS Left/Right, Earpiece).
Move the HS DAC enable code to sequenced DAPM_SUPPLY, and attach
it to the DACs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-12 13:11:54 +01:00
Peter Ujfalusi 67c341302f ASoC: twl6040: Support for vibra output paths
twl6040 have two vibra output drivers.
They can be operated with audio stream coming through
the PDM interface (fifth channel).
The vibra outputs can be controlled via the input/FF
driver as well.
Selection between the two mode is implemented within
the codec driver, the input/FF driver can only operate if
the routing is set to "Input FF".
Changing from "Input FF" to "Audio PDM" mode is protected
as well: The switchin can only be done, if there is no
running effect from the input/FF.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-12 11:48:52 +01:00
Axel Lin 40a4971010 ASoC: da7210: convert to soc-cache
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-12 11:25:59 +01:00
Axel Lin 48df93d4c7 ASoC: Remove impossible case from wm8994_hw_params
We set hw_params callback for wm8994_aif3_dai_ops to wm8994_aif3_hw_params.
Thus no need to check wm8994-aif3 in wm8994_hw_params.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-12 11:25:58 +01:00
Axel Lin 75b9a5782e ASoC: Delete ads117x.h
This is not required after multi-component patch.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-12 11:25:58 +01:00
Axel Lin b91470bb37 ASoC: ak4642: convert to soc-cache
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-12 11:21:12 +01:00
Mark Brown ba896ede9a ASoC: Implement WM5100 accessory detection support
The WM5100 includes an advanced, low power, accessory detect subsystem
capable of detecting both accessory presence and button presses while
the device is in an ultra low power mode. Implement initial support for
this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-11 18:59:01 +01:00
Mark Brown 3a53d82729 ASoC: Add missing default for WM5100 Clocking 1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-11 18:25:11 +01:00
Wolfram Sang 684a65d4fb ASoC: Fix typo in Kconfig symbol for tlv320aic32x4
It is currently named "TVL" instead of "TLV".

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Javier Martin <javier.martin@vista-silicon.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-11 14:32:22 +01:00
Peter Ujfalusi 8066eb55b5 ASoC: tlv320dac33: Convert to table based init
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-11 14:32:22 +01:00
Peter Ujfalusi f7c93f018d ASoC: twl4030: Convert to table based init
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-11 14:32:22 +01:00
Peter Ujfalusi a175fce01b ASoC: twl6040: Convert to table based init
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-11 14:32:22 +01:00
Axel Lin 6f25e4eed9 ASoC: Writing register default value for the reset register
The WM8983 can be reset by performing a write of any value to
the software reset register.
To avoid writing to the software reset register while resume,
we should write the same value in wm8983_reg_defs to software
reset register in wm8983_probe().
The write to the reset register is suppressed by the cache
restore code when it skips writes of default registers.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-11 14:32:22 +01:00
Axel Lin 3b18450371 ASoC: ak4535: convert to soc-cache
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:29:59 +01:00
Axel Lin fa5fdb473e ASoC: wm8988: Convert to snd_soc_cache_sync
Convert to snd_soc_cache_sync for sync reg_cache with the hardware.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:29:59 +01:00
Axel Lin 0bad3d8453 ASoC: wm8974: Convert to snd_soc_cache_sync
Convert to snd_soc_cache_sync for sync reg_cache with the hardware.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:29:59 +01:00
Axel Lin e46199ece4 ASoC: wm8971: Convert to snd_soc_cache_sync
Convert to snd_soc_cache_sync for sync reg_cache with the hardware.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:29:58 +01:00
Axel Lin bc45df2dd9 ASoC: wm8960: Convert to snd_soc_cache_sync
Convert to snd_soc_cache_sync for sync reg_cache with the hardware.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:29:58 +01:00
Axel Lin 788b6e8efa ASoC: wm8940: Convert to snd_soc_cache_sync
Convert to snd_soc_cache_sync for sync reg_cache with the hardware.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:29:58 +01:00
Axel Lin abe11d0aac ASoC: wm8776: Convert to snd_soc_cache_sync
Convert to snd_soc_cache_sync for sync reg_cache with the hardware.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:29:58 +01:00
Axel Lin 4d4adfc979 ASoC: wm8750: Convert to snd_soc_cache_sync
Convert to snd_soc_cache_sync for sync reg_cache with the hardware.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:29:57 +01:00
Axel Lin 9bf311fe17 ASoC: wm8731: Convert to snd_soc_cache_sync
Convert to snd_soc_cache_sync for sync reg_cache with the hardware.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:29:57 +01:00
Axel Lin 960622da0d ASoC: wm8711: Convert to snd_soc_cache_sync
Convert to snd_soc_cache_sync for sync reg_cache with the hardware.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:29:57 +01:00
Axel Lin 94f17e9cfa ASoC: wm8510: Convert to snd_soc_cache_sync
Convert to snd_soc_cache_sync for sync reg_cache with the hardware.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:29:56 +01:00
Mark Brown 25c77c5fae ASoC: Fix DAPM sync for TLV320AIC3x custom DAPM widget
We really should be doing this in the core, not in a driver...

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
2011-10-10 10:28:26 +01:00
Mark Brown 4f6d45f121 Merge branch 'for-3.1' into for-3.2 2011-10-06 20:03:18 +01:00
Axel Lin ac60155f7a ASoC: Return early with -EINVAL if invalid dai format is detected
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-06 20:02:56 +01:00
Axel Lin 3c08600144 ASoC: wm8990: Remove incorrect comments
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-06 20:02:56 +01:00
Axel Lin 416a0ce5f2 ASoC: wm8990: Convert to snd_soc_cache_sync for sync reg_cache with the hardware
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-06 20:02:55 +01:00
Wolfram Sang 23524eb16a ASoC: tlv320aic32x4 fix initialization of micpga routing
Checking the pdata-flags used 'or', so the check is always true. Use 'and' to
correctly mask the flags.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Javier Martin <javier.martin@vista-silicon.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-06 20:00:11 +01:00
Peter Ujfalusi c4671a9585 ASoC: Replace remaining use of *_volsw_2r with *_volsw
The snd_soc_*_volsw_2r functionality has been merged to
*volsw callbacks.
Few places still used the get, or put variant of volsw_2r,
replace those with the corresponding *_volsw.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-06 11:16:08 +01:00
Mark Brown 9a185b9aba ASoC: Remove references to linux@wolfsonmicro.com
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-06 11:10:01 +01:00
Axel Lin 698570062d ASoC: Remove unused variable 'wm9090' in wm9090_probe
Eliminate below build warning:
  CC      sound/soc/codecs/wm9090.o
sound/soc/codecs/wm9090.c: In function 'wm9090_probe':
sound/soc/codecs/wm9090.c:550: warning: unused variable 'wm9090'

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-05 17:16:58 +01:00
Peter Ujfalusi a0acf47f1b ASoC: twl6040: Warn user in twl6040_put_volsw for error case
Let the user know, that the callback has been called with unexpected
register parameter.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-05 17:10:10 +01:00
Peter Ujfalusi db382da5ff ASoC: twl6040: Simply call snd_soc_put_volsw form the custom code
The ASoC core now have one callback function, which can handle
single, and double register mixer controls.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-05 17:10:10 +01:00
Peter Ujfalusi 08a1ed76f5 ASoC: twl6040: Prepare for core put_volsw/volsw_2r merger
Avoid using the mc->rreg to identify the 2r type of gain control.
Introduce a variable to track this.
This change is needed to avoid breakage with the upcoming volsw volsw_2r
merger.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-05 17:10:09 +01:00
Peter Ujfalusi e49b68339e ASoC: twl6040: Simplify custom get_volsw callback
The custom get_volsw does not need to call any core get_volsw calls,
since we are returning the shadow values for the gains.
Return -EINVAL in the unlikely event, if the function has been called
for unhandled control. This way we can remove one check in the code.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-05 17:10:09 +01:00
Peter Ujfalusi 0f9887d11e ASoC: Consolidate use of controls with custom get/put function
Use the macros for controls require custom get/put function.
This is to make sure that the soc_mixer_control is used
consistently among the drivers.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Arun KS <arunks@mistralsolutions.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-05 17:10:08 +01:00
Mark Brown 38f3f31a0a ASoC: Remove direct register cache accesses from WM8962 driver
Also fix return values for speaker switch updates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-04 16:50:09 +01:00
Peter Ujfalusi bfd3d4e9fb ASoC: twl6040: Simplify custom put_volsw callback
Return -EINVAL in the unlikely event, if the function has been called
for unhandled control. This way we can remove one check in the code.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-04 16:28:29 +01:00
Axel Lin 672f4c4d75 ASoC: Remove unneeded hw_write initialisation in wm8523
It is not required after commit 8d50e447
"ASoC: Factor out I/O for Wolfson 8 bit data 16 bit register CODECs"

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-04 16:06:23 +01:00
Axel Lin 499cb184e2 ASoC: Remove unneeded hw_write initialisation in ak4671
It is not required now.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-04 16:06:23 +01:00
Axel Lin d434bc32d0 ASoC: wm8711: Use snd_soc_update_bits for read-modify-write
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-04 16:05:13 +01:00
Axel Lin 696f9175fc ASoC: wm8988: Use snd_soc_update_bits for read-modify-write
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-04 16:05:12 +01:00
Axel Lin f5b00d024f ASoC: wm8750: Use snd_soc_update_bits for read-modify-write
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-04 16:05:11 +01:00
Axel Lin 1a3bbb40da ASoC: Avoid writing to WM8971_RESET in wm8971_resume
Writing to WM8971_RESET resets all registers to the default state.
Thus we should avoid writing to WM8971_RESET on resume.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-04 16:04:30 +01:00
Mark Brown 5d224e8f18 Merge branch 'for-3.1' into for-3.2 2011-10-04 15:44:43 +01:00
Axel Lin c527e6aadc ASoC: wm8994: Fix setting rate_reg for wm8994-aif2
For wm8994-aif2, the rate_reg should be WM8994_AIF2_RATE.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-10-04 15:43:29 +01:00
Axel Lin 734787550a ASoC: wm8995: Slightly optimize configure_clock
snd_soc_update_bits() will only write new register value
if the old value is different from the new value.
In additional, snd_soc_update_bits() returns 0 for no change.
No need to read WM8995_CLOCKING_1 register before calling snd_soc_update_bits().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-04 13:09:55 +01:00
Axel Lin 04f45c493a ASoC: wm8994: Slightly optimize configure_clock
snd_soc_update_bits() will only write new register value
if the old value is different from the new value.
In additional, snd_soc_update_bits() returns 0 for no change.
No need to read WM8994_CLOCKING_1 register before calling snd_soc_update_bits().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-04 13:09:55 +01:00
Axel Lin 9cd113261b ASoC: wm8988: Use snd_soc_update_bits for read-modify-write
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-04 12:03:49 +01:00
Axel Lin c6d43417dd ASoC: wm8971: Use snd_soc_update_bits for read-modify-write
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-04 12:03:49 +01:00
Axel Lin 11b9ce622a ASoC: wm8711: Use snd_soc_update_bits for read-modify-write
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-04 12:03:48 +01:00
Ryan Mallon c855a1a7ff ASoC: max98095 codec: Catch driver bugs for biquad channel name
Move the biquad channel names to a separate array and iterate over it in
max98095_get_bq_channel rather than duplicating the hardcoded channel
names. Add an error message if an invalid channel is passed and check
the error in the callers.

Also added a BUILD_BUG_ON to ensure that the bq_mode_name and controls
arrays are the same size.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-04 12:03:47 +01:00
Ryan Mallon 8754f2263f ASoC: max98088 codec: Catch driver bugs for eq channel name
Move the EQ channel names to a separate array and iterate over it in
max98088_get_channel rather than duplicating the hardcoded channel
names. Add an error message if an invalid channel is passed and check
the error in the callers.

Also added a BUILD_BUG_ON to ensure that the eq_mode_name and controls
arrays are the same size.

Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-04 12:03:35 +01:00
Mark Brown 81204c84ca ASoC: Add WM1811 support
The WM1811 is mostly register compatible with the WM8994 and WM8958,
providing a high performance audio hub CODEC in a small form factor
suitable for ultra compact system designs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-04 11:59:46 +01:00
Mark Brown 11c2b5f2dc ASoC: Fix typo in 24.576MHz rate in WM5100
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-03 21:34:57 +01:00