提交 c673ba1c 编写于 作者: T Takashi Iwai

ALSA: hda - Workaround for buggy DMA position on ATI controllers

The position-buffer on ATI controllers are unreliable as well as
on VIA chips, thus the same workaround for DMA position reading as
VIA is useful for ATI.

Cc: <stable@kernel.org>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 09240cf4
...@@ -2059,26 +2059,31 @@ static int __devinit check_position_fix(struct azx *chip, int fix) ...@@ -2059,26 +2059,31 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
{ {
const struct snd_pci_quirk *q; const struct snd_pci_quirk *q;
/* Check VIA HD Audio Controller exist */ switch (fix) {
if (chip->pci->vendor == PCI_VENDOR_ID_VIA && case POS_FIX_LPIB:
chip->pci->device == VIA_HDAC_DEVICE_ID) { 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; chip->via_dmapos_patch = 1;
/* Use link position directly, avoid any transfer problem. */ /* Use link position directly, avoid any transfer problem. */
return POS_FIX_LPIB; return POS_FIX_LPIB;
} }
chip->via_dmapos_patch = 0; chip->via_dmapos_patch = 0;
if (fix == POS_FIX_AUTO) { q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
q = snd_pci_quirk_lookup(chip->pci, position_fix_list); if (q) {
if (q) { printk(KERN_INFO
printk(KERN_INFO "hda_intel: position_fix set to %d "
"hda_intel: position_fix set to %d " "for device %04x:%04x\n",
"for device %04x:%04x\n", q->value, q->subvendor, q->subdevice);
q->value, q->subvendor, q->subdevice); return q->value;
return q->value;
}
} }
return fix; return POS_FIX_AUTO;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册