All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>,
	ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	stable@kernel.org
Subject: [PATCH] ALSA: HDA: Fix Realtek automute Line Out -> Internal Speaker
Date: Thu, 01 Dec 2011 07:48:35 +0100	[thread overview]
Message-ID: <4ED72343.4060002@canonical.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

This patch is a fixup for 3.0 and 3.1 only - 3.2 has a refactored 
automute for Realtek.

Takashi, could you ack this patch? I think Greg usually wants that 
before applying.

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic

[-- Attachment #2: 0001-ALSA-HDA-Fix-Realtek-automute-Line-Out-Internal-Spea.patch --]
[-- Type: text/x-patch, Size: 1621 bytes --]

>From d494dd1f0689328b2c9a62fa168ff774928becc6 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Tue, 29 Nov 2011 09:19:45 +0100
Subject: [PATCH] ALSA: HDA: Fix Realtek automute Line Out -> Internal Speaker

In kernels 3.0 and 3.1, no automute control was created unless
Headphone pins were present. This patch enables automute for the
case where there are just Line Out and Speaker pins.

BugLink: http://bugs.launchpad.net/bugs/882693
Cc: stable@kernel.org (3.0 and 3.1)
Tested-by: Marc Legris <marc.legris@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 sound/pci/hda/patch_realtek.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index e7dc034..c85ce60 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1605,7 +1605,7 @@ static void alc_init_auto_hp(struct hda_codec *codec)
 		spec->automute = 1;
 		spec->automute_mode = ALC_AUTOMUTE_PIN;
 	}
-	if (spec->automute && cfg->line_out_pins[0] &&
+	if (cfg->line_out_pins[0] &&
 	    cfg->speaker_pins[0] &&
 	    cfg->line_out_pins[0] != cfg->hp_pins[0] &&
 	    cfg->line_out_pins[0] != cfg->speaker_pins[0]) {
@@ -1619,6 +1619,10 @@ static void alc_init_auto_hp(struct hda_codec *codec)
 					AC_VERB_SET_UNSOLICITED_ENABLE,
 					AC_USRSP_EN | ALC880_FRONT_EVENT);
 			spec->detect_line = 1;
+			if (!spec->automute) {
+				spec->automute = 1;
+				spec->automute_mode = ALC_AUTOMUTE_PIN;
+			}
 		}
 		spec->automute_lines = spec->detect_line;
 	}
-- 
1.7.5.4


[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



             reply	other threads:[~2011-12-01  6:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01  6:48 David Henningsson [this message]
2011-12-01  7:50 ` [PATCH] ALSA: HDA: Fix Realtek automute Line Out -> Internal Speaker 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=4ED72343.4060002@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=stable@kernel.org \
    --cc=tiwai@suse.de \
    /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.