aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl4030.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/twl4030.c')
-rw-r--r--sound/soc/codecs/twl4030.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 989446dabcda..63ebd176fbe4 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -395,6 +395,10 @@ static const struct soc_enum twl4030_handsfreel_enum =
395static const struct snd_kcontrol_new twl4030_dapm_handsfreel_control = 395static const struct snd_kcontrol_new twl4030_dapm_handsfreel_control =
396SOC_DAPM_ENUM("Route", twl4030_handsfreel_enum); 396SOC_DAPM_ENUM("Route", twl4030_handsfreel_enum);
397 397
398/* Handsfree Left virtual mute */
399static const struct snd_kcontrol_new twl4030_dapm_handsfreelmute_control =
400 SOC_DAPM_SINGLE("Switch", TWL4030_REG_SW_SHADOW, 0, 1, 0);
401
398/* Handsfree Right */ 402/* Handsfree Right */
399static const char *twl4030_handsfreer_texts[] = 403static const char *twl4030_handsfreer_texts[] =
400 {"Voice", "AudioR1", "AudioR2", "AudioL2"}; 404 {"Voice", "AudioR1", "AudioR2", "AudioL2"};
@@ -407,6 +411,10 @@ static const struct soc_enum twl4030_handsfreer_enum =
407static const struct snd_kcontrol_new twl4030_dapm_handsfreer_control = 411static const struct snd_kcontrol_new twl4030_dapm_handsfreer_control =
408SOC_DAPM_ENUM("Route", twl4030_handsfreer_enum); 412SOC_DAPM_ENUM("Route", twl4030_handsfreer_enum);
409 413
414/* Handsfree Right virtual mute */
415static const struct snd_kcontrol_new twl4030_dapm_handsfreermute_control =
416 SOC_DAPM_SINGLE("Switch", TWL4030_REG_SW_SHADOW, 1, 1, 0);
417
410/* Vibra */ 418/* Vibra */
411/* Vibra audio path selection */ 419/* Vibra audio path selection */
412static const char *twl4030_vibra_texts[] = 420static const char *twl4030_vibra_texts[] =
@@ -1231,11 +1239,15 @@ static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = {
1231 /* HandsfreeL/R */ 1239 /* HandsfreeL/R */
1232 SND_SOC_DAPM_MUX("HandsfreeL Mux", SND_SOC_NOPM, 0, 0, 1240 SND_SOC_DAPM_MUX("HandsfreeL Mux", SND_SOC_NOPM, 0, 0,
1233 &twl4030_dapm_handsfreel_control), 1241 &twl4030_dapm_handsfreel_control),
1242 SND_SOC_DAPM_SWITCH("HandsfreeL Switch", SND_SOC_NOPM, 0, 0,
1243 &twl4030_dapm_handsfreelmute_control),
1234 SND_SOC_DAPM_PGA_E("HandsfreeL PGA", SND_SOC_NOPM, 1244 SND_SOC_DAPM_PGA_E("HandsfreeL PGA", SND_SOC_NOPM,
1235 0, 0, NULL, 0, handsfreelpga_event, 1245 0, 0, NULL, 0, handsfreelpga_event,
1236 SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD), 1246 SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD),
1237 SND_SOC_DAPM_MUX("HandsfreeR Mux", SND_SOC_NOPM, 5, 0, 1247 SND_SOC_DAPM_MUX("HandsfreeR Mux", SND_SOC_NOPM, 5, 0,
1238 &twl4030_dapm_handsfreer_control), 1248 &twl4030_dapm_handsfreer_control),
1249 SND_SOC_DAPM_SWITCH("HandsfreeR Switch", SND_SOC_NOPM, 0, 0,
1250 &twl4030_dapm_handsfreermute_control),
1239 SND_SOC_DAPM_PGA_E("HandsfreeR PGA", SND_SOC_NOPM, 1251 SND_SOC_DAPM_PGA_E("HandsfreeR PGA", SND_SOC_NOPM,
1240 0, 0, NULL, 0, handsfreerpga_event, 1252 0, 0, NULL, 0, handsfreerpga_event,
1241 SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD), 1253 SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD),
@@ -1346,13 +1358,15 @@ static const struct snd_soc_dapm_route intercon[] = {
1346 {"HandsfreeL Mux", "AudioL1", "Analog L1 Playback Mixer"}, 1358 {"HandsfreeL Mux", "AudioL1", "Analog L1 Playback Mixer"},
1347 {"HandsfreeL Mux", "AudioL2", "Analog L2 Playback Mixer"}, 1359 {"HandsfreeL Mux", "AudioL2", "Analog L2 Playback Mixer"},
1348 {"HandsfreeL Mux", "AudioR2", "Analog R2 Playback Mixer"}, 1360 {"HandsfreeL Mux", "AudioR2", "Analog R2 Playback Mixer"},
1349 {"HandsfreeL PGA", NULL, "HandsfreeL Mux"}, 1361 {"HandsfreeL Switch", "Switch", "HandsfreeL Mux"},
1362 {"HandsfreeL PGA", NULL, "HandsfreeL Switch"},
1350 /* HandsfreeR */ 1363 /* HandsfreeR */
1351 {"HandsfreeR Mux", "Voice", "Analog Voice Playback Mixer"}, 1364 {"HandsfreeR Mux", "Voice", "Analog Voice Playback Mixer"},
1352 {"HandsfreeR Mux", "AudioR1", "Analog R1 Playback Mixer"}, 1365 {"HandsfreeR Mux", "AudioR1", "Analog R1 Playback Mixer"},
1353 {"HandsfreeR Mux", "AudioR2", "Analog R2 Playback Mixer"}, 1366 {"HandsfreeR Mux", "AudioR2", "Analog R2 Playback Mixer"},
1354 {"HandsfreeR Mux", "AudioL2", "Analog L2 Playback Mixer"}, 1367 {"HandsfreeR Mux", "AudioL2", "Analog L2 Playback Mixer"},
1355 {"HandsfreeR PGA", NULL, "HandsfreeR Mux"}, 1368 {"HandsfreeR Switch", "Switch", "HandsfreeR Mux"},
1369 {"HandsfreeR PGA", NULL, "HandsfreeR Switch"},
1356 /* Vibra */ 1370 /* Vibra */
1357 {"Vibra Mux", "AudioL1", "DAC Left1"}, 1371 {"Vibra Mux", "AudioL1", "DAC Left1"},
1358 {"Vibra Mux", "AudioR1", "DAC Right1"}, 1372 {"Vibra Mux", "AudioR1", "DAC Right1"},