openwrt/staging/blogic.git
9 years agoMerge branches 'topic/adsp' and 'topic/dapm' of git://git.kernel.org/pub/scm/linux...
Mark Brown [Fri, 19 Jun 2015 10:17:19 +0000 (11:17 +0100)]
Merge branches 'topic/adsp' and 'topic/dapm' of git://git./linux/kernel/git/broonie/sound into asoc-arizona

9 years agoASoC: wm_adsp: Add basic debugfs entries
Richard Fitzgerald [Thu, 11 Jun 2015 10:32:32 +0000 (11:32 +0100)]
ASoC: wm_adsp: Add basic debugfs entries

This patch adds some debugfs nodes to get information
about the currently running firmware.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm_adsp: create ALSA controls from wm_adsp driver
Richard Fitzgerald [Thu, 11 Jun 2015 10:32:31 +0000 (11:32 +0100)]
ASoC: wm_adsp: create ALSA controls from wm_adsp driver

Now that we have a codec_probe stage initialization in the wm_adsp
driver, we can make the wm_adsp driver create its own ALSA controls
instead of having that responsibility pushed to every codec driver.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm_adsp: Add codec_probe and codec_remove stubs
Richard Fitzgerald [Thu, 11 Jun 2015 10:32:30 +0000 (11:32 +0100)]
ASoC: wm_adsp: Add codec_probe and codec_remove stubs

Currently the only init function in wm_adsp is called by the
codec driver early in its probe before the codec has been
registered with SOC.

This patch adds stubs for the codec_probe and codec_remove stages
and calls them from WM5102 and WM5110 codec drivers. This allows us
to hang anything that needs setup during the codec probe stage off
these functions without further modification of the codec drivers.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: dapm: fix build errors for missing snd_soc_dapm_new_control symbol
Liam Girdwood [Thu, 4 Jun 2015 14:13:09 +0000 (15:13 +0100)]
ASoC: dapm: fix build errors for missing snd_soc_dapm_new_control symbol

Fix the following error:-

All error/warnings (new ones prefixed by >>):
>
>    sound/built-in.o: In function `soc_tplg_dapm_widget_create':
> >> :(.text+0x25a90): undefined reference to `snd_soc_dapm_new_control'

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoregulator: arizona-ldo1: Do not control DVFS clocking from regulator
Richard Fitzgerald [Tue, 2 Jun 2015 10:53:36 +0000 (11:53 +0100)]
regulator: arizona-ldo1: Do not control DVFS clocking from regulator

Using the driver for the internal regulator to also enable/disable
the codec internal clock frequency controller is an unexpected
side-effect for a regulator, and also means that the core clocks
won't be changed as expected if an external regulator is used to
power the codec.

The DVFS is now handled by the codec driver so can be removed from
the LDO1 driver.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: arizona: Add DVFS handling for sample rate control
Richard Fitzgerald [Tue, 2 Jun 2015 10:53:35 +0000 (11:53 +0100)]
ASoC: arizona: Add DVFS handling for sample rate control

The WM8997 and WM5102 codecs need to boost DVFS for higher sample rates.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm_adsp: Move DVFS control into codec driver
Richard Fitzgerald [Tue, 2 Jun 2015 10:53:34 +0000 (11:53 +0100)]
ASoC: wm_adsp: Move DVFS control into codec driver

In theory the ADSP driver should not need to know anything
about the codec it is part of. But the WM5102 needs DVFS
control based on ADSP clocking speed. This was being handled
by bundling part of the knowledge of this into the ADSP driver.

This change moves this handling out of the ADSP driver and
into the WM5102 driver.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: arizona: Export functions to control subsystem DVFS
Richard Fitzgerald [Tue, 2 Jun 2015 10:53:33 +0000 (11:53 +0100)]
ASoC: arizona: Export functions to control subsystem DVFS

The WM5102 and WM8997 codecs have an internal dynamic clock booster.
When this booster is active, the DCVDD voltage must be increased.
If all the currently active audio paths can run with the root SYSCLK
we can disable the booster, allowing us to turn down DCVDD voltage
to save power.

Previously this was being done by having the booster enable bit set
as a side-effect of the LDO1 regulator driver, which is unexpected
behaviour of a regulator and not compatible with using an external
regulator.  [Originally this was documented as a feature of the internal
LDO -- broonie]

This patch exports functions to handle the booster enable and
DCVDD voltage, with each relevant subsystem flagging whether it can
currently run without the booster. Note that these subsystems are
stateless and none of them are nestable, so there's no need for
reference counting, we only need a simple boolean for each subsystem
of whether their current condition could require the booster or will
allow us to turn the codec down to lower operating power.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoMerge branch 'topic/adsp' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Tue, 2 Jun 2015 20:06:04 +0000 (21:06 +0100)]
Merge branch 'topic/adsp' of git://git./linux/kernel/git/broonie/sound into asoc-arizona

