aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_realtek.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 2a463c921ae3..777f8c01ca7a 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5227,10 +5227,14 @@ static int alc882_mux_enum_put(struct snd_kcontrol *kcontrol,
5227 const struct hda_input_mux *imux = spec->input_mux; 5227 const struct hda_input_mux *imux = spec->input_mux;
5228 unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 5228 unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
5229 static hda_nid_t capture_mixers[3] = { 0x24, 0x23, 0x22 }; 5229 static hda_nid_t capture_mixers[3] = { 0x24, 0x23, 0x22 };
5230 hda_nid_t nid = capture_mixers[adc_idx]; 5230 hda_nid_t nid;
5231 unsigned int *cur_val = &spec->cur_mux[adc_idx]; 5231 unsigned int *cur_val = &spec->cur_mux[adc_idx];
5232 unsigned int i, idx; 5232 unsigned int i, idx;
5233 5233
5234 if (spec->num_adc_nids < 3)
5235 nid = capture_mixers[adc_idx + 1];
5236 else
5237 nid = capture_mixers[adc_idx];
5234 idx = ucontrol->value.enumerated.item[0]; 5238 idx = ucontrol->value.enumerated.item[0];
5235 if (idx >= imux->num_items) 5239 if (idx >= imux->num_items)
5236 idx = imux->num_items - 1; 5240 idx = imux->num_items - 1;