diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-03-18 04:02:04 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-14 12:22:43 -0400 |
commit | ea53bf77d147e7e560ac007fdaa30fb98c37c712 (patch) | |
tree | fb5917764aa5b2c0f4122708097446c3110541a0 /sound/soc/codecs/tlv320dac33.c | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) |
ASoC: Add snd_soc_kcontrol_codec() helper function
For CODEC controls snd_kcontrol_chip() currently returns a pointer to the
CODEC that registered the control. With the upcoming consolidation of
platform and CODEC controls this will change. Prepare for this by introducing
the snd_soc_kcontrol_codec() helper function that will hide the implementation
details of how the CODEC for a control can be obtained. This will allow us to
change this easily in the future.
The patch also updates all CODEC drivers to use the new helper function.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/tlv320dac33.c')
-rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index 6bfc8a17331b..517055ab65ef 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -442,7 +442,7 @@ static int dac33_playback_event(struct snd_soc_dapm_widget *w, | |||
442 | static int dac33_get_fifo_mode(struct snd_kcontrol *kcontrol, | 442 | static int dac33_get_fifo_mode(struct snd_kcontrol *kcontrol, |
443 | struct snd_ctl_elem_value *ucontrol) | 443 | struct snd_ctl_elem_value *ucontrol) |
444 | { | 444 | { |
445 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 445 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); |
446 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); | 446 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); |
447 | 447 | ||
448 | ucontrol->value.integer.value[0] = dac33->fifo_mode; | 448 | ucontrol->value.integer.value[0] = dac33->fifo_mode; |
@@ -453,7 +453,7 @@ static int dac33_get_fifo_mode(struct snd_kcontrol *kcontrol, | |||
453 | static int dac33_set_fifo_mode(struct snd_kcontrol *kcontrol, | 453 | static int dac33_set_fifo_mode(struct snd_kcontrol *kcontrol, |
454 | struct snd_ctl_elem_value *ucontrol) | 454 | struct snd_ctl_elem_value *ucontrol) |
455 | { | 455 | { |
456 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 456 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); |
457 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); | 457 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); |
458 | int ret = 0; | 458 | int ret = 0; |
459 | 459 | ||