From bcafb1af886f429333dcfc81f5cd82f2d48191df Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 20 Dec 2012 15:16:09 +0100 Subject: [PATCH] --- yaml --- r: 353063 b: refs/heads/master c: 973e4972f9f0fe8f854451f7559c847a8cdc8bc7 h: refs/heads/master i: 353061: b95874b5d062ff8dd73a4cb0a4186fcfc1acd582 353059: e36e89e451f4c73b314a0a7239414bc68f60e1ec 353055: 2e4087d9001b4f1922337516b9d01302f5fa45f0 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_generic.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 575e68b1eb25..65f1e8a4a6df 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fd25a97a97c78e7f09b0b3069a40bf7671654366 +refs/heads/master: 973e4972f9f0fe8f854451f7559c847a8cdc8bc7 diff --git a/trunk/sound/pci/hda/hda_generic.c b/trunk/sound/pci/hda/hda_generic.c index a5c4bc05d16f..b7b8d7eee7c6 100644 --- a/trunk/sound/pci/hda/hda_generic.c +++ b/trunk/sound/pci/hda/hda_generic.c @@ -3532,6 +3532,23 @@ static void init_digital(struct hda_codec *codec) snd_hda_set_pin_ctl(codec, pin, PIN_IN); } +/* clear unsol-event tags on unused pins; Conexant codecs seem to leave + * invalid unsol tags by some reason + */ +static void clear_unsol_on_unused_pins(struct hda_codec *codec) +{ + int i; + + for (i = 0; i < codec->init_pins.used; i++) { + struct hda_pincfg *pin = snd_array_elem(&codec->init_pins, i); + hda_nid_t nid = pin->nid; + if (is_jack_detectable(codec, nid) && + !snd_hda_jack_tbl_get(codec, nid)) + snd_hda_codec_update_cache(codec, nid, 0, + AC_VERB_SET_UNSOLICITED_ENABLE, 0); + } +} + int snd_hda_gen_init(struct hda_codec *codec) { struct hda_gen_spec *spec = codec->spec; @@ -3550,6 +3567,8 @@ int snd_hda_gen_init(struct hda_codec *codec) init_input_src(codec); init_digital(codec); + clear_unsol_on_unused_pins(codec); + /* call init functions of standard auto-mute helpers */ snd_hda_gen_hp_automute(codec, NULL); snd_hda_gen_line_automute(codec, NULL);