From 353109adb61051c317143ef87a73de673052e0df Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 27 Jun 2011 16:17:07 +0200 Subject: [PATCH] --- yaml --- r: 257716 b: refs/heads/master c: 4f574b7b1a1cc8aac617e938459e8f03a641e678 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_realtek.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 2cee6c2fc188..ecf735437d15 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7ec9c6ccc6007b14a916021d4ba7ffbcc7822ae3 +refs/heads/master: 4f574b7b1a1cc8aac617e938459e8f03a641e678 diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index 0fefc656c6e0..cf383ede281d 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -11078,9 +11078,16 @@ static void alc882_auto_init_input_src(struct hda_codec *codec) unsigned int wid_type; /* mute ADC */ - snd_hda_codec_write(codec, spec->adc_nids[c], 0, + if (query_amp_caps(codec, spec->adc_nids[c], HDA_INPUT) & + AC_AMPCAP_MUTE) + snd_hda_codec_write(codec, spec->adc_nids[c], 0, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)); + else if (query_amp_caps(codec, nid, HDA_OUTPUT) & + AC_AMPCAP_MUTE) + snd_hda_codec_write(codec, nid, 0, + AC_VERB_SET_AMP_GAIN_MUTE, + AMP_OUT_MUTE); conns = snd_hda_get_conn_list(codec, nid, NULL); if (conns <= 0) @@ -13580,6 +13587,8 @@ static void alc268_auto_set_output_and_unmute(struct hda_codec *codec, int idx; alc_set_pin_output(codec, nid, pin_type); + if (snd_hda_get_conn_list(codec, nid, NULL) <= 1) + return; if (nid == 0x14 || nid == 0x16) idx = 0; else @@ -13721,10 +13730,11 @@ static int alc268_parse_auto_config(struct hda_codec *codec) if (spec->kctls.list) add_mixer(spec, spec->kctls.list); - if (!spec->no_analog && spec->autocfg.speaker_pins[0] != 0x1d) + if (!spec->no_analog && spec->autocfg.speaker_pins[0] != 0x1d) { add_mixer(spec, alc268_beep_mixer); + add_verb(spec, alc268_beep_init_verbs); + } - add_verb(spec, alc268_beep_init_verbs); spec->num_mux_defs = 2; spec->input_mux = &spec->private_imux[0];