All of lore.kernel.org
 help / color / mirror / Atom feed
From: Solomon Peachy <pizza@shaftnet.org>
To: alsa-devel@alsa-project.org
Subject: [patch] Fix headphone automute on Asus G50Vt laptops
Date: Fri, 23 Apr 2010 16:08:14 -0400	[thread overview]
Message-ID: <20100423200814.GA18620@shaftnet.org> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 1170 bytes --]

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.

[-- Attachment #1.1.2: asus-g50vt-headphone-2.6.28%2B.patch --]
[-- Type: text/plain, Size: 1180 bytes --]

--- 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 #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

             reply	other threads:[~2010-04-23 20:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-23 20:08 Solomon Peachy [this message]
2010-04-26 12:47 ` [patch] Fix headphone automute on Asus G50Vt laptops Takashi Iwai
2010-04-26 15:20   ` Solomon Peachy
2010-04-26 15:33     ` Takashi Iwai
2010-04-26 16:21       ` Solomon Peachy
2010-04-26 16:32         ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100423200814.GA18620@shaftnet.org \
    --to=pizza@shaftnet.org \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.