GitHub/MotorolaMobilityLLC/kernel-slsi.git
13 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Tue, 8 Nov 2011 01:17:30 +0000 (01:17 +0000)]
Merge branch 'for-3.2' into for-3.3

Conflicts:
sound/soc/codecs/wm8940.c

13 years agoASoC: Ensure we get an impedence reported for WM8958 jack detect
Mark Brown [Fri, 19 Aug 2011 09:05:05 +0000 (18:05 +0900)]
ASoC: Ensure we get an impedence reported for WM8958 jack detect

Occasionally we may see an accessory reported before we have a stable
impedance for the accessory. If this happens then reread the status in
order to ensure that the handler can take the appropriate action for the
status change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Don't use wm8994->control_data when requesting IRQs
Mark Brown [Fri, 4 Nov 2011 15:53:48 +0000 (15:53 +0000)]
ASoC: Don't use wm8994->control_data when requesting IRQs

The field is no longer initialised so this will crash if running on
wm8958.

Reported-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Don't use wm8994->control_data in wm8994_readable_register()
Mark Brown [Fri, 4 Nov 2011 15:52:31 +0000 (15:52 +0000)]
ASoC: Don't use wm8994->control_data in wm8994_readable_register()

The field is no longer initialised so this will crash if running on
wm8958.

Reported-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: Disable thermal shutdown when not using speakers in wm_hubs
Mark Brown [Fri, 4 Nov 2011 17:11:54 +0000 (17:11 +0000)]
ASoC: Disable thermal shutdown when not using speakers in wm_hubs

The thermal shutdown support in wm_hubs devices is tied to the speaker
drivers (which are the only high power subsystems within the device).
Ensure minimal current usage when the thermal shutdown support is not
required by disabling the circuit when the speaker drivers are powered
down.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Manage thermal shutdown for WM8962
Mark Brown [Fri, 4 Nov 2011 17:48:28 +0000 (17:48 +0000)]
ASoC: Manage thermal shutdown for WM8962

Disable the thermal shutdown circuits for headphone and speaker when the
relevant outputs are not enabled in order to save current in idle modes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Only enable thermal shutdown when required on WM9081
Mark Brown [Fri, 4 Nov 2011 22:13:36 +0000 (22:13 +0000)]
ASoC: Only enable thermal shutdown when required on WM9081

The WM9081 thermal shutdown is only effective when the speaker output is
enabled so disable it when that is not in use for a small current saving.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove needless unlikely()
Mark Brown [Thu, 27 Oct 2011 10:11:26 +0000 (12:11 +0200)]
ASoC: Remove needless unlikely()

There's no point in adding unlikely() annotations outside of hot paths
and on systems using these features the annotation will always be wrong
(as opposed to being something that only comes up once in a while) so
the annotation may even be harmful.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Update git repository URL
Mark Brown [Wed, 2 Nov 2011 21:36:32 +0000 (21:36 +0000)]
ASoC: Update git repository URL

