From patchwork Thu Dec 1 08:52:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Henningsson X-Patchwork-Id: 128666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 5342F1007D1 for ; Thu, 1 Dec 2011 19:52:34 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1RW2NP-0008WT-3j; Thu, 01 Dec 2011 08:52:19 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1RW2NN-0008WO-AE for kernel-team@lists.ubuntu.com; Thu, 01 Dec 2011 08:52:17 +0000 Received: from hd9483857.selulk5.dyn.perspektivbredband.net ([217.72.56.87] helo=[192.168.8.102]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1RW2NN-0006sw-7h for kernel-team@lists.ubuntu.com; Thu, 01 Dec 2011 08:52:17 +0000 Message-ID: <4ED74040.2060802@canonical.com> Date: Thu, 01 Dec 2011 09:52:16 +0100 From: David Henningsson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 To: Ubuntu Kernel Team Subject: Oneiric SRU (pre-stable): Fix Line out -> Speaker automute for Realtek X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com SRU Justification: Fixes a blocks-hwcert bug. Test case: Take the Optiplex XE machine specified here: http://bugs.launchpad.net/bugs/882693 Without this patch: - Internal Speaker is not muted when "Line Out" jack is plugged in With this patch: - Internal Speaker is muted when "Line Out" jack is plugged in Upstream status: Acked/reviewed by Takashi Iwai and on its way to 3.0 (and 3.1) stable. From d494dd1f0689328b2c9a62fa168ff774928becc6 Mon Sep 17 00:00:00 2001 From: David Henningsson 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 Signed-off-by: David Henningsson --- 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