Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270640
b: refs/heads/master
c: 317596a
h: refs/heads/master
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Sep 22, 2011
1 parent f14c70d commit 1ebf240
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d17bf31832d30b91225a84b53fae380dbdd07d3d
refs/heads/master: 317596a69453772dcba2ab1e6e041de69e762794
17 changes: 12 additions & 5 deletions trunk/sound/soc/codecs/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
#define TWL6040_REG_SW_SHADOW 0x2F
#define TWL6040_CACHEREGNUM (TWL6040_REG_SW_SHADOW + 1)

/* TWL6040_REG_SW_SHADOW (0x2F) fields */
#define TWL6040_EAR_PATH_ENABLE 0x01

struct twl6040_output {
u16 active;
u16 left_vol;
Expand Down Expand Up @@ -991,8 +994,8 @@ static const struct snd_kcontrol_new hfl_mux_controls =
static const struct snd_kcontrol_new hfr_mux_controls =
SOC_DAPM_ENUM("Route", twl6040_hf_enum[1]);

static const struct snd_kcontrol_new ep_driver_switch_controls =
SOC_DAPM_SINGLE("Switch", TWL6040_REG_EARCTL, 0, 1, 0);
static const struct snd_kcontrol_new ep_path_enable_control =
SOC_DAPM_SINGLE("Switch", TWL6040_REG_SW_SHADOW, 0, 1, 0);

/* Headset power mode */
static const char *twl6040_power_mode_texts[] = {
Expand Down Expand Up @@ -1165,6 +1168,9 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
SND_SOC_DAPM_MUX("HS Right Playback",
SND_SOC_NOPM, 0, 0, &hsr_mux_controls),

SND_SOC_DAPM_SWITCH("Earphone Playback", SND_SOC_NOPM, 0, 0,
&ep_path_enable_control),

/* Analog playback drivers */
SND_SOC_DAPM_OUT_DRV_E("Handsfree Left Driver",
TWL6040_REG_HFLCTL, 4, 0, NULL, 0,
Expand All @@ -1182,8 +1188,8 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
TWL6040_REG_HSRCTL, 2, 0, NULL, 0,
pga_event,
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
SND_SOC_DAPM_SWITCH_E("Earphone Driver",
SND_SOC_NOPM, 0, 0, &ep_driver_switch_controls,
SND_SOC_DAPM_OUT_DRV_E("Earphone Driver",
TWL6040_REG_EARCTL, 0, 0, NULL, 0,
twl6040_power_mode_event,
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),

Expand Down Expand Up @@ -1228,7 +1234,8 @@ static const struct snd_soc_dapm_route intercon[] = {
{"HSOR", NULL, "Headset Right Driver"},

/* Earphone playback path */
{"Earphone Driver", "Switch", "HSDAC Left"},
{"Earphone Playback", "Switch", "HSDAC Left"},
{"Earphone Driver", NULL, "Earphone Playback"},
{"EP", NULL, "Earphone Driver"},

{"HF Left Playback", "HF DAC", "HFDAC Left"},
Expand Down

0 comments on commit 1ebf240

Please sign in to comment.