9 years agoASoC: dapm: fix snd_soc_dapm_new_control() implicit declaration
Vladimir Zapolskiy [Mon, 1 Jun 2015 21:57:53 +0000 (00:57 +0300)]
ASoC: dapm: fix snd_soc_dapm_new_control() implicit declaration

The change fixes the following compilation problem:

  sound/soc/soc-dapm.c: In function 'dapm_kcontrol_data_alloc':
  sound/soc/soc-dapm.c:388:4: error: implicit declaration of function
    'snd_soc_dapm_new_control' [-Werror=implicit-function-declaration]
    data->widget = snd_soc_dapm_new_control(widget->dapm,
    ^

  sound/soc/soc-dapm.c:387:17: warning: assignment makes pointer
    from integer without a cast [enabled by default]
    data->widget = snd_soc_dapm_new_control(widget->dapm,
                 ^
  sound/soc/soc-dapm.c: At top level:
  sound/soc/soc-dapm.c:3269:1: error: conflicting types for
    'snd_soc_dapm_new_control'
  snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
  ^

In addition to the fix add static qualifier to
snd_soc_dapm_new_control() function to silence checkpatch.

Fixes: 02aa78abec ("ASoC: DAPM: Add APIs to create individual DAPM controls.")
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm_hubs: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:11:06 +0000 (10:11 +0200)]
ASoC: wm_hubs: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm9090: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:11:05 +0000 (10:11 +0200)]
ASoC: wm9090: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm9081: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:11:04 +0000 (10:11 +0200)]
ASoC: wm9081: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8997: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:11:03 +0000 (10:11 +0200)]
ASoC: wm8997: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8996: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:11:02 +0000 (10:11 +0200)]
ASoC: wm8996: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8995: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:11:01 +0000 (10:11 +0200)]
ASoC: wm8995: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8994: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:11:00 +0000 (10:11 +0200)]
ASoC: wm8994: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8993: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:59 +0000 (10:10 +0200)]
ASoC: wm8993: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8991: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:58 +0000 (10:10 +0200)]
ASoC: wm8991: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8990: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:57 +0000 (10:10 +0200)]
ASoC: wm8990: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8988: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:56 +0000 (10:10 +0200)]
ASoC: wm8988: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8985: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:55 +0000 (10:10 +0200)]
ASoC: wm8985: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8983: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:54 +0000 (10:10 +0200)]
ASoC: wm8983: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8978: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:53 +0000 (10:10 +0200)]
ASoC: wm8978: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8974: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:52 +0000 (10:10 +0200)]
ASoC: wm8974: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8971: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:51 +0000 (10:10 +0200)]
ASoC: wm8971: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8962: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:50 +0000 (10:10 +0200)]
ASoC: wm8962: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Also drop the unnecessary comparison in the set_bias_level() callback that
checks if the device is already at the target level. The core already takes
care of this and will not call the callback if the device is already at the
target level.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8961: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:49 +0000 (10:10 +0200)]
ASoC: wm8961: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8960: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:48 +0000 (10:10 +0200)]
ASoC: wm8960: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8955: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:47 +0000 (10:10 +0200)]
ASoC: wm8955: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8940: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:46 +0000 (10:10 +0200)]
ASoC: wm8940: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8904: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:45 +0000 (10:10 +0200)]
ASoC: wm8904: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8903: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:44 +0000 (10:10 +0200)]
ASoC: wm8903: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8900: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:43 +0000 (10:10 +0200)]
ASoC: wm8900: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8804: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:42 +0000 (10:10 +0200)]
ASoC: wm8804: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8776: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:41 +0000 (10:10 +0200)]
ASoC: wm8776: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8770: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:40 +0000 (10:10 +0200)]
ASoC: wm8770: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8753: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:39 +0000 (10:10 +0200)]
ASoC: wm8753: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8750: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:38 +0000 (10:10 +0200)]
ASoC: wm8750: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8737: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:37 +0000 (10:10 +0200)]
ASoC: wm8737: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8731: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:36 +0000 (10:10 +0200)]
ASoC: wm8731: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8728: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:35 +0000 (10:10 +0200)]
ASoC: wm8728: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8711: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:34 +0000 (10:10 +0200)]
ASoC: wm8711: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8580: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:33 +0000 (10:10 +0200)]
ASoC: wm8580: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8523: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:32 +0000 (10:10 +0200)]
ASoC: wm8523: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8510: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:31 +0000 (10:10 +0200)]
ASoC: wm8510: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8400: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:30 +0000 (10:10 +0200)]
ASoC: wm8400: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm8350: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:29 +0000 (10:10 +0200)]
ASoC: wm8350: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm5110: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:28 +0000 (10:10 +0200)]
ASoC: wm5110: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

