From patchwork Tue Oct 12 11:41:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Henningsson X-Patchwork-Id: 67540 X-Patchwork-Delegate: brad.figg@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 4E3BFB70E5 for ; Tue, 12 Oct 2010 22:41:22 +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 1P5dEG-0001PV-2X; Tue, 12 Oct 2010 12:41:12 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P5dED-0001P0-PB for kernel-team@lists.ubuntu.com; Tue, 12 Oct 2010 12:41:09 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1P5dEC-0000We-3F for ; Tue, 12 Oct 2010 12:41:08 +0100 Received: from c-83-233-18-148.cust.bredband2.com ([83.233.18.148] helo=[192.168.8.104]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P5dEB-0001NU-VB for kernel-team@lists.ubuntu.com; Tue, 12 Oct 2010 12:41:08 +0100 Message-ID: <4CB44953.2020607@canonical.com> Date: Tue, 12 Oct 2010 13:41:07 +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: [Maverick SRU] (pre-stable) ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers 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: http://launchpad.net/bugs/465942 BugLink: http://launchpad.net/bugs/580749 BugLink: http://launchpad.net/bugs/587546 SRU Justification: Impact: Without the patch, crackling or suddenly disappearing audio on some laptops. Fix: Accepted into Takashi's tree today. The attached patch is a backported version for 2.6.32 and 2.6.35 trees. It has also been sent to stable@kernel.org. Testcase: Apply the patch and make sure audio is working. Testing for half an hour or so should be enough. Acked-by: Stefan Bader Acked-by: Leann Ogasawara From 693810d675f1923449d7d38893a614c975bd359c Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Mon, 4 Oct 2010 13:13:44 +0200 Subject: [PATCH] ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers BugLink: http://launchpad.net/bugs/465942 BugLink: http://launchpad.net/bugs/580749 BugLink: http://launchpad.net/bugs/587546 Position_fix quirks for specific machines now override the default position_fix behavior for all HDA controllers. Signed-off-by: David Henningsson --- sound/pci/hda/hda_intel.c | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 741ad32..51b088e 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2264,12 +2264,24 @@ static int __devinit check_position_fix(struct azx *chip, int fix) { const struct snd_pci_quirk *q; + chip->via_dmapos_patch = 0; + switch (fix) { case POS_FIX_LPIB: case POS_FIX_POSBUF: return fix; } + q = snd_pci_quirk_lookup(chip->pci, position_fix_list); + if (q) { + /* Note that this implicitly sets via_dmapos_patch to zero */ + printk(KERN_INFO + "hda_intel: position_fix set to %d " + "for device %04x:%04x\n", + q->value, q->subvendor, q->subdevice); + return q->value; + } + /* Check VIA/ATI HD Audio Controller exist */ switch (chip->driver_type) { case AZX_DRIVER_VIA: @@ -2278,16 +2290,7 @@ static int __devinit check_position_fix(struct azx *chip, int fix) /* Use link position directly, avoid any transfer problem. */ return POS_FIX_LPIB; } - chip->via_dmapos_patch = 0; - q = snd_pci_quirk_lookup(chip->pci, position_fix_list); - if (q) { - printk(KERN_INFO - "hda_intel: position_fix set to %d " - "for device %04x:%04x\n", - q->value, q->subvendor, q->subdevice); - return q->value; - } return POS_FIX_AUTO; } -- 1.7.1