From ebc7a406633acefc6d12c1ccc9441bfef69e0f33 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 20 May 2008 09:23:05 +0200 Subject: [ALSA] hda - Fix ALC262 fujitsu model Fixed the speaker auto-mute with two laptop and docking headphones. Signed-off-by: Takashi Iwai Acked-by: Tony Vroon --- sound/pci/hda/patch_realtek.c | 46 ++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 18 deletions(-) (limited to 'sound/pci/hda/patch_realtek.c') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6d4df45e81e0..ad2763c86bf5 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -8757,35 +8757,39 @@ static struct hda_input_mux alc262_HP_D7000_capture_source = { }, }; -/* mute/unmute internal speaker according to the hp jack and mute state */ +/* mute/unmute internal speaker according to the hp jacks and mute state */ static void alc262_fujitsu_automute(struct hda_codec *codec, int force) { struct alc_spec *spec = codec->spec; unsigned int mute; if (force || !spec->sense_updated) { - unsigned int present_int_hp, present_dock_hp; + unsigned int present; /* need to execute and sync at first */ snd_hda_codec_read(codec, 0x14, 0, AC_VERB_SET_PIN_SENSE, 0); - present_int_hp = snd_hda_codec_read(codec, 0x14, 0, - AC_VERB_GET_PIN_SENSE, 0); - snd_hda_codec_read(codec, 0x1B, 0, AC_VERB_SET_PIN_SENSE, 0); - present_dock_hp = snd_hda_codec_read(codec, 0x1b, 0, - AC_VERB_GET_PIN_SENSE, 0); - spec->jack_present = (present_int_hp & 0x80000000) != 0; - spec->jack_present |= (present_dock_hp & 0x80000000) != 0; + /* check laptop HP jack */ + present = snd_hda_codec_read(codec, 0x14, 0, + AC_VERB_GET_PIN_SENSE, 0); + /* need to execute and sync at first */ + snd_hda_codec_read(codec, 0x1b, 0, AC_VERB_SET_PIN_SENSE, 0); + /* check docking HP jack */ + present |= snd_hda_codec_read(codec, 0x1b, 0, + AC_VERB_GET_PIN_SENSE, 0); + if (present & AC_PINSENSE_PRESENCE) + spec->jack_present = 1; + else + spec->jack_present = 0; spec->sense_updated = 1; } - if (spec->jack_present) { - /* mute internal speaker */ - snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, - HDA_AMP_MUTE, HDA_AMP_MUTE); - } else { - /* unmute internal speaker if necessary */ + /* unmute internal speaker only if both HPs are unplugged and + * master switch is on + */ + if (spec->jack_present) + mute = HDA_AMP_MUTE; + else mute = snd_hda_codec_amp_read(codec, 0x14, 0, HDA_OUTPUT, 0); - snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, - HDA_AMP_MUTE, mute); - } + snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, + HDA_AMP_MUTE, mute); } /* unsolicited event for HP jack sensing */ @@ -8797,6 +8801,11 @@ static void alc262_fujitsu_unsol_event(struct hda_codec *codec, alc262_fujitsu_automute(codec, 1); } +static void alc262_fujitsu_init_hook(struct hda_codec *codec) +{ + alc262_fujitsu_automute(codec, 1); +} + /* bind volumes of both NID 0x0c and 0x0d */ static struct hda_bind_ctls alc262_fujitsu_bind_master_vol = { .ops = &snd_hda_bind_vol, @@ -9570,6 +9579,7 @@ static struct alc_config_preset alc262_presets[] = { .channel_mode = alc262_modes, .input_mux = &alc262_fujitsu_capture_source, .unsol_event = alc262_fujitsu_unsol_event, + .init_hook = alc262_fujitsu_init_hook, }, [ALC262_HP_BPC] = { .mixers = { alc262_HP_BPC_mixer }, -- cgit v1.2.3 From 186c3117f8aac0b2ac5290aaed254fcfdcc937de Mon Sep 17 00:00:00 2001 From: Travis Place Date: Tue, 20 May 2008 11:54:41 +0200 Subject: [ALSA] hda - Fix ASUS P5GD1 model Corrected the model assignment for the ASUS P5GD1 w/SPDIF after reports of surround sound not being possible. Signed-off-by: Travis Place Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci/hda/patch_realtek.c') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ad2763c86bf5..864b2f598c38 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2981,7 +2981,7 @@ static struct snd_pci_quirk alc880_cfg_tbl[] = { /* SND_PCI_QUIRK(0x1043, 0x1964, "ASUS", ALC880_ASUS_DIG), */ SND_PCI_QUIRK(0x1043, 0x1973, "ASUS", ALC880_ASUS_DIG), SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS", ALC880_ASUS_DIG), - SND_PCI_QUIRK(0x1043, 0x814e, "ASUS", ALC880_ASUS), + SND_PCI_QUIRK(0x1043, 0x814e, "ASUS P5GD1 w/SPDIF", ALC880_6ST_DIG), SND_PCI_QUIRK(0x1043, 0x8181, "ASUS P4GPL", ALC880_ASUS_DIG), SND_PCI_QUIRK(0x1043, 0x8196, "ASUS P5GD1", ALC880_6ST), SND_PCI_QUIRK(0x1043, 0x81b4, "ASUS", ALC880_6ST), -- cgit v1.2.3 From 20a3a05dd66ad0f678a587688cc85f0b36869876 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 23 May 2008 17:52:53 +0200 Subject: [ALSA] hda - Fix COEF and EAPD in ALC889 auto-configuration mode Fix the missing COEF and EAPD initialization in ALC889 auto-configuration mode. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/pci/hda/patch_realtek.c') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 864b2f598c38..d42864a19893 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -853,6 +853,7 @@ do_sku: case 0x10ec0269: case 0x10ec0862: case 0x10ec0662: + case 0x10ec0889: snd_hda_codec_write(codec, 0x14, 0, AC_VERB_SET_EAPD_BTLENABLE, 2); snd_hda_codec_write(codec, 0x15, 0, @@ -877,6 +878,7 @@ do_sku: case 0x10ec0883: case 0x10ec0885: case 0x10ec0888: + case 0x10ec0889: snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 7); tmp = snd_hda_codec_read(codec, 0x20, 0, -- cgit v1.2.3 From 97ec710cab76f90a6bece76a04e76aa50096a470 Mon Sep 17 00:00:00 2001 From: Travis Place Date: Fri, 23 May 2008 18:31:46 +0200 Subject: [ALSA] hda - Added support for Foxconn P35AX-S mainboard Added IDs for the Foxconn P35AX-S mainboard to patch_realtek.c, so that ALC883_6ST_DIG is used by default. Signed-off-by: Travis Place Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/pci/hda/patch_realtek.c') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index d42864a19893..8f31247c52bd 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7745,6 +7745,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), + SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), -- cgit v1.2.3 From 07bc76dfa19b10017b518dd9aa1b2719e8c863de Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 3 Jun 2008 14:46:34 +0200 Subject: [ALSA] hda - Fix resume of auto-config mode with Realtek codecs The auto-config mode of Realtek ALC codecs has a bug since 2.6.25 that it cannot resume properly. The problem was the wrong assignment of init_hook that overrides the whole initialization. Relevant bug reports: http://bugzilla.kernel.org/show_bug.cgi?id=10662 https://bugzilla.novell.com/show_bug.cgi?id=385473 Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sound/pci/hda/patch_realtek.c') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8f31247c52bd..f46df68cd5b0 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -942,7 +942,6 @@ do_sku: AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT); spec->unsol_event = alc_sku_unsol_event; - spec->init_hook = alc_sku_automute; } /* -- cgit v1.2.3 From 378bd6a5211f05d6d8eb3e78a92e2a197e456e4e Mon Sep 17 00:00:00 2001 From: Tony Vroon Date: Wed, 4 Jun 2008 12:08:30 +0200 Subject: [ALSA] hda - COMPAL IFL90/JFL-92 laptop quirk Use quirk table to assign ALC268_TOSHIBA to COMPAL IFL90/JFL-92 laptops. No analog output on autoprobe. Signed-off-by: Tony Vroon Tested-by: Guri Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/pci/hda/patch_realtek.c') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f46df68cd5b0..518b7cab5102 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10512,6 +10512,7 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = { SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA), SND_PCI_QUIRK(0x1179, 0xff50, "TOSHIBA A305", ALC268_TOSHIBA), + SND_PCI_QUIRK(0x14c0, 0x0025, "COMPAL IFL90/JFL-92", ALC268_TOSHIBA), SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER), SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1), SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO), -- cgit v1.2.3 From 7b1e8795ebfe1705153d1001f2a899119f4d9012 Mon Sep 17 00:00:00 2001 From: Akio Idehara Date: Mon, 9 Jun 2008 22:46:07 +0900 Subject: [ALSA] hda - Fix "alc262_sony_unsol[]" hda_verb array I think that hda_verb array must have "terminator (empty array)". But alc262_sony_unsol[] does not have it. And it causes gcc-4.3's buggy behavior with snd_hda_sequence_write(). Signed-off-by: Akio Idehara Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/pci/hda/patch_realtek.c') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 518b7cab5102..b0a2a262ece2 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -8642,6 +8642,7 @@ static struct hda_verb alc262_sony_unsol_verbs[] = { {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, + {} }; /* mute/unmute internal speaker according to the hp jack and mute state */ -- cgit v1.2.3