aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/ak4642.c31
-rw-r--r--sound/soc/codecs/wm8962.c2
2 files changed, 17 insertions, 16 deletions
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index 5ef70b5d27e4..278c0a0575f5 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -146,13 +146,10 @@ static const struct snd_kcontrol_new ak4642_snd_controls[] = {
146 146
147 SOC_DOUBLE_R_TLV("Digital Playback Volume", L_DVC, R_DVC, 147 SOC_DOUBLE_R_TLV("Digital Playback Volume", L_DVC, R_DVC,
148 0, 0xFF, 1, out_tlv), 148 0, 0xFF, 1, out_tlv),
149
150 SOC_SINGLE("Headphone Switch", PW_MGMT2, 6, 1, 0),
151}; 149};
152 150
153static const struct snd_kcontrol_new ak4642_hpout_mixer_controls[] = { 151static const struct snd_kcontrol_new ak4642_headphone_control =
154 SOC_DAPM_SINGLE("DACH", MD_CTL4, 0, 1, 0), 152 SOC_DAPM_SINGLE("Switch", PW_MGMT2, 6, 1, 0);
155};
156 153
157static const struct snd_kcontrol_new ak4642_lout_mixer_controls[] = { 154static const struct snd_kcontrol_new ak4642_lout_mixer_controls[] = {
158 SOC_DAPM_SINGLE("DACL", SG_SL1, 4, 1, 0), 155 SOC_DAPM_SINGLE("DACL", SG_SL1, 4, 1, 0),
@@ -165,13 +162,12 @@ static const struct snd_soc_dapm_widget ak4642_dapm_widgets[] = {
165 SND_SOC_DAPM_OUTPUT("HPOUTR"), 162 SND_SOC_DAPM_OUTPUT("HPOUTR"),
166 SND_SOC_DAPM_OUTPUT("LINEOUT"), 163 SND_SOC_DAPM_OUTPUT("LINEOUT"),
167 164
168 SND_SOC_DAPM_MIXER("HPOUTL Mixer", PW_MGMT2, 5, 0, 165 SND_SOC_DAPM_PGA("HPL Out", PW_MGMT2, 5, 0, NULL, 0),
169 &ak4642_hpout_mixer_controls[0], 166 SND_SOC_DAPM_PGA("HPR Out", PW_MGMT2, 4, 0, NULL, 0),
170 ARRAY_SIZE(ak4642_hpout_mixer_controls)), 167 SND_SOC_DAPM_SWITCH("Headphone Enable", SND_SOC_NOPM, 0, 0,
168 &ak4642_headphone_control),
171 169
172 SND_SOC_DAPM_MIXER("HPOUTR Mixer", PW_MGMT2, 4, 0, 170 SND_SOC_DAPM_PGA("DACH", MD_CTL4, 0, 0, NULL, 0),
173 &ak4642_hpout_mixer_controls[0],
174 ARRAY_SIZE(ak4642_hpout_mixer_controls)),
175 171
176 SND_SOC_DAPM_MIXER("LINEOUT Mixer", PW_MGMT1, 3, 0, 172 SND_SOC_DAPM_MIXER("LINEOUT Mixer", PW_MGMT1, 3, 0,
177 &ak4642_lout_mixer_controls[0], 173 &ak4642_lout_mixer_controls[0],
@@ -184,12 +180,17 @@ static const struct snd_soc_dapm_widget ak4642_dapm_widgets[] = {
184static const struct snd_soc_dapm_route ak4642_intercon[] = { 180static const struct snd_soc_dapm_route ak4642_intercon[] = {
185 181
186 /* Outputs */ 182 /* Outputs */
187 {"HPOUTL", NULL, "HPOUTL Mixer"}, 183 {"HPOUTL", NULL, "HPL Out"},
188 {"HPOUTR", NULL, "HPOUTR Mixer"}, 184 {"HPOUTR", NULL, "HPR Out"},
189 {"LINEOUT", NULL, "LINEOUT Mixer"}, 185 {"LINEOUT", NULL, "LINEOUT Mixer"},
190 186
191 {"HPOUTL Mixer", "DACH", "DAC"}, 187 {"HPL Out", NULL, "Headphone Enable"},
192 {"HPOUTR Mixer", "DACH", "DAC"}, 188 {"HPR Out", NULL, "Headphone Enable"},
189
190 {"Headphone Enable", "Switch", "DACH"},
191
192 {"DACH", NULL, "DAC"},
193
193 {"LINEOUT Mixer", "DACL", "DAC"}, 194 {"LINEOUT Mixer", "DACL", "DAC"},
194}; 195};
195 196
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 29c4b02c4790..0ac228b7dc04 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -2564,7 +2564,7 @@ static int dsp2_event(struct snd_soc_dapm_widget *w,
2564 return 0; 2564 return 0;
2565} 2565}
2566 2566
2567static const char *st_text[] = { "None", "Right", "Left" }; 2567static const char *st_text[] = { "None", "Left", "Right" };
2568 2568
2569static const struct soc_enum str_enum = 2569static const struct soc_enum str_enum =
2570 SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_1, 2, 3, st_text); 2570 SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_1, 2, 3, st_text);