While we are at it also remove the duplicated initialization of
priv->core.arizona->dapm.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm5102: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:27 +0000 (10:10 +0200)]
ASoC: wm5102: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm5100: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:26 +0000 (10:10 +0200)]
ASoC: wm5100: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm0010: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:25 +0000 (10:10 +0200)]
ASoC: wm0010: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: arizona: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:24 +0000 (10:10 +0200)]
ASoC: arizona: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: cs42xx8: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:23 +0000 (10:10 +0200)]
ASoC: cs42xx8: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: cs42l73: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:22 +0000 (10:10 +0200)]
ASoC: cs42l73: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: cs42l56: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:21 +0000 (10:10 +0200)]
ASoC: cs42l56: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: cs42l52: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 1 Jun 2015 08:10:20 +0000 (10:10 +0200)]
ASoC: cs42l52: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: DAPM: Add APIs to create individual DAPM controls.
Liam Girdwood [Mon, 25 May 2015 17:21:17 +0000 (18:21 +0100)]
ASoC: DAPM: Add APIs to create individual DAPM controls.

The topology core needs to be able to create individual widget controls at
runtime and driver init. Add a regular locked and unlocked API calls to
facilitate this requirement.

The unlocked call is used by the topology core during component driver
probing where the card dapm_mutex is held by the ASoC core and the locked
version at non component driver probe time.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: wm_adsp: Dump scratch registers on DSP shutdown
Richard Fitzgerald [Fri, 29 May 2015 09:23:07 +0000 (10:23 +0100)]
ASoC: wm_adsp: Dump scratch registers on DSP shutdown

The SCRATCH registers are used by firmwares to hold diagnostic
information. Log this during shutdown to assist analysis and debug
of firmwares.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5677: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Tue, 19 May 2015 19:49:11 +0000 (21:49 +0200)]
ASoC: rt5677: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5670: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Tue, 19 May 2015 19:49:10 +0000 (21:49 +0200)]
ASoC: rt5670: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5651: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Tue, 19 May 2015 19:49:09 +0000 (21:49 +0200)]
ASoC: rt5651: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5640: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Tue, 19 May 2015 19:49:08 +0000 (21:49 +0200)]
ASoC: rt5640: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt5631: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Tue, 19 May 2015 19:49:07 +0000 (21:49 +0200)]
ASoC: rt5631: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and
snd_soc_codec_init_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: rt286: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Tue, 19 May 2015 19:49:06 +0000 (21:49 +0200)]
ASoC: rt286: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: alc5623: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Tue, 19 May 2015 19:49:05 +0000 (21:49 +0200)]
ASoC: alc5623: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: max9850: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Thu, 14 May 2015 09:20:03 +0000 (11:20 +0200)]
ASoC: max9850: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: max98095: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Thu, 14 May 2015 09:20:02 +0000 (11:20 +0200)]
ASoC: max98095: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: max98090: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Thu, 14 May 2015 09:20:01 +0000 (11:20 +0200)]
ASoC: max98090: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and all other
manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: max98090: Remove unnecessary snd_soc_dapm_sync()
Lars-Peter Clausen [Thu, 14 May 2015 09:20:00 +0000 (11:20 +0200)]
ASoC: max98090: Remove unnecessary snd_soc_dapm_sync()

max98090_jack_work() doesn't modify the DAPM graph other than what's done
in snd_soc_jack_report(). snd_soc_jack_report() already calls
snd_soc_dapm_sync() internally, so there is no need to call it manually
and can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: max98088: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Thu, 14 May 2015 09:19:59 +0000 (11:19 +0200)]
ASoC: max98088: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: da9055: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Thu, 14 May 2015 09:19:58 +0000 (11:19 +0200)]
ASoC: da9055: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: da732x: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Thu, 14 May 2015 09:19:57 +0000 (11:19 +0200)]
ASoC: da732x: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: da7213: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Thu, 14 May 2015 09:19:56 +0000 (11:19 +0200)]
ASoC: da7213: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sta529: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Thu, 14 May 2015 09:19:55 +0000 (11:19 +0200)]
ASoC: sta529: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sta350: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Thu, 14 May 2015 09:19:54 +0000 (11:19 +0200)]
ASoC: sta350: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sta32x: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Thu, 14 May 2015 09:19:53 +0000 (11:19 +0200)]
ASoC: sta32x: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Drop unnecessary bias level check on resume
Lars-Peter Clausen [Fri, 15 May 2015 10:41:30 +0000 (12:41 +0200)]
ASoC: Drop unnecessary bias level check on resume

