>From efd242d85a0178b121929d10ca4412d41ccd723c Mon Sep 17 00:00:00 2001 From: Daniel Chen <[EMAIL PROTECTED]> Date: Sun, 15 Apr 2007 02:53:44 -0400 Subject: [PATCH] Revert "UBUNTU: sound/pci/hda/: Add (un)muting for jack sense on Lenovo 3000 N100 (patch_analog.c)"
This reverts commit 7c726dbd0d2dd4237d9a4c9a64c41821956d8901. Numerous people are reporting that the above commit breaks jack sense on newer AD1986A, so revert the commit for feisty to avoid a regression from dapper. Closes LP: #105582 Reopens LP: #94566 Tested and verified in #ubuntu+1/Freenode on Sun Apr 15, 2007. Signed-off-by: Daniel T Chen <[EMAIL PROTECTED]> --- sound/pci/hda/patch_analog.c | 52 +---------------------------------------- 1 files changed, 2 insertions(+), 50 deletions(-) diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index cb85536..b200693 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -615,62 +615,18 @@ static int ad1986a_laptop_master_sw_put(struct snd_kcontrol *kcontrol, struct hda_codec *codec = snd_kcontrol_chip(kcontrol); long *valp = ucontrol->value.integer.value; int change; - unsigned int present; - - present = snd_hda_codec_read(codec, 0x1a, 0, - AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; change = snd_hda_codec_amp_update(codec, 0x1a, 0, HDA_OUTPUT, 0, 0x80, valp[0] ? 0 : 0x80); change |= snd_hda_codec_amp_update(codec, 0x1a, 1, HDA_OUTPUT, 0, 0x80, valp[1] ? 0 : 0x80); snd_hda_codec_amp_update(codec, 0x1b, 0, HDA_OUTPUT, 0, - 0x80, (valp[0] && present) ? 0 : 0x80); + 0x80, valp[0] ? 0 : 0x80); snd_hda_codec_amp_update(codec, 0x1b, 1, HDA_OUTPUT, 0, - 0x80, (valp[1] && present) ? 0 : 0x80); + 0x80, valp[1] ? 0 : 0x80); return change; } -/* mute internal speakers if HP is plugged */ -static void ad1986a_laptop_eapd_automute(struct hda_codec *codec) -{ - unsigned int present, sw; - - present = snd_hda_codec_read(codec, 0x1a, 0, - AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; - - /* - * TODO: get kcontrol value for "Master Playback Switch" and - * enable Line-Out only if (present && sw), where sw means "unmute" - * - * Currently the Line-Out is unmuted when we unplug HP jack, even if we - * asked to mute Master Volume. - */ - sw = 1; - - /* Line-Out */ - snd_hda_codec_amp_update(codec, 0x1b, 0, HDA_OUTPUT, 0, - 0x80, (present && sw) ? 0 : 0x80); - snd_hda_codec_amp_update(codec, 0x1b, 1, HDA_OUTPUT, 0, - 0x80, (present && sw) ? 0 : 0x80); -} - -/* unsolicited event for HP jack sensing */ -static void ad1986a_laptop_eapd_unsol_event(struct hda_codec *codec, - unsigned int res) -{ - ad1986a_laptop_eapd_automute(codec); -} - -/* initialize jack-sensing, too */ -static int ad1986a_laptop_eapd_init(struct hda_codec *codec) -{ - ad198x_init(codec); - ad1986a_laptop_eapd_automute(codec); - return 0; -} - - static struct hda_input_mux ad1986a_laptop_eapd_capture_source = { .num_items = 3, .items = { @@ -780,7 +736,6 @@ static struct hda_verb ad1986a_init_verbs[] = { {0x22, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, {0x24, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, - {0x1a, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN}, { } /* end */ }; @@ -964,9 +919,6 @@ static int patch_ad1986a(struct hda_codec *codec) spec->multiout.dac_nids = ad1986a_laptop_dac_nids; spec->multiout.dig_out_nid = 0; spec->input_mux = &ad1986a_laptop_eapd_capture_source; -/* add some ad1986a specific operations */ - codec->patch_ops.init = ad1986a_laptop_eapd_init; - codec->patch_ops.unsol_event = ad1986a_laptop_eapd_unsol_event; break; case AD1986A_ULTRA: spec->mixers[0] = ad1986a_laptop_eapd_mixers; -- 1.4.4.2 -- Daniel T. Chen [EMAIL PROTECTED] GPG key: 0xC88ABDA3 -- sound inaudible for certain ASUS laptops using AD1986* HDA codec(s) https://bugs.launchpad.net/bugs/105582 You received this bug notification because you are a member of Ubuntu Bugs, which is the bug contact for Ubuntu. -- ubuntu-bugs mailing list [EMAIL PROTECTED] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs