aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c39
1 files changed, 26 insertions, 13 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 5e909e0da04b..f3b5723c2859 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)
2059{ 2059{
2060 const struct snd_pci_quirk *q; 2060 const struct snd_pci_quirk *q;
2061 2061
2062 /* Check VIA HD Audio Controller exist */ 2062 switch (fix) {
2063 if (chip->pci->vendor == PCI_VENDOR_ID_VIA && 2063 case POS_FIX_LPIB:
2064 chip->pci->device == VIA_HDAC_DEVICE_ID) { 2064 case POS_FIX_POSBUF:
2065 return fix;
2066 }
2067
2068 /* Check VIA/ATI HD Audio Controller exist */
2069 switch (chip->driver_type) {
2070 case AZX_DRIVER_VIA:
2071 case AZX_DRIVER_ATI:
2065 chip->via_dmapos_patch = 1; 2072 chip->via_dmapos_patch = 1;
2066 /* Use link position directly, avoid any transfer problem. */ 2073 /* Use link position directly, avoid any transfer problem. */
2067 return POS_FIX_LPIB; 2074 return POS_FIX_LPIB;
2068 } 2075 }
2069 chip->via_dmapos_patch = 0; 2076 chip->via_dmapos_patch = 0;
2070 2077
2071 if (fix == POS_FIX_AUTO) { 2078 q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
2072 q = snd_pci_quirk_lookup(chip->pci, position_fix_list); 2079 if (q) {
2073 if (q) { 2080 printk(KERN_INFO
2074 printk(KERN_INFO 2081 "hda_intel: position_fix set to %d "
2075 "hda_intel: position_fix set to %d " 2082 "for device %04x:%04x\n",
2076 "for device %04x:%04x\n", 2083 q->value, q->subvendor, q->subdevice);
2077 q->value, q->subvendor, q->subdevice); 2084 return q->value;
2078 return q->value;
2079 }
2080 } 2085 }
2081 return fix; 2086 return POS_FIX_AUTO;
2082} 2087}
2083 2088
2084/* 2089/*
@@ -2210,9 +2215,17 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
2210 gcap = azx_readw(chip, GCAP); 2215 gcap = azx_readw(chip, GCAP);
2211 snd_printdd("chipset global capabilities = 0x%x\n", gcap); 2216 snd_printdd("chipset global capabilities = 0x%x\n", gcap);
2212 2217
2218 /* ATI chips seems buggy about 64bit DMA addresses */
2219 if (chip->driver_type == AZX_DRIVER_ATI)
2220 gcap &= ~0x01;
2221
2213 /* allow 64bit DMA address if supported by H/W */ 2222 /* allow 64bit DMA address if supported by H/W */
2214 if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK)) 2223 if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK))
2215 pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK); 2224 pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK);
2225 else {
2226 pci_set_dma_mask(pci, DMA_32BIT_MASK);
2227 pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK);
2228 }
2216 2229
2217 /* read number of streams from GCAP register instead of using 2230 /* read number of streams from GCAP register instead of using
2218 * hardcoded value 2231 * hardcoded value