Remove the -2.6 from the name.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix sort of jz4740 in Makefile
Mark Brown [Wed, 2 Nov 2011 13:28:23 +0000 (13:28 +0000)]
ASoC: Fix sort of jz4740 in Makefile

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Sort LM4857 with the CODECs in the Makefile
Mark Brown [Wed, 2 Nov 2011 13:05:17 +0000 (13:05 +0000)]
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>
13 years agoASoC: Disable MICBIAS and SYSCLK when stopping WM8962 accessory detection
Mark Brown [Tue, 1 Nov 2011 16:02:01 +0000 (16:02 +0000)]
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>
13 years agoASoC: WM8962 accessory detection requires MICBIAS
Mark Brown [Tue, 1 Nov 2011 16:00:15 +0000 (16:00 +0000)]
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>
13 years agoASoC: Enable SYSCLK last when enabling WM8962 mic detection
Mark Brown [Tue, 1 Nov 2011 15:59:03 +0000 (15:59 +0000)]
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>
13 years agoASoC: Start WM8962 FLL if SYSCLK is enabled
Mark Brown [Tue, 1 Nov 2011 15:19:23 +0000 (15:19 +0000)]
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>
13 years agoASoC: Ensure we always delay for WM8962 FLL when starting from SYSCLK
Mark Brown [Tue, 1 Nov 2011 13:53:54 +0000 (13:53 +0000)]
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
13 years agoASoC: Ensure the WM8962 oscillator and PLLs start up disabled
Mark Brown [Tue, 1 Nov 2011 13:53:37 +0000 (13:53 +0000)]
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
13 years agoASoC: Ensure WM8962 PLL registers are reset
Mark Brown [Tue, 1 Nov 2011 13:36:10 +0000 (13:36 +0000)]
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
13 years agoASoC: Fix return value of wm5100_gpio_direction_out()
Mark Brown [Mon, 31 Oct 2011 19:02:13 +0000 (19:02 +0000)]
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>
13 years agoASoC: Convert wm8400 MICBIAS to a supply widget
Mark Brown [Thu, 27 Oct 2011 07:44:59 +0000 (09:44 +0200)]
ASoC: Convert wm8400 MICBIAS to a supply widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm8900 MICBIAS to a supply widget
Mark Brown [Thu, 27 Oct 2011 07:45:42 +0000 (09:45 +0200)]
ASoC: Convert wm8900 MICBIAS to a supply widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm8904 MICBIAS to a supply widget
Mark Brown [Thu, 27 Oct 2011 07:46:01 +0000 (09:46 +0200)]
ASoC: Convert wm8904 MICBIAS to a supply widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm8960 MICBIAS to a supply widget
Mark Brown [Thu, 27 Oct 2011 07:46:17 +0000 (09:46 +0200)]
ASoC: Convert wm8960 MICBIAS to a supply widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm8961 MICBIAS to a supply widget
Mark Brown [Thu, 27 Oct 2011 07:46:32 +0000 (09:46 +0200)]
ASoC: Convert wm8961 MICBIAS to a supply widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm8974 MICBIAS to a supply widget
Mark Brown [Thu, 27 Oct 2011 07:47:09 +0000 (09:47 +0200)]
ASoC: Convert wm8974 MICBIAS to a supply widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm8983 MICBIAS to a supply widget
Mark Brown [Thu, 27 Oct 2011 07:47:24 +0000 (09:47 +0200)]
ASoC: Convert wm8983 MICBIAS to a supply widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm8985 MICBIAS to a supply widget
Mark Brown [Thu, 27 Oct 2011 07:47:40 +0000 (09:47 +0200)]
ASoC: Convert wm8985 MICBIAS to a supply widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm8988 MICBIAS to a supply widget
Mark Brown [Thu, 27 Oct 2011 07:47:53 +0000 (09:47 +0200)]
ASoC: Convert wm8988 MICBIAS to a supply widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm8990 MICBIAS to a supply widget
Mark Brown [Thu, 27 Oct 2011 07:48:09 +0000 (09:48 +0200)]
ASoC: Convert wm8990 MICBIAS to a supply widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm8991 MICBIAS to a supply widget
Mark Brown [Thu, 27 Oct 2011 07:48:39 +0000 (09:48 +0200)]
ASoC: Convert wm8991 MICBIAS to a supply widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm8995 MICBIASes to supply widgets
Mark Brown [Thu, 27 Oct 2011 07:49:11 +0000 (09:49 +0200)]
ASoC: Convert wm8995 MICBIASes to supply widgets

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: WM8904: Set `invert' bit for Capture Switch
Hong Xu [Fri, 28 Oct 2011 07:36:39 +0000 (15:36 +0800)]
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
13 years agoASoC: Leave input audio data bit length settings untouched in wm8711_set_dai_fmt
Axel Lin [Fri, 28 Oct 2011 07:17:56 +0000 (15:17 +0800)]
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
13 years agoASoC: wm8711: Fix wrong mask for setting input audio data bit length select
Axel Lin [Fri, 28 Oct 2011 03:08:01 +0000 (11:08 +0800)]
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
13 years agoASoC: Allow machines to ignore pmdown_time per-link
ramesh.babu@linux.intel.com [Thu, 27 Oct 2011 06:42:33 +0000 (12:12 +0530)]
ASoC: Allow machines to ignore pmdown_time per-link

With this flag, each dai_link in machine driver can choose
to ignore pmdown_time during DAPM shut down sequence.

If the ignore_pmdown_time is set, the DAPM for corresponding DAI
will be executed immediately.

Signed-off-by: Ramesh Babu K V <ramesh.babu@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: tlv320aic3x: Clear BIT_CLK_MASTER and WORD_CLK_MASTER bits for for slave mode
Axel Lin [Thu, 27 Oct 2011 08:38:42 +0000 (16:38 +0800)]
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>
13 years agoASoC: tlv320aic23: Clear TLV320AIC23_MS_MASTER bit for slave mode
Axel Lin [Thu, 27 Oct 2011 08:35:49 +0000 (16:35 +0800)]
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>
13 years agoASoC: wm8940: Fix mask for setting BCLKDIV
Axel Lin [Thu, 27 Oct 2011 08:27:33 +0000 (16:27 +0800)]
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>
13 years agoASoC: tlv320aic3x: Use snd_soc_update_bits for read-modify-write
Axel Lin [Wed, 26 Oct 2011 14:13:17 +0000 (22:13 +0800)]
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>
13 years agoASoC: wm8940: Properly set codec->dapm.bias_level
Axel Lin [Wed, 26 Oct 2011 01:53:41 +0000 (09:53 +0800)]
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
13 years agoASoC: wm8940: Fix a typo for the mask of setting WM8940_BCLKDIV
Axel Lin [Mon, 24 Oct 2011 03:33:55 +0000 (11:33 +0800)]
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>
13 years agoASoC: wm8940: Fix setting PLL Output clock division ratio
Axel Lin [Mon, 24 Oct 2011 03:32:41 +0000 (11:32 +0800)]
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>
13 years agoASoC: wm8996: Avoid a redundant i2c_get_clientdata call in wm8996_i2c_remove
Axel Lin [Mon, 24 Oct 2011 03:31:12 +0000 (11:31 +0800)]
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>
13 years agoASoC: wm8400: Fix setting Fout clock divider for FLL Control 4
Axel Lin [Sat, 22 Oct 2011 14:48:27 +0000 (22:48 +0800)]
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>
13 years agoASoC: max98095: Convert codec->hw_write to snd_soc_write
Axel Lin [Sat, 15 Oct 2011 03:46:02 +0000 (11:46 +0800)]
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>
13 years agoASoC: keep pointer to resource so it can be freed
Julia Lawall [Tue, 18 Oct 2011 15:06:39 +0000 (17:06 +0200)]
ASoC: keep pointer to resource so it can be freed

Add a new variable for storing resources accessed subsequent to the one
accessed using request_mem_region, so the one accessed using
request_mem_region can be released if needed.

The resource variable names are also changed to be more descriptive.

This code is also missing some calls to iounmap.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@

if (E == NULL)
{
  ... when != if (E == NULL || ...) S1 else S2
      when != E = E1
*E->f
  ... when any
  return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sgtl5000: Fix wrong mask in some snd_soc_update_bits calls
Axel Lin [Fri, 21 Oct 2011 01:54:43 +0000 (09:54 +0800)]
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>
13 years agoASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2
Axel Lin [Fri, 21 Oct 2011 02:44:07 +0000 (10:44 +0800)]
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
13 years agoASoC: da7210: Add support for line out and DAC
Ashish Chavan [Fri, 21 Oct 2011 13:36:23 +0000 (19:06 +0530)]
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>
13 years agoASoC: da7210: Add support for DAPM
Ashish Chavan [Fri, 21 Oct 2011 12:46:08 +0000 (18:16 +0530)]
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>
13 years agoASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
Axel Lin [Thu, 20 Oct 2011 10:49:29 +0000 (18:49 +0800)]
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>
13 years agoASoC: Set sgtl5000->ldo in ldo_regulator_register
Axel Lin [Thu, 20 Oct 2011 10:32:59 +0000 (18:32 +0800)]
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>
13 years agoASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 Capture
Axel Lin [Thu, 20 Oct 2011 04:16:31 +0000 (12:16 +0800)]
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
13 years agoASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 Capture
Axel Lin [Thu, 20 Oct 2011 04:13:24 +0000 (12:13 +0800)]
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
13 years agoASoC: rt5631: Remove unused codec field from struct rt5631_priv
Axel Lin [Thu, 20 Oct 2011 03:00:06 +0000 (11:00 +0800)]
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>
13 years agoASoC: ak4671: Use snd_soc_update_bits for read-modify-write
Axel Lin [Thu, 20 Oct 2011 02:54:13 +0000 (10:54 +0800)]
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>
13 years agoASoC: Fix reg_word_size for ak4104
Axel Lin [Thu, 20 Oct 2011 02:50:03 +0000 (10:50 +0800)]
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>
13 years agoASoC: wm9081: Fix setting soft VMID ramp enable with VMID 2*240k
Axel Lin [Mon, 17 Oct 2011 04:34:31 +0000 (12:34 +0800)]
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>
13 years agoASoC: ak4641: Use SND_SOC_DAPM_DAC for Voice Playback stream widget
Axel Lin [Wed, 19 Oct 2011 15:24:54 +0000 (23:24 +0800)]
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>
13 years agoASoC: da7210: Add support for ALC and Noise suppression
Ashish Chavan [Wed, 19 Oct 2011 08:54:37 +0000 (14:24 +0530)]
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>
13 years agoASoC: da7210: Add support for mute and zero cross controls
Ashish Chavan [Wed, 19 Oct 2011 08:49:06 +0000 (14:19 +0530)]
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>
13 years agoASoC: ak4641: Remove unused codec field from struct ak4641_priv
Axel Lin [Wed, 19 Oct 2011 15:05:56 +0000 (23:05 +0800)]
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>
13 years agoASoC: ssm2602: Use snd_soc_update_bits for read-modify-write
Axel Lin [Wed, 19 Oct 2011 06:07:31 +0000 (14:07 +0800)]
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>
13 years agoASoC: WM9081 interrupt status register is volatile
Mark Brown [Tue, 18 Oct 2011 18:31:38 +0000 (19:31 +0100)]
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>
13 years agoASoC: sgtl5000: Fix setting mic bias resistor
Axel Lin [Wed, 19 Oct 2011 03:00:42 +0000 (11:00 +0800)]
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>
13 years agoASoC: sgtl5000: Fix define for SGTL5000_BIAS_R_MASK
Axel Lin [Wed, 19 Oct 2011 02:54:56 +0000 (10:54 +0800)]
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>
13 years agoASoC: ad193x: Use snd_soc_update_bits for read-modify-write
Axel Lin [Mon, 17 Oct 2011 22:25:08 +0000 (06:25 +0800)]
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>
13 years agoASoC: Fix prefixing of DAPM controls
Mark Brown [Mon, 17 Oct 2011 23:11:49 +0000 (00:11 +0100)]
ASoC: Fix prefixing of DAPM controls

We don't want to clear the prefix while we're creating the DAPM controls
for the device as the prefix is applied during control creation.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Convert WM9081 to table based control init
Mark Brown [Mon, 17 Oct 2011 22:53:37 +0000 (23:53 +0100)]
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>
13 years agoASoC: Update WM1811 DCS codes for latest evaluation results
Mark Brown [Mon, 17 Oct 2011 18:38:52 +0000 (19:38 +0100)]
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>
13 years agoASoC: wm8580: Use snd_soc_update_bits for read-modify-write
Axel Lin [Mon, 17 Oct 2011 03:50:46 +0000 (11:50 +0800)]
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>
13 years agoASoC: wm8900: Use snd_soc_update_bits for read-modify-write
Axel Lin [Sun, 16 Oct 2011 15:30:21 +0000 (23:30 +0800)]
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>
13 years agoASoC: wm8900: Fix the mask defines
Axel Lin [Sun, 16 Oct 2011 15:29:12 +0000 (23:29 +0800)]
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>
13 years agoASoC: wm8900: Fix wrong mask for setting DAC_CLKDIV/ADC_CLKDIV/LRCLK_MODE
Axel Lin [Sun, 16 Oct 2011 15:27:55 +0000 (23:27 +0800)]
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>
13 years agoASoC: wm8741: Use snd_soc_cache_sync to sync reg_cache with the hardware
Axel Lin [Mon, 17 Oct 2011 12:16:37 +0000 (20:16 +0800)]
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>
13 years agoASoC: wm8741: Fix setting interface format for DSP modes
Axel Lin [Mon, 17 Oct 2011 12:14:56 +0000 (20:14 +0800)]
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
13 years agoMANITAINERS: Add Cragganmore reference platform to Wolfson support
Mark Brown [Fri, 14 Oct 2011 20:09:43 +0000 (21:09 +0100)]
MANITAINERS: Add Cragganmore reference platform to Wolfson support

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: da7210: Add support for High pass and Voice filters for ADC and DAC
Ashish Chavan [Sat, 15 Oct 2011 09:20:06 +0000 (14:50 +0530)]
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>
13 years agoASoC: da7210: Add support for ADC & DAC equalizers
Ashish Chavan [Sat, 15 Oct 2011 09:17:56 +0000 (14:47 +0530)]
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>
13 years agoASoC: Tegra: sparse cleanup
Olof Johansson [Fri, 14 Oct 2011 22:54:19 +0000 (15:54 -0700)]
ASoC: Tegra: sparse cleanup

Fixes the following sparse warnings:

sound/soc/tegra/tegra_das.c:215:8: warning: Using plain integer as NULL pointer
sound/soc/tegra/tegra_das.c:237:8: warning: Using plain integer as NULL pointer
sound/soc/tegra/tegra_pcm.c:370:32: warning: symbol 'tegra_pcm_platform' was not declared. Should it be static?

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMAINTAINERS: Add maintainer for Analog Devices sound CODECs
Lars-Peter Clausen [Mon, 17 Oct 2011 18:33:05 +0000 (20:33 +0200)]
MAINTAINERS: Add maintainer for Analog Devices sound CODECs

The MAINTAINERS  entry for the ADI sound CODEC drivers currently only lists the
ADI devices-drivers-devel mailing-list. Add myself as additional contact, since
I'm the person at ADI who is currently doing most of the work on these drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Request core to inline the DAPM sequence
Peter Ujfalusi [Fri, 14 Oct 2011 11:43:34 +0000 (14:43 +0300)]
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>
13 years agoASoC: core: Add flag to ignore pmdown_time at pcm_close
Peter Ujfalusi [Fri, 14 Oct 2011 11:43:33 +0000 (14:43 +0300)]
ASoC: core: Add flag to ignore pmdown_time at pcm_close

With this flag codec drivers can indicate that it is desired
to ignore the pmdown_time for DAPM shutdown sequence when
playback stream is stopped.
The DAPM sequence will be executed without delay in this case.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: da7210: bugfix for head phone volume control
Ashish Chavan [Fri, 14 Oct 2011 10:55:25 +0000 (16:25 +0530)]
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>
13 years agoASoC: ad193x: Fix define of AD193X_PLL_INPUT_MASK
Axel Lin [Fri, 14 Oct 2011 09:01:59 +0000 (17:01 +0800)]
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>
13 years agoASoC: wm8990: Use snd_soc_update_bits for read-modify-write
Axel Lin [Fri, 14 Oct 2011 06:30:05 +0000 (14:30 +0800)]
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>
13 years agoASoC: wm8990: Fix wrong bit setting for WM8990_POWER_MANAGEMENT_2
Axel Lin [Fri, 14 Oct 2011 05:57:48 +0000 (13:57 +0800)]
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>
13 years agoASoC: wm8400: Fix wrong bit setting for WM8400_POWER_MANAGEMENT_2
Axel Lin [Fri, 14 Oct 2011 05:56:49 +0000 (13:56 +0800)]
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>
13 years agoASoC: wm8991: Use snd_soc_update_bits for read-modify-write
Axel Lin [Fri, 14 Oct 2011 04:09:48 +0000 (12:09 +0800)]
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>
13 years agoASoC: wm8991: Fix wrong bit setting for WM8991_POWER_MANAGEMENT_2
Axel Lin [Fri, 14 Oct 2011 04:08:00 +0000 (12:08 +0800)]
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>
13 years agoASoC: wm8961: Convert codec->hw_read to snd_soc_read
Axel Lin [Fri, 14 Oct 2011 01:39:14 +0000 (09:39 +0800)]
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>
13 years agoASoC: tlv320aic3x: Convert codec->hw_read to snd_soc_read
Axel Lin [Fri, 14 Oct 2011 01:37:00 +0000 (09:37 +0800)]
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>
13 years agoASoC: alc5623: Convert codec->hw_read to snd_soc_read
Axel Lin [Fri, 14 Oct 2011 01:35:20 +0000 (09:35 +0800)]
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>
13 years agoASoC: tlv320aic23: convert to soc-cache
Axel Lin [Thu, 13 Oct 2011 07:06:43 +0000 (15:06 +0800)]
ASoC: tlv320aic23: convert to soc-cache

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert DA7210 to table based DAPM init
Mark Brown [Fri, 14 Oct 2011 19:18:49 +0000 (20:18 +0100)]
ASoC: Convert DA7210 to table based DAPM init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: tlv320aic32x4: Use snd_soc_update_bits for read-modify-write
Axel Lin [Thu, 13 Oct 2011 14:56:34 +0000 (22:56 +0800)]
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>
13 years agoASoC: twl6040: Rename the Earphone Driver event handler
Peter Ujfalusi [Thu, 13 Oct 2011 12:05:44 +0000 (15:05 +0300)]
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>
13 years agoASoC: twl6040: Change event ordering for Earphone driver
Peter Ujfalusi [Thu, 13 Oct 2011 12:05:43 +0000 (15:05 +0300)]
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>
13 years agoASoC: twl6040: Remove PLL usage restrictions
Peter Ujfalusi [Thu, 13 Oct 2011 12:05:42 +0000 (15:05 +0300)]
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>
13 years agoASoC: twl6040: Remove Capture restriction for 17.64MHz sysclk
Peter Ujfalusi [Thu, 13 Oct 2011 12:05:41 +0000 (15:05 +0300)]
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>