platform/kernel/linux-exynos.git
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>
13 years agoASoC: Update WM5100 accessory detection for revision A
Mark Brown [Wed, 12 Oct 2011 17:39:53 +0000 (18:39 +0100)]
ASoC: Update WM5100 accessory detection for revision A

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ak4535: fixup cache register table
Axel Lin [Thu, 13 Oct 2011 09:17:06 +0000 (17:17 +0800)]
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
13 years agoASoC: ak4642: fixup cache register table
Kuninori Morimoto [Thu, 13 Oct 2011 09:03:54 +0000 (02:03 -0700)]
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
13 years agoASoC: sta32x: Write the register default value to cache for reserved registers
Axel Lin [Thu, 13 Oct 2011 06:57:31 +0000 (14:57 +0800)]
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>
13 years agoASoC: sta32x: Set reg_cache_default to sta32x_regs
Axel Lin [Thu, 13 Oct 2011 06:40:08 +0000 (14:40 +0800)]
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>
13 years agoASoC: pxa: Remove redundant snd_soc_dapm_sync() calls from machine drivers
Axel Lin [Wed, 12 Oct 2011 23:38:56 +0000 (07:38 +0800)]
ASoC: pxa: Remove redundant snd_soc_dapm_sync() calls from machine drivers

The core will sync DAPM as part of the card initialization, there is no
need for machine drivers to do so during their setup.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Make SND_SOC_SAARB and SND_SOC_TAVOREVB3 select MFD_88PM860X
Axel Lin [Wed, 12 Oct 2011 13:43:08 +0000 (21:43 +0800)]
ASoC: Make SND_SOC_SAARB and SND_SOC_TAVOREVB3 select MFD_88PM860X

In saarb_pm860x_init() and evb3_pm860x_init(), we call
pm860x_hs_jack_detect() and pm860x_mic_jack_detect() which in turn
calls pm860x_set_bits().
Thus make SND_SOC_SAARB and SND_SOC_TAVOREVB3 select MFD_88PM860X.

This patch fixes below build error if CONFIG_MFD_88PM860X is not configured.

  LD      .tmp_vmlinux1
