aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2013-01-16 05:45:36 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-16 05:56:50 -0500
commita053d1e3c43e39109e640d1516669aeb8ce0b60b (patch)
treeabfbdd97d6e980596d443f02584e690b6958b02d /sound
parentb56fa1ed09615f148271045d220b1c55580bdfc9 (diff)
ALSA: hda - fix wrong adc_idx in generic parser
We use knew->index for adc_idx when we create "Capture Volume" and "Capture Switch", so use the same to retrieve adc_idx. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_generic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 1fa71acc348d..68947fa23400 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -2432,7 +2432,7 @@ static int mux_enum_get(struct snd_kcontrol *kcontrol,
2432{ 2432{
2433 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 2433 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
2434 struct hda_gen_spec *spec = codec->spec; 2434 struct hda_gen_spec *spec = codec->spec;
2435 unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 2435 unsigned int adc_idx = kcontrol->id.index;
2436 2436
2437 ucontrol->value.enumerated.item[0] = spec->cur_mux[adc_idx]; 2437 ucontrol->value.enumerated.item[0] = spec->cur_mux[adc_idx];
2438 return 0; 2438 return 0;
@@ -2442,7 +2442,7 @@ static int mux_enum_put(struct snd_kcontrol *kcontrol,
2442 struct snd_ctl_elem_value *ucontrol) 2442 struct snd_ctl_elem_value *ucontrol)
2443{ 2443{
2444 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 2444 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
2445 unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 2445 unsigned int adc_idx = kcontrol->id.index;
2446 return mux_select(codec, adc_idx, 2446 return mux_select(codec, adc_idx,
2447 ucontrol->value.enumerated.item[0]); 2447 ucontrol->value.enumerated.item[0]);
2448} 2448}
@@ -2474,7 +2474,7 @@ static int cap_put_caller(struct snd_kcontrol *kcontrol,
2474 int i, adc_idx, err = 0; 2474 int i, adc_idx, err = 0;
2475 2475
2476 imux = &spec->input_mux; 2476 imux = &spec->input_mux;
2477 adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 2477 adc_idx = kcontrol->id.index;
2478 mutex_lock(&codec->control_mutex); 2478 mutex_lock(&codec->control_mutex);
2479 /* we use the cache-only update at first since multiple input paths 2479 /* we use the cache-only update at first since multiple input paths
2480 * may shared the same amp; by updating only caches, the redundant 2480 * may shared the same amp; by updating only caches, the redundant