|
@@ -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:
|