From patchwork Thu Oct 7 08:37:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Henningsson X-Patchwork-Id: 67011 X-Patchwork-Delegate: leann.ogasawara@canonical.com 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 10E17B70D2 for ; Thu, 7 Oct 2010 19:37:44 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P3lyq-0002vP-D2; Thu, 07 Oct 2010 09:37:36 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P3lyp-0002vK-HX for kernel-team@lists.ubuntu.com; Thu, 07 Oct 2010 09:37:35 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1P3lyp-0004Pj-79 for ; Thu, 07 Oct 2010 09:37:35 +0100 Received: from c-83-233-18-148.cust.bredband2.com ([83.233.18.148] helo=[192.168.8.102]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P3lyo-0001Te-QE for kernel-team@lists.ubuntu.com; Thu, 07 Oct 2010 09:37:35 +0100 Message-ID: <4CAD86CE.10604@canonical.com> Date: Thu, 07 Oct 2010 10:37:34 +0200 From: David Henningsson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100922 Thunderbird/3.1.4 MIME-Version: 1.0 To: kernel-team@lists.ubuntu.com Subject: [Lucid][Pull request] (upstream) SRU ALSA: hda - Apply ALC269 VAIO fix-up to all Sony laptops with ALC269 References: <4CAD8048.2050606@canonical.com> In-Reply-To: <4CAD8048.2050606@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 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 BugLink: https://launchpad.net/bugs/655386 BugLink: https://launchpad.net/bugs/546769 BugLink: https://launchpad.net/bugs/648871 BugLink: https://launchpad.net/bugs/642892 BugLink: https://launchpad.net/bugs/637291 BugLink: https://launchpad.net/bugs/637291 BugLink: https://launchpad.net/bugs/598938 SRU Justification (and if that was needed for the Maverick one as well - the same applies there): Impact: Playback and/or recording not working on several new Sony Vaios. Some report very faint sound, others no sound at all. I guess we get at least one bug a week for Lucid on these machines. Fix: Add fixup verbs to send to the codec. Testcase: We ask users to install the latest snapshot, they report back and it has fixed their problem. Regression potential: very low as it only affects Sony Vaios with the ALC269 chip. This Lucid version of the patch also piggybacks a fix for Dell Inspiron M101z, which is already in Maverick. Acked-by: Steve Conklin From 5b933467577052f5703a9fc8da5d5f4e4e7d8600 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Thu, 7 Oct 2010 10:26:41 +0200 Subject: [PATCH] Backport ALC269 fixup verbs for sony vaio and Dell m101z Signed-off-by: David Henningsson --- sound/pci/hda/patch_realtek.c | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 06c118c..e196efb 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -13565,6 +13565,35 @@ static struct alc_config_preset alc269_presets[] = { }, }; +enum { + ALC269_FIXUP_SONY_VAIO, + ALC269_FIXUP_DELL_M101Z, +}; + +static const struct alc_fixup alc269_fixups[] = { + [ALC269_FIXUP_SONY_VAIO] = { + .verbs = (const struct hda_verb[]) { + {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREFGRD}, + {} + } + }, + [ALC269_FIXUP_DELL_M101Z] = { + .verbs = (const struct hda_verb[]) { + /* Enables internal speaker */ + {0x20, AC_VERB_SET_COEF_INDEX, 13}, + {0x20, AC_VERB_SET_PROC_COEF, 0x4040}, + {} + } + }, +}; + +static struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), + SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), + {} +}; + + static int patch_alc269(struct hda_codec *codec) { struct alc_spec *spec; @@ -13589,6 +13618,9 @@ static int patch_alc269(struct hda_codec *codec) board_config = ALC269_AUTO; } + if (board_config == ALC269_AUTO) + alc_pick_fixup(codec, alc269_fixup_tbl, alc269_fixups, 1); + if (board_config == ALC269_AUTO) { /* automatic parse from the BIOS config */ err = alc269_parse_auto_config(codec); @@ -13632,6 +13664,9 @@ static int patch_alc269(struct hda_codec *codec) set_capture_mixer(codec); set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); + if (board_config == ALC269_AUTO) + alc_pick_fixup(codec, alc269_fixup_tbl, alc269_fixups, 0); + spec->vmaster_nid = 0x02; codec->patch_ops = alc_patch_ops; -- 1.7.1