diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-18 02:50:56 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-18 02:50:56 -0400 |
commit | 4a1007934591fd0dcdf13454a6faebfcbe1a4ee6 (patch) | |
tree | 7a10eaccb622f166d929a8ff2abbb8c0d25b2d91 /sound | |
parent | ee5047102cf632351c418060bfbe3b6eb5c42e7b (diff) | |
parent | c673ba1c23941173c16ff24c7cb34199e826c8b5 (diff) |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 47a5833feb7a..6bcf5af6edce 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 | /* |
@@ -2221,9 +2226,17 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
2221 | gcap = azx_readw(chip, GCAP); | 2226 | gcap = azx_readw(chip, GCAP); |
2222 | snd_printdd("chipset global capabilities = 0x%x\n", gcap); | 2227 | snd_printdd("chipset global capabilities = 0x%x\n", gcap); |
2223 | 2228 | ||
2229 | /* ATI chips seems buggy about 64bit DMA addresses */ | ||
2230 | if (chip->driver_type == AZX_DRIVER_ATI) | ||
2231 | gcap &= ~0x01; | ||
2232 | |||
2224 | /* allow 64bit DMA address if supported by H/W */ | 2233 | /* allow 64bit DMA address if supported by H/W */ |
2225 | if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK)) | 2234 | if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK)) |
2226 | pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK); | 2235 | pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK); |
2236 | else { | ||
2237 | pci_set_dma_mask(pci, DMA_32BIT_MASK); | ||
2238 | pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK); | ||
2239 | } | ||
2227 | 2240 | ||
2228 | /* read number of streams from GCAP register instead of using | 2241 | /* read number of streams from GCAP register instead of using |
2229 | * hardcoded value | 2242 | * hardcoded value |