From b2095754bbcd099ab44476bd1b37bb0b6da4921a Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 18 Jan 2013 16:23:25 +0100 Subject: [PATCH] --- yaml --- r: 353185 b: refs/heads/master c: 2a8d53916b9cea3eac615f0bb1e7fabec3d5c026 h: refs/heads/master i: 353183: a29ffcf413dd6bcca984ad51b9f2c1ef1d64813f v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_generic.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index f0a5e4cc3d2f..fb33ac82442b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3f25dcf691ebf45924a34b9aaedec78e5a255798 +refs/heads/master: 2a8d53916b9cea3eac615f0bb1e7fabec3d5c026 diff --git a/trunk/sound/pci/hda/hda_generic.c b/trunk/sound/pci/hda/hda_generic.c index e4e71fa8d87c..29f37c90225d 100644 --- a/trunk/sound/pci/hda/hda_generic.c +++ b/trunk/sound/pci/hda/hda_generic.c @@ -2675,7 +2675,8 @@ static int mux_enum_get(struct snd_kcontrol *kcontrol, { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct hda_gen_spec *spec = codec->spec; - unsigned int adc_idx = kcontrol->id.index; + /* the ctls are created at once with multiple counts */ + unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); ucontrol->value.enumerated.item[0] = spec->cur_mux[adc_idx]; return 0; @@ -2685,7 +2686,7 @@ static int mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); - unsigned int adc_idx = kcontrol->id.index; + unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); return mux_select(codec, adc_idx, ucontrol->value.enumerated.item[0]); }