[patch] Fix headphone automute on Asus G50Vt laptops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--- 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);
 }
 

Attachment: pgpOTrcd56Wo6.pgp
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux