Patchwork [Maverick,SRU] (pre-stable) ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers

login
register
mail settings
Submitter David Henningsson
Date Oct. 12, 2010, 11:41 a.m.
Message ID <4CB44953.2020607@canonical.com>
Download mbox | patch
Permalink /patch/67540/
State Accepted
Delegated to: Brad Figg
Headers show

Comments

David Henningsson - Oct. 12, 2010, 11:41 a.m.
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.
Stefan Bader - Oct. 12, 2010, 3:06 p.m.
On 10/12/2010 01:41 PM, David Henningsson wrote:
> 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.
> 
Looks ok and is upstream (plus stable)

Acked-by: Stefan Bader <stefan.bader@canonical.com>
Leann Ogasawara - Oct. 12, 2010, 7:29 p.m.
On Tue, 2010-10-12 at 17:06 +0200, Stefan Bader wrote:
> On 10/12/2010 01:41 PM, David Henningsson wrote:
> > 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.
> > 
> Looks ok and is upstream (plus stable)
> 
> Acked-by: Stefan Bader <stefan.bader@canonical.com>

Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Steve Conklin - Oct. 18, 2010, 8:33 p.m.
On Tue, 2010-10-12 at 13:41 +0200, David Henningsson wrote:
> 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.
> 
Applied
Brad Figg - Oct. 21, 2010, 6:05 p.m.
On 10/12/2010 04:41 AM, David Henningsson wrote:
> 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.
>

Applied to Maverick master.

Patch

From 693810d675f1923449d7d38893a614c975bd359c Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
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 <david.henningsson@canonical.com>
---
 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