Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230394
b: refs/heads/master
c: 8cc14e1
h: refs/heads/master
v: v3
  • Loading branch information
Peter Ujfalusi authored and Liam Girdwood committed Nov 30, 2010
1 parent 9e03e61 commit 9d3da6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 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: d534bacd918fcf0909039b95db7c090702e739d5
refs/heads/master: 8cc14e13d15ec558c880ce6eaaddf99c08f85ab6
24 changes: 5 additions & 19 deletions trunk/sound/soc/codecs/tpa6130a2.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,29 +317,15 @@ static void tpa6130a2_channel_enable(u8 channel, int enable)
}
}

static int tpa6130a2_left_event(struct snd_soc_dapm_widget *w,
static int tpa6130a2_pga_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
switch (event) {
case SND_SOC_DAPM_POST_PMU:
tpa6130a2_channel_enable(TPA6130A2_HP_EN_L, 1);
tpa6130a2_channel_enable(w->shift, 1);
break;
case SND_SOC_DAPM_POST_PMD:
tpa6130a2_channel_enable(TPA6130A2_HP_EN_L, 0);
break;
}
return 0;
}

static int tpa6130a2_right_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
switch (event) {
case SND_SOC_DAPM_POST_PMU:
tpa6130a2_channel_enable(TPA6130A2_HP_EN_R, 1);
break;
case SND_SOC_DAPM_POST_PMD:
tpa6130a2_channel_enable(TPA6130A2_HP_EN_R, 0);
tpa6130a2_channel_enable(w->shift, 0);
break;
}
return 0;
Expand All @@ -363,10 +349,10 @@ static int tpa6130a2_supply_event(struct snd_soc_dapm_widget *w,

static const struct snd_soc_dapm_widget tpa6130a2_dapm_widgets[] = {
SND_SOC_DAPM_PGA_E("TPA6130A2 Left", SND_SOC_NOPM,
0, 0, NULL, 0, tpa6130a2_left_event,
TPA6130A2_HP_EN_L, 0, NULL, 0, tpa6130a2_pga_event,
SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD),
SND_SOC_DAPM_PGA_E("TPA6130A2 Right", SND_SOC_NOPM,
0, 0, NULL, 0, tpa6130a2_right_event,
TPA6130A2_HP_EN_R, 0, NULL, 0, tpa6130a2_pga_event,
SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD),
SND_SOC_DAPM_SUPPLY("TPA6130A2 Enable", SND_SOC_NOPM,
0, 0, tpa6130a2_supply_event,
Expand Down

0 comments on commit 9d3da6d

Please sign in to comment.