From: Takashi Iwai Subject: Re: When I got sound back by "kernel: hda-intel: Invalid position buffer, using LPIB read method instead."(random fallover) Date: Mon, 16 Mar 2009 08:25:25 +0100 Message-ID: References: <1237073606.25673.5.camel@localhost.localdomain> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 5B21B103814 for ; Mon, 16 Mar 2009 08:25:25 +0100 (CET) In-Reply-To: <1237073606.25673.5.camel@localhost.localdomain> 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: Emmanuel Chanel Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Sun, 15 Mar 2009 08:33:26 +0900, Emmanuel Chanel wrote: > > When I got sound back by "kernel: hda-intel: Invalid position buffer, > using LPIB read method instead."(random fallover) > > It doesn't mean succeed. Sometimes sound get back and sometimes not, at random. First off, it's no fatal error, so no big worry about it. If it's annoying, just use position_fix=1 for the time being. Looks like the position buffer read is unstable on ATI hardwares. Maybe we should use the similar workaround like VIA controller. A test patch is blow. Please give it a try and report back. thanks, Takashi --- diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 92a73e8..57166fe 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2059,26 +2059,31 @@ static int __devinit check_position_fix(struct azx *chip, int fix) { const struct snd_pci_quirk *q; - /* Check VIA HD Audio Controller exist */ - if (chip->pci->vendor == PCI_VENDOR_ID_VIA && - chip->pci->device == VIA_HDAC_DEVICE_ID) { + switch (fix) { + case POS_FIX_LPIB: + case POS_FIX_POSBUF: + return fix; + } + + /* Check VIA/ATI HD Audio Controller exist */ + switch (chip->driver_type) { + case AZX_DRIVER_VIA: + case AZX_DRIVER_ATI: chip->via_dmapos_patch = 1; /* Use link position directly, avoid any transfer problem. */ return POS_FIX_LPIB; } chip->via_dmapos_patch = 0; - if (fix == POS_FIX_AUTO) { - 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; - } + 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 fix; + return POS_FIX_AUTO; } /*