]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.drivers/alsa-post-ga-hda-ati-pos-fix
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / alsa-post-ga-hda-ati-pos-fix
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
4 References: bnc#502733
5
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
8 VIA is useful for ATI.
9
10 Signed-off-by: Takashi Iwai <tiwai@suse.de>
11
12 ---
13 sound/pci/hda/hda_intel.c | 31 ++++++++++++++++++-------------
14 1 file changed, 18 insertions(+), 13 deletions(-)
15
16 --- a/sound/pci/hda/hda_intel.c
17 +++ b/sound/pci/hda/hda_intel.c
18 @@ -2065,26 +2065,31 @@
19 {
20 const struct snd_pci_quirk *q;
21
22 - /* Check VIA HD Audio Controller exist */
23 - if (chip->pci->vendor == PCI_VENDOR_ID_VIA &&
24 - chip->pci->device == VIA_HDAC_DEVICE_ID) {
25 + switch (fix) {
26 + case POS_FIX_LPIB:
27 + case POS_FIX_POSBUF:
28 + return fix;
29 + }
30 +
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. */
37 return POS_FIX_LPIB;
38 }
39 chip->via_dmapos_patch = 0;
40
41 - if (fix == POS_FIX_AUTO) {
42 - q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
43 - if (q) {
44 - printk(KERN_INFO
45 - "hda_intel: position_fix set to %d "
46 - "for device %04x:%04x\n",
47 - q->value, q->subvendor, q->subdevice);
48 - return q->value;
49 - }
50 + q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
51 + if (q) {
52 + printk(KERN_INFO
53 + "hda_intel: position_fix set to %d "
54 + "for device %04x:%04x\n",
55 + q->value, q->subvendor, q->subdevice);
56 + return q->value;
57 }
58 - return fix;
59 + return POS_FIX_AUTO;
60 }
61
62 /*