diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-15 06:52:09 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-15 06:57:06 -0500 |
commit | 0bb043f523f1c226c05f8d919407fb07b1578884 (patch) | |
tree | 7fa8db294a92733bf67761cbbc2b3bec777ffc83 | |
parent | a50d761f6d5ea360515dd425ef08a54d3b3836ba (diff) |
ASoC: alc5632: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/alc5632.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c index d1fdbc266631..dd012c7b2d2c 100644 --- a/sound/soc/codecs/alc5632.c +++ b/sound/soc/codecs/alc5632.c | |||
@@ -116,18 +116,20 @@ static inline int alc5632_reset(struct regmap *map) | |||
116 | static int amp_mixer_event(struct snd_soc_dapm_widget *w, | 116 | static int amp_mixer_event(struct snd_soc_dapm_widget *w, |
117 | struct snd_kcontrol *kcontrol, int event) | 117 | struct snd_kcontrol *kcontrol, int event) |
118 | { | 118 | { |
119 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); | ||
120 | |||
119 | /* to power-on/off class-d amp generators/speaker */ | 121 | /* to power-on/off class-d amp generators/speaker */ |
120 | /* need to write to 'index-46h' register : */ | 122 | /* need to write to 'index-46h' register : */ |
121 | /* so write index num (here 0x46) to reg 0x6a */ | 123 | /* so write index num (here 0x46) to reg 0x6a */ |
122 | /* and then 0xffff/0 to reg 0x6c */ | 124 | /* and then 0xffff/0 to reg 0x6c */ |
123 | snd_soc_write(w->codec, ALC5632_HID_CTRL_INDEX, 0x46); | 125 | snd_soc_write(codec, ALC5632_HID_CTRL_INDEX, 0x46); |
124 | 126 | ||
125 | switch (event) { | 127 | switch (event) { |
126 | case SND_SOC_DAPM_PRE_PMU: | 128 | case SND_SOC_DAPM_PRE_PMU: |
127 | snd_soc_write(w->codec, ALC5632_HID_CTRL_DATA, 0xFFFF); | 129 | snd_soc_write(codec, ALC5632_HID_CTRL_DATA, 0xFFFF); |
128 | break; | 130 | break; |
129 | case SND_SOC_DAPM_POST_PMD: | 131 | case SND_SOC_DAPM_POST_PMD: |
130 | snd_soc_write(w->codec, ALC5632_HID_CTRL_DATA, 0); | 132 | snd_soc_write(codec, ALC5632_HID_CTRL_DATA, 0); |
131 | break; | 133 | break; |
132 | } | 134 | } |
133 | 135 | ||