[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1316090379-30760-15-git-send-email-peter.ujfalusi@ti.com>
Date: Thu, 15 Sep 2011 15:39:36 +0300
From: Peter Ujfalusi <peter.ujfalusi@...com>
To: Samuel Ortiz <samuel.ortiz@...el.com>,
Dmitry Torokhov <dtor@...l.ru>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Liam Girdwood <lrg@...com>
Cc: alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
Misael Lopez Cruz <misael.lopez@...com>
Subject: [PATCH 14/17] 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@...com>
---
sound/soc/codecs/twl6040.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index 035803c..891b9ec 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -993,6 +993,12 @@ static const struct snd_kcontrol_new hfr_mux_controls =
static const struct snd_kcontrol_new ep_path_enable_control =
SOC_DAPM_SINGLE("Switch", TWL6040_REG_SW_SHADOW, 0, 1, 0);
+static const struct snd_kcontrol_new auxl_switch_control =
+ SOC_DAPM_SINGLE("Switch", TWL6040_REG_HFLCTL, 6, 1, 0);
+
+static const struct snd_kcontrol_new auxr_switch_control =
+ SOC_DAPM_SINGLE("Switch", TWL6040_REG_HFRCTL, 6, 1, 0);
+
/* Headset power mode */
static const char *twl6040_power_mode_texts[] = {
"Low-Power", "High-Perfomance",
@@ -1101,6 +1107,8 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
SND_SOC_DAPM_OUTPUT("HFL"),
SND_SOC_DAPM_OUTPUT("HFR"),
SND_SOC_DAPM_OUTPUT("EP"),
+ SND_SOC_DAPM_OUTPUT("AUXL"),
+ SND_SOC_DAPM_OUTPUT("AUXR"),
/* Analog input muxes for the capture amplifiers */
SND_SOC_DAPM_MUX("Analog Left Capture Route",
@@ -1166,6 +1174,10 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
SND_SOC_DAPM_SWITCH("Earphone Playback", SND_SOC_NOPM, 0, 0,
&ep_path_enable_control),
+ SND_SOC_DAPM_SWITCH("AUXL Playback", SND_SOC_NOPM, 0, 0,
+ &auxl_switch_control),
+ SND_SOC_DAPM_SWITCH("AUXR Playback", SND_SOC_NOPM, 0, 0,
+ &auxr_switch_control),
/* Analog playback drivers */
SND_SOC_DAPM_OUT_DRV_E("HF Left Driver",
@@ -1248,6 +1260,12 @@ static const struct snd_soc_dapm_route intercon[] = {
{"HFL", NULL, "HF Left Driver"},
{"HFR", NULL, "HF Right Driver"},
+
+ {"AUXL Playback", "Switch", "HF Left PGA"},
+ {"AUXR Playback", "Switch", "HF Right PGA"},
+
+ {"AUXL", NULL, "AUXL Playback"},
+ {"AUXR", NULL, "AUXR Playback"},
};
static int twl6040_add_widgets(struct snd_soc_codec *codec)
--
1.7.6.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists