]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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: 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>
9 years agoASoC: dapm: Add missing mutex unlock
Charles Keepax [Fri, 8 May 2015 09:50:10 +0000 (10:50 +0100)]
ASoC: dapm: Add missing mutex unlock

The is a missing mutex unlock on the error path in
snd_soc_dapm_get_enum_double. This was introduced in commit
561ed680b764 ("ASoC: dapm: Add support for autodisable mux controls").
This patch adds the missing unlock.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: dapm: Add demux support
Lars-Peter Clausen [Fri, 1 May 2015 16:02:43 +0000 (18:02 +0200)]
ASoC: dapm: Add demux support

A demux is conceptually similar to a mux. Where a mux has multiple input
and one output and selects one of the inputs to be connected to the output,
the demux has one input and multiple outputs and selects one of the outputs
to which the input gets connected.

This similarity makes it straight forward to support them in DAPM using the
existing mux support, we only need to swap sinks and sources when initially
setting up the paths.

The only slightly tricky part is that there can only be one control per
path. Since mixers/muxes are at the sink of a path and a demux is at the
source and both types want a control it is not possible to directly connect
a demux output to a mixer/mux input. The patch adds some sanity checks to
make sure that this does not happen.

Drivers who want to model hardware which directly connects a demux output
to a mixer/mux input can do this by inserting a dummy widget between the
two. E.g.:

{ "Dummy", "Demux Control", "Demux" },
{ "Mixer", "Mixer Control", "Dummy" },

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: dapm: Add new widgets to the end of the widget list
Lars-Peter Clausen [Fri, 1 May 2015 16:02:42 +0000 (18:02 +0200)]
ASoC: dapm: Add new widgets to the end of the widget list

Currently new widgets are appended to the beginning of the cards widget
list. This has the effect that widgets that are created while iterating
over the widget list in snd_soc_dapm_new_widgets() (like e.g. the
auto-disable widgets) are not covered during that invocation of the
function. If no further invocations of snd_soc_dapm_new_widgets() happen
these widgets will not be fully initialized and e.g. no debugfs entries are
created for them.

By adding new widgets to the end of the widget list we make sure that
widgets that are created in snd_soc_dapm_new_widgets() will still be
handled during the same snd_soc_dapm_new_widgets() invocation and are
always fully initialized.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: dapm: Add support for autodisable mux controls
Charles Keepax [Fri, 1 May 2015 11:37:26 +0000 (12:37 +0100)]
ASoC: dapm: Add support for autodisable mux controls

Commit 57295073b6ac ("ASoC: dapm: Implement mixer input auto-disable")
added support for autodisable controls, controls whose values are only
written to the hardware when their respective widgets are powered up.
But it only added support for controls based on the mixer abstraction.

This patch add support for mux controls (DAPM controls based on the
enum abstraction) to be auto-disabled as well. As each mux can only have
a single control, there is no need to tie the autodisable widget to the
inputs (as is done for the mixer controls) it can be tided directly to
the mux widget itself.

Note that it is assumed that the first entry in a autodisable mux
control will always represent the off state for the mux and is what the
mux will be set to whilst it is disabled.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: dapm: Append "Autodisable" to autodisable widget names
Charles Keepax [Fri, 1 May 2015 11:37:25 +0000 (12:37 +0100)]
ASoC: dapm: Append "Autodisable" to autodisable widget names

This makes it a little easier to follow what is happening in debugfs.
Additionally is also useful in facilitating work to add autodisable
muxes because the control name is already used for the mux widget and
thus shouldn't be reused for the autodisable widget.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Correct typo in SOC_VALUE_ENUM_SINGLE macro
Charles Keepax [Fri, 1 May 2015 11:37:23 +0000 (12:37 +0100)]
ASoC: Correct typo in SOC_VALUE_ENUM_SINGLE macro

xnitmes is clearly intended to be xnitems, but all other macros just
refer to this as xitems, so change it to that.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: dapm: Remove local OOM error message
Charles Keepax [Fri, 1 May 2015 11:37:24 +0000 (12:37 +0100)]
ASoC: dapm: Remove local OOM error message

The memory subsystem is pretty chatty on failure no need to have local
OOM messages as well.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: ssm2518: fix simple_return.cocci warnings
kbuild test robot [Tue, 28 Apr 2015 04:20:32 +0000 (12:20 +0800)]
ASoC: ssm2518: fix simple_return.cocci warnings

sound/soc/codecs/ssm2518.c:521:5-8: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: adau1977: fix simple_return.cocci warnings
kbuild test robot [Tue, 28 Apr 2015 04:20:32 +0000 (12:20 +0800)]
ASoC: adau1977: fix simple_return.cocci warnings

sound/soc/codecs/adau1977.c:496:5-8: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Move bias level update to the core
Lars-Peter Clausen [Mon, 27 Apr 2015 20:13:25 +0000 (22:13 +0200)]
ASoC: Move bias level update to the core

All drivers have the same line at the end of the set_bias_level callback to
update the bias_level state. Move this update into
snd_soc_dapm_force_bias_level() and remove them from the drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
9 years agoASoC: Route all bias level updates through the core
Lars-Peter Clausen [Mon, 27 Apr 2015 20:13:24 +0000 (22:13 +0200)]
ASoC: Route all bias level updates through the core

Use the new snd_soc_codec_force_bias_level() helper function to invoke the
bias_level callback of a driver instead of calling the callback by hand.
Currently the effect of this is the same, but having all bias level updates
go through a central place will allow us to move more of the bias level
management into the DAPM core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>