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

Solomon Peachy pizza at shaftnet.org
Fri Apr 23 22:08:14 CEST 2010


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!

 - Solomon
-- 
Solomon Peachy        		       pizza at shaftnet dot org	 
Melbourne, FL                          ^^ (mail/jabber/gtalk) ^^
Quidquid latine dictum sit, altum viditur.
-------------- next part --------------
--- linux/sound/pci/hda/patch_realtek.c	2009-01-28 03:19:47.000000000 -0800
+++ linux/sound/pci/hda/patch_realtek.c	2009-01-28 03:20:12.000000000 -0800
@@ -15421,6 +15421,19 @@
 				AMP_IN_MUTE(0), bits);
 }
 
+static void alc663_g50v_speaker_automute(struct hda_codec *codec)
+{
+    unsigned int present;
+    unsigned char bits;
+
+    present = snd_hda_codec_read(codec, 0x21, 0,
+                     AC_VERB_GET_PIN_SENSE, 0)
+        & AC_PINSENSE_PRESENCE;
+    bits = present ? HDA_AMP_MUTE : 0;
+    snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
+                 HDA_AMP_MUTE, bits);
+}
+
 static void alc663_21jd_two_speaker_automute(struct hda_codec *codec)
 {
 	unsigned int present;
@@ -15723,7 +15736,7 @@
 {
 	switch (res >> 26) {
 	case ALC880_HP_EVENT:
-		alc663_m51va_speaker_automute(codec);
+		alc663_g50v_speaker_automute(codec);
 		break;
 	case ALC880_MIC_EVENT:
 		alc662_eeepc_mic_automute(codec);
@@ -15733,7 +15746,7 @@
 
 static void alc663_g50v_inithook(struct hda_codec *codec)
 {
-	alc663_m51va_speaker_automute(codec);
+	alc663_g50v_speaker_automute(codec);
 	alc662_eeepc_mic_automute(codec);
 }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20100423/93827273/attachment.sig 


More information about the Alsa-devel mailing list