[alsa-devel] [patch] Fix headphone automute on Asus G50Vt laptops

Takashi Iwai tiwai at suse.de
Mon Apr 26 14:47:30 CEST 2010


At Fri, 23 Apr 2010 16:08:14 -0400,
Solomon Peachy wrote:
> 
> On an Asus G50Vt laptop, plugging in the headphone jack mutes the 
> internal speakers and the headphone jack too.  Unplugging the jack 
> unmutes both.  This is a regression introduced between linux 2.6.27 and 
> 2.6.28, and is still present in current alsa git sources.
> 
> The root cause is that the g50v hooks in the hda-intel/patch_reaktek 
> driver call an automute function for a different model (m51va).
> 
> This patch has been sitting in the ALSA bug tracker for more than a 
> year.  Any chance int can finally be applied?
> 
> 	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4468
> 	https://bugtrack.alsa-project.org/alsa-bug/file_download.php?file_id=2913&type=bug
> 
> Even with this patch applied, there's still a secondary problem of the 
> master 'mute' toggling both headphone and speaker outputs (I'm still 
> poking around with hda_analyzer to figure out why) but even that's a 
> vast improvement over no sound output at all when something's plugged 
> in.

Thanks for the patch.

The problem is that you change the amp of pin 0x14 while the Speaker
mixer element also changes it.  That's why changing Master unmutes
again.

What about the patch below instead?  This fixes the init verbs and
sets the headphone DAC properly so that the speaker can be muted
independently via the widget 0x0c.

Also, please give alsa-info.sh output (run with --no-upload option) so
that I can check with hda-emu.


thanks,

Takashi

---
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 2078a1a..3b38ddc 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -17277,7 +17277,8 @@ static struct hda_verb alc663_g71v_init_verbs[] = {
 static struct hda_verb alc663_g50v_init_verbs[] = {
 	{0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
 	{0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
-	{0x21, AC_VERB_SET_CONNECT_SEL, 0x00},	/* Headphone */
+	{0x21, AC_VERB_SET_CONNECT_SEL, 0x01},	/* 0x0d -> HP */
+	{0x14, AC_VERB_SET_CONNECT_SEL, 0x00},	/* 0x0c -> SPK */
 
 	{0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
 	{0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
@@ -18137,8 +18138,9 @@ static struct alc_config_preset alc662_presets[] = {
 	[ALC663_ASUS_G50V] = {
 		.mixers = { alc663_g50v_mixer },
 		.init_verbs = { alc662_init_verbs, alc663_g50v_init_verbs },
-		.num_dacs = ARRAY_SIZE(alc662_dac_nids),
+		.num_dacs = 1,
 		.dac_nids = alc662_dac_nids,
+		.hp_nid = 0x03,
 		.dig_out_nid = ALC662_DIGOUT_NID,
 		.num_channel_mode = ARRAY_SIZE(alc662_3ST_6ch_modes),
 		.channel_mode = alc662_3ST_6ch_modes,


More information about the Alsa-devel mailing list