The suspended flag will only be set if the CODEC bias level was either
STANDBY or OFF. This means we don't need to check for that on resume since
the condition will always be true.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: twl6040: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Fri, 15 May 2015 10:33:00 +0000 (12:33 +0200)]
ASoC: twl6040: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: twl4030: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Fri, 15 May 2015 10:32:59 +0000 (12:32 +0200)]
ASoC: twl4030: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tlv320dac33: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Fri, 15 May 2015 10:32:58 +0000 (12:32 +0200)]
ASoC: tlv320dac33: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tlv320aic3x: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Fri, 15 May 2015 10:32:57 +0000 (12:32 +0200)]
ASoC: tlv320aic3x: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: tlv320aix31xx: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Fri, 15 May 2015 10:32:56 +0000 (12:32 +0200)]
ASoC: tlv320aix31xx: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all
other manual access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: pcm512x: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Fri, 15 May 2015 10:32:55 +0000 (12:32 +0200)]
ASoC: pcm512x: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: lm49453: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Fri, 15 May 2015 10:32:54 +0000 (12:32 +0200)]
ASoC: lm49453: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sn95031: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Fri, 15 May 2015 10:32:53 +0000 (12:32 +0200)]
ASoC: sn95031: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

While we are at it also replace the if(x == A) ... else if(x == B) ...
construct with a switch-case.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: dapm: Add cache to speed up adding of routes
Charles Keepax [Mon, 11 May 2015 12:50:30 +0000 (13:50 +0100)]
ASoC: dapm: Add cache to speed up adding of routes

Some CODECs have a significant number of DAPM routes and for each route,
when it is added to the card, the entire card widget list must be
searched. When adding routes it is very likely, however, that adjacent
routes will require adjacent widgets. For example all the routes for a
mux are likely added in a block and the sink widget will be the same
each time and it is also quite likely that the source widgets are
sequential located in the widget list.

This patch adds a cache to the DAPM context, this cache will hold the
source and sink widgets from the last call to snd_soc_dapm_add_route for
that context. A small search of the widget list will be made from those
points for both the sink and source. Currently this search only checks
both the last widget and the one adjacent to it.

On wm8280 which has approximately 500 widgets and 30000 routes (one of
the largest CODECs in mainline), the number of paths that hit the cache
is 24000, which significantly improves probe time.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sirf-audio-codec: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 11 May 2015 07:42:36 +0000 (09:42 +0200)]
ASoC: sirf-audio-codec: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: sgtl5000: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 11 May 2015 07:42:35 +0000 (09:42 +0200)]
ASoC: sgtl5000: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: uda1380: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 11 May 2015 07:42:34 +0000 (09:42 +0200)]
ASoC: uda1380: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Also drop the unnecessary check at the beginning of the
uda1380_set_bias_level() which compares the current level to the target
level and aborts if they are the same. Since the core will not call the
set_bias_level() callback if we already are in the target state the result
of the check is always false.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: uda134x: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 11 May 2015 07:42:33 +0000 (09:42 +0200)]
ASoC: uda134x: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ml26124: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 11 May 2015 07:42:32 +0000 (09:42 +0200)]
ASoC: ml26124: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: jz4740: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 11 May 2015 07:42:31 +0000 (09:42 +0200)]
ASoC: jz4740: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: es8328: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 11 May 2015 07:42:30 +0000 (09:42 +0200)]
ASoC: es8328: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: cx20442: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 11 May 2015 07:42:29 +0000 (09:42 +0200)]
ASoC: cx20442: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ak4641: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 11 May 2015 07:42:28 +0000 (09:42 +0200)]
ASoC: ak4641: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ab8500: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 11 May 2015 07:42:27 +0000 (09:42 +0200)]
ASoC: ab8500: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: 88pm860x: Replace direct snd_soc_codec dapm field access
Lars-Peter Clausen [Mon, 11 May 2015 07:42:26 +0000 (09:42 +0200)]
ASoC: 88pm860x: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: dapm: Break out of widget search when source and sink are located
Charles Keepax [Thu, 7 May 2015 10:33:58 +0000 (11:33 +0100)]
ASoC: dapm: Break out of widget search when source and sink are located

Currently snd_soc_dapm_add_route will continue to search the widget list
even after both the source and sink for the route have been located.
This patch breaks out of the search when both are located giving a
small improvement in probe time for drivers.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>