aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl6040.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-09-22 04:05:52 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-22 12:20:22 -0400
commitfdb625ffd26cc3f6bd171fa61854083540bc28f8 (patch)
treed00a2ca15ec206b1a4acd1358591f3fe5205ca49 /sound/soc/codecs/twl6040.c
parent45b0f60de2525dc29ee309eccdf3d9a64260d83d (diff)
ASoC: twl6040: Support for AUX L/R output
AUX L/R outputs can be driver from the Handsfree PGA output. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/twl6040.c')
-rw-r--r--sound/soc/codecs/twl6040.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index fffd7ff8261a..3908b88dd10a 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -997,6 +997,12 @@ static const struct snd_kcontrol_new hfr_mux_controls =
997static const struct snd_kcontrol_new ep_path_enable_control = 997static const struct snd_kcontrol_new ep_path_enable_control =
998 SOC_DAPM_SINGLE("Switch", TWL6040_REG_SW_SHADOW, 0, 1, 0); 998 SOC_DAPM_SINGLE("Switch", TWL6040_REG_SW_SHADOW, 0, 1, 0);
999 999
1000static const struct snd_kcontrol_new auxl_switch_control =
1001 SOC_DAPM_SINGLE("Switch", TWL6040_REG_HFLCTL, 6, 1, 0);
1002
1003static const struct snd_kcontrol_new auxr_switch_control =
1004 SOC_DAPM_SINGLE("Switch", TWL6040_REG_HFRCTL, 6, 1, 0);
1005
1000/* Headset power mode */ 1006/* Headset power mode */
1001static const char *twl6040_power_mode_texts[] = { 1007static const char *twl6040_power_mode_texts[] = {
1002 "Low-Power", "High-Perfomance", 1008 "Low-Power", "High-Perfomance",
@@ -1105,6 +1111,8 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
1105 SND_SOC_DAPM_OUTPUT("HFL"), 1111 SND_SOC_DAPM_OUTPUT("HFL"),
1106 SND_SOC_DAPM_OUTPUT("HFR"), 1112 SND_SOC_DAPM_OUTPUT("HFR"),
1107 SND_SOC_DAPM_OUTPUT("EP"), 1113 SND_SOC_DAPM_OUTPUT("EP"),
1114 SND_SOC_DAPM_OUTPUT("AUXL"),
1115 SND_SOC_DAPM_OUTPUT("AUXR"),
1108 1116
1109 /* Analog input muxes for the capture amplifiers */ 1117 /* Analog input muxes for the capture amplifiers */
1110 SND_SOC_DAPM_MUX("Analog Left Capture Route", 1118 SND_SOC_DAPM_MUX("Analog Left Capture Route",
@@ -1170,6 +1178,10 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
1170 1178
1171 SND_SOC_DAPM_SWITCH("Earphone Playback", SND_SOC_NOPM, 0, 0, 1179 SND_SOC_DAPM_SWITCH("Earphone Playback", SND_SOC_NOPM, 0, 0,
1172 &ep_path_enable_control), 1180 &ep_path_enable_control),
1181 SND_SOC_DAPM_SWITCH("AUXL Playback", SND_SOC_NOPM, 0, 0,
1182 &auxl_switch_control),
1183 SND_SOC_DAPM_SWITCH("AUXR Playback", SND_SOC_NOPM, 0, 0,
1184 &auxr_switch_control),
1173 1185
1174 /* Analog playback drivers */ 1186 /* Analog playback drivers */
1175 SND_SOC_DAPM_OUT_DRV_E("HF Left Driver", 1187 SND_SOC_DAPM_OUT_DRV_E("HF Left Driver",
@@ -1252,6 +1264,12 @@ static const struct snd_soc_dapm_route intercon[] = {
1252 1264
1253 {"HFL", NULL, "HF Left Driver"}, 1265 {"HFL", NULL, "HF Left Driver"},
1254 {"HFR", NULL, "HF Right Driver"}, 1266 {"HFR", NULL, "HF Right Driver"},
1267
1268 {"AUXL Playback", "Switch", "HF Left PGA"},
1269 {"AUXR Playback", "Switch", "HF Right PGA"},
1270
1271 {"AUXL", NULL, "AUXL Playback"},
1272 {"AUXR", NULL, "AUXR Playback"},
1255}; 1273};
1256 1274
1257static int twl6040_add_widgets(struct snd_soc_codec *codec) 1275static int twl6040_add_widgets(struct snd_soc_codec *codec)