Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120285
b: refs/heads/master
c: e8ff9c4
h: refs/heads/master
i:
  120283: cc10bbf
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Dec 9, 2008
1 parent 701e19b commit 7c9f5b8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44c5587035fbbdd368a3d5d8d11997d43758078a
refs/heads/master: e8ff9c417ad6e8f7ef253e36f9d6e22dc2aa2512
24 changes: 24 additions & 0 deletions trunk/sound/soc/codecs/twl4030.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,30 @@ static void twl4030_init_chip(struct snd_soc_codec *codec)

}

static int outmixer_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
int ret = 0;
int val;

switch (e->reg) {
case TWL4030_REG_PREDL_CTL:
case TWL4030_REG_PREDR_CTL:
case TWL4030_REG_EAR_CTL:
val = w->value >> e->shift_l;
if (val == 3) {
printk(KERN_WARNING
"Invalid MUX setting for register 0x%02x (%d)\n",
e->reg, val);
ret = -1;
}
break;
}

return ret;
}

/*
* Some of the gain controls in TWL (mostly those which are associated with
* the outputs) are implemented in an interesting way:
Expand Down

0 comments on commit 7c9f5b8

Please sign in to comment.