aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/alc5623.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/alc5623.c')
-rw-r--r--sound/soc/codecs/alc5623.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c
index bdf8c5ac8ca4..0e357996864b 100644
--- a/sound/soc/codecs/alc5623.c
+++ b/sound/soc/codecs/alc5623.c
@@ -55,18 +55,20 @@ static inline int alc5623_reset(struct snd_soc_codec *codec)
55static int amp_mixer_event(struct snd_soc_dapm_widget *w, 55static int amp_mixer_event(struct snd_soc_dapm_widget *w,
56 struct snd_kcontrol *kcontrol, int event) 56 struct snd_kcontrol *kcontrol, int event)
57{ 57{
58 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
59
58 /* to power-on/off class-d amp generators/speaker */ 60 /* to power-on/off class-d amp generators/speaker */
59 /* need to write to 'index-46h' register : */ 61 /* need to write to 'index-46h' register : */
60 /* so write index num (here 0x46) to reg 0x6a */ 62 /* so write index num (here 0x46) to reg 0x6a */
61 /* and then 0xffff/0 to reg 0x6c */ 63 /* and then 0xffff/0 to reg 0x6c */
62 snd_soc_write(w->codec, ALC5623_HID_CTRL_INDEX, 0x46); 64 snd_soc_write(codec, ALC5623_HID_CTRL_INDEX, 0x46);
63 65
64 switch (event) { 66 switch (event) {
65 case SND_SOC_DAPM_PRE_PMU: 67 case SND_SOC_DAPM_PRE_PMU:
66 snd_soc_write(w->codec, ALC5623_HID_CTRL_DATA, 0xFFFF); 68 snd_soc_write(codec, ALC5623_HID_CTRL_DATA, 0xFFFF);
67 break; 69 break;
68 case SND_SOC_DAPM_POST_PMD: 70 case SND_SOC_DAPM_POST_PMD:
69 snd_soc_write(w->codec, ALC5623_HID_CTRL_DATA, 0); 71 snd_soc_write(codec, ALC5623_HID_CTRL_DATA, 0);
70 break; 72 break;
71 } 73 }
72 74