From c9681a8c7792fe60fabd9d85e815a5abc353f379 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 27 Jun 2011 15:53:38 +0200 Subject: [PATCH] --- yaml --- r: 257715 b: refs/heads/master c: 7ec9c6ccc6007b14a916021d4ba7ffbcc7822ae3 h: refs/heads/master i: 257713: 2d1e517d39ed5f50ae672061867d1ca05f61f61e 257711: 9d0af39c987bd2449650e7fd8e1b0c093691e69b v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_realtek.c | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 144af2647455..2cee6c2fc188 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 050ea75317f33e376cc413359c0319ad5cc86e2a +refs/heads/master: 7ec9c6ccc6007b14a916021d4ba7ffbcc7822ae3 diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index 5293f7f7f425..0fefc656c6e0 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -11075,6 +11075,7 @@ static void alc882_auto_init_input_src(struct hda_codec *codec) unsigned int mux_idx; const struct hda_input_mux *imux; int conns, mute, idx, item; + unsigned int wid_type; /* mute ADC */ snd_hda_codec_write(codec, spec->adc_nids[c], 0, @@ -11088,6 +11089,7 @@ static void alc882_auto_init_input_src(struct hda_codec *codec) imux = &spec->input_mux[mux_idx]; if (!imux->num_items && mux_idx > 0) imux = &spec->input_mux[0]; + wid_type = get_wcaps_type(get_wcaps(codec, nid)); for (idx = 0; idx < conns; idx++) { /* if the current connection is the selected one, * unmute it as default - otherwise mute it @@ -11100,17 +11102,13 @@ static void alc882_auto_init_input_src(struct hda_codec *codec) break; } } - /* check if we have a selector or mixer - * we could check for the widget type instead, but - * just check for Amp-In presence (in case of mixer - * without amp-in there is something wrong, this - * function shouldn't be used or capsrc nid is wrong) - */ - if (get_wcaps(codec, nid) & AC_WCAP_IN_AMP) + /* initialize the mute status if mute-amp is present */ + if (query_amp_caps(codec, nid, HDA_INPUT) & AC_AMPCAP_MUTE) snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, mute); - else if (mute != AMP_IN_MUTE(idx)) + if (wid_type == AC_WID_AUD_SEL && + mute != AMP_IN_MUTE(idx)) snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx); @@ -13594,7 +13592,7 @@ static void alc268_auto_init_dac(struct hda_codec *codec, hda_nid_t nid) if (!nid) return; snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, - AMP_OUT_MUTE); + AMP_OUT_ZERO); } static void alc268_auto_init_multi_out(struct hda_codec *codec)