Skip to content

Commit

Permalink
ASoC: twl6040: Support for AUX L/R output
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Sep 22, 2011
1 parent 45b0f60 commit fdb625f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions sound/soc/codecs/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,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",
Expand Down Expand Up @@ -1105,6 +1111,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",
Expand Down Expand Up @@ -1170,6 +1178,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",
Expand Down Expand Up @@ -1252,6 +1264,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)
Expand Down

0 comments on commit fdb625f

Please sign in to comment.