sound/built-in.o: In function `pm860x_write_reg_cache':
last.c:(.text+0x29e9c): undefined reference to `pm860x_reg_write'
sound/built-in.o: In function `pm860x_set_bias_level':
last.c:(.text+0x29ecc): undefined reference to `pm860x_set_bits'
last.c:(.text+0x29f00): undefined reference to `pm860x_reg_write'
last.c:(.text+0x29f18): undefined reference to `pm860x_reg_write'
sound/built-in.o: In function `pm860x_read_reg_cache':
last.c:(.text+0x29f40): undefined reference to `pm860x_reg_read'
sound/built-in.o: In function `pm860x_probe':
last.c:(.text+0x2a034): undefined reference to `pm860x_bulk_read'
sound/built-in.o: In function `pm860x_codec_handler':
last.c:(.text+0x2a344): undefined reference to `pm860x_reg_read'
last.c:(.text+0x2a354): undefined reference to `pm860x_reg_read'
sound/built-in.o: In function `pm860x_mic_jack_detect':
last.c:(.text+0x2a450): undefined reference to `pm860x_set_bits'
sound/built-in.o: In function `pm860x_hs_jack_detect':
last.c:(.text+0x2a4d0): undefined reference to `pm860x_set_bits'
last.c:(.text+0x2a4f8): undefined reference to `pm860x_set_bits'
last.c:(.text+0x2a510): undefined reference to `pm860x_set_bits'
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: da7210: Add support for other DAI word lengths, format and mode
Ashish Chavan [Wed, 12 Oct 2011 15:03:21 +0000 (20:33 +0530)]
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>
13 years agoASoC: twl6040: Workaround for headset DC offset caused pop noise
Peter Ujfalusi [Wed, 12 Oct 2011 11:46:02 +0000 (14:46 +0300)]
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>
13 years agoASoC: twl6040: Support for vibra output paths
Peter Ujfalusi [Wed, 12 Oct 2011 08:57:57 +0000 (11:57 +0300)]
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>
13 years agoInput: twl6040-vibra: Check the selected path for vibra
Peter Ujfalusi [Wed, 12 Oct 2011 08:57:56 +0000 (11:57 +0300)]
Input: twl6040-vibra: Check the selected path for vibra

The VIBSELL/R bit in the VIBCTLL/R register tells the source of the data,
which is going to be used to drive the attached motor(s).
Do not allow effect execution if any of the channels are set to receive
audio data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMFD: twl6040: function to query the vibra status for clients
Peter Ujfalusi [Wed, 12 Oct 2011 08:57:55 +0000 (11:57 +0300)]
MFD: twl6040: function to query the vibra status for clients

If the client only interested, if any of the vibra channels enabled, or
if any of the channels are set to receive audio data via PDM.

This function targets mainly the vibra driver, so it can check if it is
allowed to execute effects ot not.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMFD: twl6040: Cache the vibra control registers
Peter Ujfalusi [Wed, 12 Oct 2011 08:57:54 +0000 (11:57 +0300)]
MFD: twl6040: Cache the vibra control registers

The vibra control register will be used from the ASoC codec driver as well.
In order to avoid latency issues caused by I2C read access, cache the two
control register within the core driver, so we do not need to reach out
to the chip to read it back.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoInput: twl6040: Simplify vibra regsiter definitions
Peter Ujfalusi [Wed, 12 Oct 2011 08:57:53 +0000 (11:57 +0300)]
Input: twl6040: Simplify vibra regsiter definitions

The bits within the two control registers (for left and right channel)
are identical.
Use common names for the bits acros the two register.
Also add the missing definition for the path selection bit.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: da7210: convert to soc-cache
Axel Lin [Tue, 11 Oct 2011 23:16:25 +0000 (07:16 +0800)]
ASoC: da7210: 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: Remove impossible case from wm8994_hw_params
Axel Lin [Tue, 11 Oct 2011 23:03:09 +0000 (07:03 +0800)]
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>
13 years agoASoC: Delete ads117x.h
Axel Lin [Tue, 11 Oct 2011 22:57:25 +0000 (06:57 +0800)]
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>
13 years agoASoC: ak4642: convert to soc-cache
Axel Lin [Tue, 11 Oct 2011 12:20:53 +0000 (20:20 +0800)]
ASoC: ak4642: 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: Instantiate card widgets immediately
Mark Brown [Mon, 10 Oct 2011 12:38:06 +0000 (13:38 +0100)]
ASoC: Instantiate card widgets immediately

This ensures they are available prior to the card late_probe().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Implement WM5100 accessory detection support
Mark Brown [Tue, 27 Sep 2011 16:39:50 +0000 (17:39 +0100)]
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>
13 years agoASoC: Add missing default for WM5100 Clocking 1
Mark Brown [Tue, 11 Oct 2011 14:37:38 +0000 (15:37 +0100)]
ASoC: Add missing default for WM5100 Clocking 1

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix typo in Kconfig symbol for tlv320aic32x4
Wolfram Sang [Tue, 11 Oct 2011 10:43:02 +0000 (12:43 +0200)]
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>
13 years agoASoC: tlv320dac33: Convert to table based init
Peter Ujfalusi [Tue, 11 Oct 2011 10:11:55 +0000 (13:11 +0300)]
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>
13 years agoASoC: twl4030: Convert to table based init
Peter Ujfalusi [Tue, 11 Oct 2011 10:11:32 +0000 (13:11 +0300)]
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>
13 years agoASoC: twl6040: Convert to table based init
Peter Ujfalusi [Tue, 11 Oct 2011 10:11:12 +0000 (13:11 +0300)]
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>
13 years agoASoC: Writing register default value for the reset register
Axel Lin [Tue, 11 Oct 2011 09:55:00 +0000 (17:55 +0800)]
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>
13 years agoASoC: Convert Goni to data based DAPM init
Mark Brown [Sat, 8 Oct 2011 11:02:13 +0000 (12:02 +0100)]
ASoC: Convert Goni to data based DAPM init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
13 years agoASoC: sdp3430: Let core to deal with the DAPM widgets
Peter Ujfalusi [Mon, 10 Oct 2011 12:34:12 +0000 (15:34 +0300)]
ASoC: sdp3430: Let core to deal with the DAPM widgets

Pass the DAPM widgets/routes via the snd_soc_card struct
to core.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: osk5912: Let core to deal with the DAPM widgets
Peter Ujfalusi [Mon, 10 Oct 2011 12:34:11 +0000 (15:34 +0300)]
ASoC: osk5912: Let core to deal with the DAPM widgets

Pass the DAPM widgets/routes via the snd_soc_card struct
to core. With this change we do not need the init function
since the remaining snd_soc_dapm_enable_pin calls are
not needed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: n810: Let the core to register DAPM widgets/routes and controls
Peter Ujfalusi [Mon, 10 Oct 2011 12:34:10 +0000 (15:34 +0300)]
ASoC: n810: Let the core to register DAPM widgets/routes and controls

Pass the DAPM widgets/routes and static controls via the
snd_soc_card struct to core. In this way the machine driver
does not need to handle the DAPM widgets/routes.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: am3517evm: Let core to deal with the DAPM widgets
Peter Ujfalusi [Mon, 10 Oct 2011 12:34:09 +0000 (15:34 +0300)]
ASoC: am3517evm: Let core to deal with the DAPM widgets

Pass the DAPM widgets/routes via the snd_soc_card struct
to core. With this change we do not need the init function
since the remaining snd_soc_dapm_enable_pin calls are
not needed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Anuj Aggarwal <anuj.aggarwal@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sdp4430: No need to call dapm_pin_enable at init time
Peter Ujfalusi [Mon, 10 Oct 2011 12:34:16 +0000 (15:34 +0300)]
ASoC: sdp4430: No need to call dapm_pin_enable at init time

Widgets are connected by default.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sdp4430: Let core to deal with the DAPM widgets
Peter Ujfalusi [Mon, 10 Oct 2011 12:34:15 +0000 (15:34 +0300)]
ASoC: sdp4430: Let core to deal with the DAPM widgets

Pass the DAPM widgets/routes via the snd_soc_card struct
to core.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: zoom2: No need to call dapm_pin_enable at init time
Peter Ujfalusi [Mon, 10 Oct 2011 12:34:14 +0000 (15:34 +0300)]
ASoC: zoom2: No need to call dapm_pin_enable at init time

Widgets are connected by default.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: zoom2: Let core to deal with the DAPM widgets
Peter Ujfalusi [Mon, 10 Oct 2011 12:34:13 +0000 (15:34 +0300)]
ASoC: zoom2: Let core to deal with the DAPM widgets

Pass the DAPM widgets/routes via the snd_soc_card struct
to core.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: OMAP machines: Remove soc_dapm_sync() call from init
Peter Ujfalusi [Mon, 10 Oct 2011 12:34:08 +0000 (15:34 +0300)]
ASoC: OMAP machines: Remove soc_dapm_sync() call from init

No need to call soc_dapm_sync at init time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Anuj Aggarwal <anuj.aggarwal@ti.com>
Cc: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Gražvydas Ignotas <notasas@gmail.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert Jive to table based init
Mark Brown [Sat, 8 Oct 2011 12:30:17 +0000 (13:30 +0100)]
ASoC: Convert Jive to table based init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
13 years agoASoC: Convert SMDK WM8580 to table based DAPM init
Mark Brown [Sat, 8 Oct 2011 12:31:18 +0000 (13:31 +0100)]
ASoC: Convert SMDK WM8580 to table based DAPM init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
13 years agoASoC: Convert SmartQ to table based init
Mark Brown [Sat, 8 Oct 2011 12:30:55 +0000 (13:30 +0100)]
ASoC: Convert SmartQ to table based init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
13 years agoASoC: Convert RX1950 to table based init
Mark Brown [Sat, 8 Oct 2011 12:30:35 +0000 (13:30 +0100)]
ASoC: Convert RX1950 to table based init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
13 years agoASoC: Convert H1940 to table based init
Mark Brown [Sat, 8 Oct 2011 12:30:06 +0000 (13:30 +0100)]
ASoC: Convert H1940 to table based init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
13 years agoASoC: Convert Simtec machines to table based DAPM init
Mark Brown [Sat, 8 Oct 2011 11:19:12 +0000 (12:19 +0100)]
ASoC: Convert Simtec machines to table based DAPM init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: fix checkpatch.pl error in omap-mcbsp
Michael Opdenacker [Mon, 10 Oct 2011 05:07:08 +0000 (07:07 +0200)]
ASoC: fix checkpatch.pl error in omap-mcbsp

Signed-off-by: Michael Opdenacker <michael.opdenacker@linaro.org>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ak4535: convert to soc-cache
Axel Lin [Thu, 6 Oct 2011 02:11:51 +0000 (10:11 +0800)]
ASoC: ak4535: 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: wm8988: Convert to snd_soc_cache_sync
Axel Lin [Fri, 7 Oct 2011 13:53:39 +0000 (21:53 +0800)]
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>
13 years agoASoC: wm8974: Convert to snd_soc_cache_sync
Axel Lin [Fri, 7 Oct 2011 13:52:42 +0000 (21:52 +0800)]
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>
13 years agoASoC: wm8971: Convert to snd_soc_cache_sync
Axel Lin [Fri, 7 Oct 2011 13:52:00 +0000 (21:52 +0800)]
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>
13 years agoASoC: wm8960: Convert to snd_soc_cache_sync
Axel Lin [Fri, 7 Oct 2011 13:50:23 +0000 (21:50 +0800)]
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>
13 years agoASoC: wm8940: Convert to snd_soc_cache_sync
Axel Lin [Fri, 7 Oct 2011 13:42:49 +0000 (21:42 +0800)]
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>
13 years agoASoC: wm8776: Convert to snd_soc_cache_sync
Axel Lin [Fri, 7 Oct 2011 13:41:41 +0000 (21:41 +0800)]
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>
13 years agoASoC: wm8750: Convert to snd_soc_cache_sync
Axel Lin [Fri, 7 Oct 2011 13:40:44 +0000 (21:40 +0800)]
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>
13 years agoASoC: wm8731: Convert to snd_soc_cache_sync
Axel Lin [Fri, 7 Oct 2011 13:39:09 +0000 (21:39 +0800)]
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>
13 years agoASoC: wm8711: Convert to snd_soc_cache_sync
Axel Lin [Fri, 7 Oct 2011 13:37:54 +0000 (21:37 +0800)]
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>
13 years agoASoC: wm8510: Convert to snd_soc_cache_sync
Axel Lin [Fri, 7 Oct 2011 13:36:27 +0000 (21:36 +0800)]
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>
13 years agoASoC: Fix DAPM sync for TLV320AIC3x custom DAPM widget
Mark Brown [Sat, 8 Oct 2011 12:36:03 +0000 (13:36 +0100)]
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>
13 years agoASoC: Squash error codes from regmap down to -1 on read
Mark Brown [Sun, 9 Oct 2011 13:06:13 +0000 (14:06 +0100)]
ASoC: Squash error codes from regmap down to -1 on read

The ASoC code always uses -1 as the error code due to reporting errors in
band with the value. Ensure we don't confuse anything by making sure we
don't pass actual error codes back into the rest of the code on read.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Cache connected input and output recursions
Mark Brown [Sun, 9 Oct 2011 10:52:05 +0000 (11:52 +0100)]
ASoC: Cache connected input and output recursions

The number of connected input and output endpoints for a given widgets
can't change during a DAPM run so there is no need to redo the recursion
through branches of the tree we've already visited. Doing this on one of
my test systems gives an improvement of:

         Power    Path   Neighbour
Before:  63       607    731
After:   63       141    181

which scales up well as more widgets are involved in paths.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Assign power_check when we allocate DAPM widgets
Mark Brown [Sat, 8 Oct 2011 13:04:50 +0000 (14:04 +0100)]
ASoC: Assign power_check when we allocate DAPM widgets

This ensures none of the rest of the code ever encounters a widget which
does not have a power check function.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Ensure all DAPM widgets are instantiated with the card
Mark Brown [Sat, 8 Oct 2011 12:59:44 +0000 (13:59 +0100)]
ASoC: Ensure all DAPM widgets are instantiated with the card

Specifically for the widgets added by machine driver late probe functions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove redundant snd_soc_dapm_sync() calls from machine drivers
Mark Brown [Sat, 8 Oct 2011 12:29:18 +0000 (13:29 +0100)]
ASoC: Remove redundant snd_soc_dapm_sync() calls from machine drivers

The core will sync DAPM as part of the card initialization, there is no
need for machine drivers to do so during their setup.

OMAP drivers are omitted as I know Peter already has patches for them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Suppress early calls to snd_soc_dapm_sync()
Mark Brown [Fri, 7 Oct 2011 13:29:19 +0000 (14:29 +0100)]
ASoC: Suppress early calls to snd_soc_dapm_sync()

Ensure we only have one sync during the initial startup of the card by
making snd_soc_dapm_sync() a noop on non-instantiated cards. This avoids
any bounces due to things like jacks reporting their initial state on
partially initialised cards. The callers that don't also get called at
runtime should just be removed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoregulator: Add WM1811 support
Mark Brown [Sun, 24 Jul 2011 11:40:48 +0000 (12:40 +0100)]
regulator: Add WM1811 support

The WM1811 has a slightly different range on LDO2 to other WM8994 class
devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-3.1' into for-3.2
Mark Brown [Thu, 6 Oct 2011 19:03:18 +0000 (20:03 +0100)]
Merge branch 'for-3.1' into for-3.2

13 years agoASoC: Return early with -EINVAL if invalid dai format is detected
Axel Lin [Wed, 5 Oct 2011 23:29:56 +0000 (07:29 +0800)]
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>
13 years agoASoC: wm8990: Remove incorrect comments
Axel Lin [Thu, 6 Oct 2011 03:44:56 +0000 (11:44 +0800)]
ASoC: wm8990: Remove incorrect comments

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8990: Convert to snd_soc_cache_sync for sync reg_cache with the hardware
Axel Lin [Thu, 6 Oct 2011 03:00:19 +0000 (11:00 +0800)]
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>
13 years agoASoC: fix codec breakage caused by the volsw/volsw_2r merger
Peter Ujfalusi [Thu, 6 Oct 2011 04:43:21 +0000 (07:43 +0300)]
ASoC: fix codec breakage caused by the volsw/volsw_2r merger

By accident few places still uses the _2r calls from
the core.
This is a quick fix, the drivers using the old callbacks
going to be changed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: tlv320aic32x4 fix initialization of micpga routing
Wolfram Sang [Thu, 6 Oct 2011 18:53:36 +0000 (20:53 +0200)]
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>
13 years agoASoC: Ensure DAPM widgets are set up before we sync jacks
Mark Brown [Thu, 6 Oct 2011 12:30:55 +0000 (13:30 +0100)]
ASoC: Ensure DAPM widgets are set up before we sync jacks

We synchronise jack state on startup - when we do that make sure that we
have set up all the DAPM widgets first in case we end up touching any of
the partially set up widgets when syncing the jack pins.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
13 years agoASoC: Replace remaining use of *_volsw_2r with *_volsw
Peter Ujfalusi [Thu, 6 Oct 2011 06:59:12 +0000 (09:59 +0300)]
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>
13 years agoASoC: Remove references to linux@wolfsonmicro.com
Mark Brown [Thu, 6 Oct 2011 10:10:01 +0000 (11:10 +0100)]
ASoC: Remove references to linux@wolfsonmicro.com

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused variable 'wm9090' in wm9090_probe
Axel Lin [Wed, 5 Oct 2011 06:47:15 +0000 (14:47 +0800)]
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>
13 years agoASoC: imx: Remove unused variable 'dai'
Axel Lin [Wed, 5 Oct 2011 06:41:35 +0000 (14:41 +0800)]
ASoC: imx: Remove unused variable 'dai'

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused function declaration in imx-ssi.h
Axel Lin [Wed, 5 Oct 2011 06:40:46 +0000 (14:40 +0800)]
ASoC: Remove unused function declaration in imx-ssi.h

These functions are removed in commit f0fba2ad
"ASoC: multi-component - ASoC Multi-Component Support".
Let's remove the leftover function declaration in header file.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Warn user in twl6040_put_volsw for error case
Peter Ujfalusi [Wed, 5 Oct 2011 07:29:28 +0000 (10:29 +0300)]
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>
13 years agoASoC: core: Remove snd_soc_put_volsw_2r definition
Peter Ujfalusi [Wed, 5 Oct 2011 07:29:27 +0000 (10:29 +0300)]
ASoC: core: Remove snd_soc_put_volsw_2r definition

We do not have users for snd_soc_put_volsw_2r anymore.
It can be removed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Simply call snd_soc_put_volsw form the custom code
Peter Ujfalusi [Wed, 5 Oct 2011 07:29:26 +0000 (10:29 +0300)]
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>
13 years agoASoC: core: Combine snd_soc_put_volsw/put_volsw_2r functions
Peter Ujfalusi [Wed, 5 Oct 2011 07:29:25 +0000 (10:29 +0300)]
ASoC: core: Combine snd_soc_put_volsw/put_volsw_2r functions

Handle the put_volsw/put_volsw_2r in one function.

To avoid build breakage in twl6040 keep the
snd_soc_put_volsw_2r as define, and map it snd_soc_put_volsw.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: core: Combine snd_soc_get_volsw/get_volsw_2r functions
Peter Ujfalusi [Wed, 5 Oct 2011 07:29:24 +0000 (10:29 +0300)]
ASoC: core: Combine snd_soc_get_volsw/get_volsw_2r functions

Handle the get_volsw/get_volsw_2r in one function.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: core: Combine snd_soc_info_volsw/info_volsw_2r functions
Peter Ujfalusi [Wed, 5 Oct 2011 07:29:23 +0000 (10:29 +0300)]
ASoC: core: Combine snd_soc_info_volsw/info_volsw_2r functions

Handle the info_volsw/info_volsw_2r in one function.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: core: Change SOC_SINGLE/DOUBLE_VALUE representation
Peter Ujfalusi [Wed, 5 Oct 2011 07:29:22 +0000 (10:29 +0300)]
ASoC: core: Change SOC_SINGLE/DOUBLE_VALUE representation

SOC_SINGLE/DOUBLE_VALUE is used for mixer controls, where the
bits are within one register.

Assign .rreg to be the same as .reg for these types.

With this change we can tell if the mixer in question:
is mono:
mc->reg == mc->rreg && mc->shift == mc->rshift

is stereo, within single register:
mc->reg == mc->rreg && mc->shift != mc->rshift

is stereo, in two registers:
mc->reg != mc->rreg

The patch provide a small inline function to query, if the mixer
is stereo, or mono.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: twl6040: Prepare for core put_volsw/volsw_2r merger
Peter Ujfalusi [Wed, 5 Oct 2011 07:29:21 +0000 (10:29 +0300)]
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>
13 years agoASoC: twl6040: Simplify custom get_volsw callback
Peter Ujfalusi [Wed, 5 Oct 2011 07:29:20 +0000 (10:29 +0300)]
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>
13 years agoASoC: Consolidate use of controls with custom get/put function
Peter Ujfalusi [Wed, 5 Oct 2011 07:29:19 +0000 (10:29 +0300)]
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>
13 years agoASoC: Use dapm_mark_dirty() for new DAPM widgets for consistency
Mark Brown [Wed, 5 Oct 2011 11:09:12 +0000 (12:09 +0100)]
ASoC: Use dapm_mark_dirty() for new DAPM widgets for consistency

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Stop checking for supplied widgets after we find the first
Mark Brown [Tue, 4 Oct 2011 21:57:50 +0000 (22:57 +0100)]
ASoC: Stop checking for supplied widgets after we find the first

We don't really care how many widgets a supply is supplying, we just care
if the number is non-zero. This didn't actually produce any improvement
in the test cases I've been using but seems obviously sensible enough that
I'm pushing it out anyway.

We could do a similar thing for other widgets but this may be unhelpful
for further refactorings Liam was working on aiming to allow us to
identify connected audio paths.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Don't mark the outputs of supplies as dirty on state changes
Mark Brown [Tue, 4 Oct 2011 21:43:31 +0000 (22:43 +0100)]
ASoC: Don't mark the outputs of supplies as dirty on state changes

The whole point of supply widgets is that they aren't inputs to their
sinks so a state change in a supply should never affect the state of the
widget being supplied and we don't need to mark them as dirty.

           Power    Path   Neighbour
Before:    69       727    905
After:     63       607    731

This is particularly useful where supplies affect large portions of the
chip (eg, a bandgap supplying the analogue sections).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Only run power_check() on a widget once per run
Mark Brown [Tue, 4 Oct 2011 21:15:59 +0000 (22:15 +0100)]
ASoC: Only run power_check() on a widget once per run

Some widgets will get power_check() run on them more than once during a
DAPM run, most commonly due to supply widgets checking to see if their
consumers are powered up. It's wasteful to do this so cache the result
of power_check() during a run. For one system I tested this on I got an
improvement of:

           Power    Path   Neighbour
Before:    106      970    1186
After:     69       727    905

from this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>