From b0a7f066569d2eeba7924dc586985c39704e3015 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 8 Mar 2010 12:13:07 +0100 Subject: [PATCH] --- yaml --- r: 187855 b: refs/heads/master c: 5311114d4867113c00f78829d4ce14be458ec925 h: refs/heads/master i: 187853: df46d75bef7fde0d13aee5c4e48591a2e55f6f0f 187851: 5601fc331afc135f31195601e92b61e7dac521f4 187847: 147afbaa8ffa965af552c3adce22a88f02fe40c6 187839: aa22dd8684365c4d8701d8bff018476c15a02de7 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_realtek.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 1ccb389b6713..4ce8bbcf8bc5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 50ae0aa8f55813b2cc5e5b7f589f328b8fcd45ec +refs/heads/master: 5311114d4867113c00f78829d4ce14be458ec925 diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index dcd8a2cadd99..3a8371990d75 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -411,6 +411,8 @@ static int alc_mux_enum_info(struct snd_kcontrol *kcontrol, unsigned int mux_idx = snd_ctl_get_ioffidx(kcontrol, &uinfo->id); if (mux_idx >= spec->num_mux_defs) mux_idx = 0; + if (!spec->input_mux[mux_idx].num_items && mux_idx > 0) + mux_idx = 0; return snd_hda_input_mux_info(&spec->input_mux[mux_idx], uinfo); } @@ -439,6 +441,8 @@ static int alc_mux_enum_put(struct snd_kcontrol *kcontrol, mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx; imux = &spec->input_mux[mux_idx]; + if (!imux->num_items && mux_idx > 0) + imux = &spec->input_mux[0]; type = get_wcaps_type(get_wcaps(codec, nid)); if (type == AC_WID_AUD_MIX) { @@ -10105,6 +10109,8 @@ static void alc882_auto_init_input_src(struct hda_codec *codec) continue; mux_idx = c >= spec->num_mux_defs ? 0 : c; imux = &spec->input_mux[mux_idx]; + if (!imux->num_items && mux_idx > 0) + imux = &spec->input_mux[0]; for (idx = 0; idx < conns; idx++) { /* if the current connection is the selected one, * unmute it as default - otherwise mute it