From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Henningsson Subject: Re: [PATCH] ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers Date: Mon, 04 Oct 2010 13:37:48 +0200 Message-ID: <4CA9BC8C.4030809@canonical.com> References: <4CA9A951.2010604@canonical.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090100040709030507040104" Return-path: Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by alsa0.perex.cz (Postfix) with ESMTP id 50E8B24450 for ; Mon, 4 Oct 2010 13:37:46 +0200 (CEST) In-Reply-To: <4CA9A951.2010604@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Takashi Iwai , ALSA Development Mailing List , stable@kernel.org List-Id: alsa-devel@alsa-project.org This is a multi-part message in MIME format. --------------090100040709030507040104 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2010-10-04 12:15, David Henningsson wrote: > Position_fix quirks for specific machines now override the default > position_fix behavior for all HDA controllers. > > BugLink: http://launchpad.net/bugs/465942 > BugLink: http://launchpad.net/bugs/580749 > BugLink: http://launchpad.net/bugs/587546 > > Signed-off-by: David Henningsson ...and here's the version for 2.6.35 and 2.6.32 stable trees. -- David Henningsson, Canonical Ltd. http://launchpad.net/~diwic --------------090100040709030507040104 Content-Type: text/x-patch; name="0001-ALSA-HDA-Correctly-apply-position_fix-quirks-for-ATI.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-ALSA-HDA-Correctly-apply-position_fix-quirks-for-ATI.pa"; filename*1="tch" >>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 --------------090100040709030507040104 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel --------------090100040709030507040104--