diff options
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index dcd8a2cadd99..3a8371990d75 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -411,6 +411,8 @@ static int alc_mux_enum_info(struct snd_kcontrol *kcontrol, | |||
411 | unsigned int mux_idx = snd_ctl_get_ioffidx(kcontrol, &uinfo->id); | 411 | unsigned int mux_idx = snd_ctl_get_ioffidx(kcontrol, &uinfo->id); |
412 | if (mux_idx >= spec->num_mux_defs) | 412 | if (mux_idx >= spec->num_mux_defs) |
413 | mux_idx = 0; | 413 | mux_idx = 0; |
414 | if (!spec->input_mux[mux_idx].num_items && mux_idx > 0) | ||
415 | mux_idx = 0; | ||
414 | return snd_hda_input_mux_info(&spec->input_mux[mux_idx], uinfo); | 416 | return snd_hda_input_mux_info(&spec->input_mux[mux_idx], uinfo); |
415 | } | 417 | } |
416 | 418 | ||
@@ -439,6 +441,8 @@ static int alc_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
439 | 441 | ||
440 | mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx; | 442 | mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx; |
441 | imux = &spec->input_mux[mux_idx]; | 443 | imux = &spec->input_mux[mux_idx]; |
444 | if (!imux->num_items && mux_idx > 0) | ||
445 | imux = &spec->input_mux[0]; | ||
442 | 446 | ||
443 | type = get_wcaps_type(get_wcaps(codec, nid)); | 447 | type = get_wcaps_type(get_wcaps(codec, nid)); |
444 | if (type == AC_WID_AUD_MIX) { | 448 | if (type == AC_WID_AUD_MIX) { |
@@ -10105,6 +10109,8 @@ static void alc882_auto_init_input_src(struct hda_codec *codec) | |||
10105 | continue; | 10109 | continue; |
10106 | mux_idx = c >= spec->num_mux_defs ? 0 : c; | 10110 | mux_idx = c >= spec->num_mux_defs ? 0 : c; |
10107 | imux = &spec->input_mux[mux_idx]; | 10111 | imux = &spec->input_mux[mux_idx]; |
10112 | if (!imux->num_items && mux_idx > 0) | ||
10113 | imux = &spec->input_mux[0]; | ||
10108 | for (idx = 0; idx < conns; idx++) { | 10114 | for (idx = 0; idx < conns; idx++) { |
10109 | /* if the current connection is the selected one, | 10115 | /* if the current connection is the selected one, |
10110 | * unmute it as default - otherwise mute it | 10116 | * unmute it as default - otherwise mute it |