pandora-kernel.git
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 years agoALSA: pcm - remove the dead code from snd_pcm_open_file()
Feng Tang [Mon, 10 Oct 2011 02:31:48 +0000 (10:31 +0800)]
ALSA: pcm - remove the dead code from snd_pcm_open_file()

The rpcm_file parameter is never used in current ALSA code, so remove
it to make it cleaner.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 years agoALSA: control: add support for ENUMERATED user space controls
Clemens Ladisch [Fri, 7 Oct 2011 20:38:59 +0000 (22:38 +0200)]
ALSA: control: add support for ENUMERATED user space controls

Handling of user control elements was implemented for all types except
ENUMERATED.  This type will be needed for the device-specific mixers of
upcoming FireWire drivers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 years agoALSA: hda - Distinguish each substream for better sticky assignment
Takashi Iwai [Thu, 6 Oct 2011 08:07:58 +0000 (10:07 +0200)]
ALSA: hda - Distinguish each substream for better sticky assignment

The commit ef18beded8ddbaafdf4914bab209f77e60ae3a18 introduced a
mechanism to assign the previously used slot for the next reopen of a
PCM stream.  But the PCM device number isn't always unique (it may
have multiple substreams), and also the code doesn't check the stream
direction, thus both playback and capture streams share the same
device number.

For avoiding this conflict, make a unique key for each substream and
store/check this value at reopening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'fix/hda' into topic/hda
Takashi Iwai [Thu, 6 Oct 2011 08:04:30 +0000 (10:04 +0200)]
Merge branch 'fix/hda' into topic/hda

12 years agoALSA: hda/realtek - Choose more cleverly the primary outputs
Takashi Iwai [Thu, 6 Oct 2011 06:27:19 +0000 (08:27 +0200)]
ALSA: hda/realtek - Choose more cleverly the primary outputs

When the speaker outputs are more than the headphone outputs, it implies
that the system has surround speakers while the headphones are only for
monitoring the front.  In such a case, it's better to put speakers as
the primary outputs so that the driver can build up and keep the
surround setup.  Otherwise the system will pick up the headphone as
primary, and offers less channels than the speakers do support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Moved snd_print_pcm_rates() back into hda_proc.c
Takashi Iwai [Thu, 6 Oct 2011 06:16:29 +0000 (08:16 +0200)]
ALSA: hda - Moved snd_print_pcm_rates() back into hda_proc.c

Since hda_proc.c is now the only user of snd_print_pcm_rates(), better to
put it back locally to hda_proc.c and revert to the old style.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hdmi: fix printout of SAD sampling rates
Pierre-Louis Bossart [Wed, 5 Oct 2011 20:14:20 +0000 (15:14 -0500)]
ALSA: hdmi: fix printout of SAD sampling rates

SAD sampling rate information reported in
/proc/asound/cardX/eldX is incorrect due to a mismatch
between HDA and HDMI frequencies. Add new routine to provide
relevant values.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 years agoALSA: jack - Add "Line In" input jack constants
David Henningsson [Wed, 5 Oct 2011 13:53:25 +0000 (15:53 +0200)]
ALSA: jack - Add "Line In" input jack constants

Similar to Line Out, these constants form the base for future
patches enabling input jack reporting for Line in jacks.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 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>
12 years agoALSA: HDA: Fix DAC assignment for secondary headphone on Sigmatel/IDT
David Henningsson [Wed, 5 Oct 2011 07:49:05 +0000 (09:49 +0200)]
ALSA: HDA: Fix DAC assignment for secondary headphone on Sigmatel/IDT

If we run out of DACs when trying to assign a DAC to a secondary
headphone, prefer the DAC of the first headphone to the primary
(usually line out) DAC.

BugLink: http://bugs.launchpad.net/bugs/845275
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 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>
12 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>
12 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>
12 years agoASoC: Add verbose debugging showing why widgets get marked dirty
Mark Brown [Tue, 4 Oct 2011 21:28:08 +0000 (22:28 +0100)]
ASoC: Add verbose debugging showing why widgets get marked dirty

Help diagnose why we're checking widgets by providing some logging when
we first dirty them. This should possibly be a trace point if it's useful
but can be absurdly verbose if enabled, we can always change it later if
desired.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Reduce the number of neigbours we mark dirty when updating power
Mark Brown [Mon, 3 Oct 2011 21:36:57 +0000 (22:36 +0100)]
ASoC: Reduce the number of neigbours we mark dirty when updating power

If two widgets are not currently connected then there is no need to
propagate a power state change between them as we mark the affected
widgets when we change a connection. Similarly if a neighbour widget is
already in the state being set for the current widget then there is no
need to recheck.

On one system I tested this gave:

           Power    Path   Neighbour
Before:    114      1066   1327
After:     106      970    1186

which is an improvement, although relatively small.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Do DAPM power checks only for widgets changed since last run
Mark Brown [Mon, 3 Oct 2011 20:06:40 +0000 (21:06 +0100)]
ASoC: Do DAPM power checks only for widgets changed since last run

In order to reduce the number of DAPM power checks we run keep a list of
widgets which have been changed since the last DAPM run and iterate over
that rather than the full widget list. Whenever we change the power state
for a widget we add all the source and sink widgets it has to the dirty
list, ensuring that all widgets in the path are checked.

This covers more widgets than we need to as some of the neighbour widgets
won't be connected but it's simpler as a first step. On one system I tried
this gave:

           Power    Path   Neighbour
Before:    207      1939   2461
After:     114      1066   1327

which seems useful.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Mark headphone, mic, speaker and line widgets as always connected
Mark Brown [Mon, 3 Oct 2011 21:41:09 +0000 (22:41 +0100)]
ASoC: Mark headphone, mic, speaker and line widgets as always connected

We're not actually doing any dynamic power management based on connection
and output drivers (which are pretty much the same thing) are marked as
unconditionally connected already.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Factor out widget power check operation
Mark Brown [Wed, 28 Sep 2011 17:28:23 +0000 (18:28 +0100)]
ASoC: Factor out widget power check operation

We've got the same code in two different places, let's have it in a single
place instead.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Ensure all DAPM widgets have a power check callback
Mark Brown [Wed, 28 Sep 2011 17:23:53 +0000 (18:23 +0100)]
ASoC: Ensure all DAPM widgets have a power check callback

Makes the code simpler.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Move bias level decision into main dapm_power_widgets()
Mark Brown [Wed, 28 Sep 2011 16:19:47 +0000 (17:19 +0100)]
ASoC: Move bias level decision into main dapm_power_widgets()

Future patches will try to reduce the number of widgets we check on each
DAPM run but we're still going to need to look and see if the devices is
on at all so we can manage the overall device bias. Move these checks out
into the main dapm_power_widgets() function so we don't have to think about
them for now.

Once we're doing more incremental updates it'll probably be worth using
refcounts for each bias level to avoid having to do the sweep over all
widgets but that's not going to be where the big performance wins are.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Factor write of widget power out into a separate function
Mark Brown [Wed, 28 Sep 2011 16:02:31 +0000 (17:02 +0100)]
ASoC: Factor write of widget power out into a separate function

Split the decision about what the new power should be out from the
implementation of that decision.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregulator: Fix return code from regulator_disable_deferred()
Mark Brown [Mon, 3 Oct 2011 21:42:43 +0000 (22:42 +0100)]
regulator: Fix return code from regulator_disable_deferred()

schedule_delayed_work() returns a bool indicating if the work was already
queued when it succeeds so we need to squash a true down to zero.

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