1 From: Takashi Iwai <tiwai@suse.de>
2 Subject: ALSA: hda - Workaround for buggy DMA position on ATI controllers
3 Patch-mainline: 2.6.30-rc1
6 The position-buffer on ATI controllers are unreliable as well as
7 on VIA chips, thus the same workaround for DMA position reading as
10 Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 sound/pci/hda/hda_intel.c | 31 ++++++++++++++++++-------------
14 1 file changed, 18 insertions(+), 13 deletions(-)
16 --- a/sound/pci/hda/hda_intel.c
17 +++ b/sound/pci/hda/hda_intel.c
18 @@ -2065,26 +2065,31 @@
20 const struct snd_pci_quirk *q;
22 - /* Check VIA HD Audio Controller exist */
23 - if (chip->pci->vendor == PCI_VENDOR_ID_VIA &&
24 - chip->pci->device == VIA_HDAC_DEVICE_ID) {
27 + case POS_FIX_POSBUF:
31 + /* Check VIA/ATI HD Audio Controller exist */
32 + switch (chip->driver_type) {
33 + case AZX_DRIVER_VIA:
34 + case AZX_DRIVER_ATI:
35 chip->via_dmapos_patch = 1;
36 /* Use link position directly, avoid any transfer problem. */
39 chip->via_dmapos_patch = 0;
41 - if (fix == POS_FIX_AUTO) {
42 - q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
45 - "hda_intel: position_fix set to %d "
46 - "for device %04x:%04x\n",
47 - q->value, q->subvendor, q->subdevice);
50 + q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
53 + "hda_intel: position_fix set to %d "
54 + "for device %04x:%04x\n",
55 + q->value, q->subvendor, q->subdevice);
59 + return POS_FIX_AUTO;