diff options
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 49 |
1 files changed, 30 insertions, 19 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 11e791b965f6..f3b5723c2859 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1947,16 +1947,13 @@ static int azx_suspend(struct pci_dev *pci, pm_message_t state) | |||
1947 | return 0; | 1947 | return 0; |
1948 | } | 1948 | } |
1949 | 1949 | ||
1950 | static int azx_resume_early(struct pci_dev *pci) | ||
1951 | { | ||
1952 | return pci_restore_state(pci); | ||
1953 | } | ||
1954 | |||
1955 | static int azx_resume(struct pci_dev *pci) | 1950 | static int azx_resume(struct pci_dev *pci) |
1956 | { | 1951 | { |
1957 | struct snd_card *card = pci_get_drvdata(pci); | 1952 | struct snd_card *card = pci_get_drvdata(pci); |
1958 | struct azx *chip = card->private_data; | 1953 | struct azx *chip = card->private_data; |
1959 | 1954 | ||
1955 | pci_set_power_state(pci, PCI_D0); | ||
1956 | pci_restore_state(pci); | ||
1960 | if (pci_enable_device(pci) < 0) { | 1957 | if (pci_enable_device(pci) < 0) { |
1961 | printk(KERN_ERR "hda-intel: pci_enable_device failed, " | 1958 | printk(KERN_ERR "hda-intel: pci_enable_device failed, " |
1962 | "disabling device\n"); | 1959 | "disabling device\n"); |
@@ -2062,26 +2059,31 @@ static int __devinit check_position_fix(struct azx *chip, int fix) | |||
2062 | { | 2059 | { |
2063 | const struct snd_pci_quirk *q; | 2060 | const struct snd_pci_quirk *q; |
2064 | 2061 | ||
2065 | /* Check VIA HD Audio Controller exist */ | 2062 | switch (fix) { |
2066 | if (chip->pci->vendor == PCI_VENDOR_ID_VIA && | 2063 | case POS_FIX_LPIB: |
2067 | 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: | ||
2068 | chip->via_dmapos_patch = 1; | 2072 | chip->via_dmapos_patch = 1; |
2069 | /* Use link position directly, avoid any transfer problem. */ | 2073 | /* Use link position directly, avoid any transfer problem. */ |
2070 | return POS_FIX_LPIB; | 2074 | return POS_FIX_LPIB; |
2071 | } | 2075 | } |
2072 | chip->via_dmapos_patch = 0; | 2076 | chip->via_dmapos_patch = 0; |
2073 | 2077 | ||
2074 | if (fix == POS_FIX_AUTO) { | 2078 | q = snd_pci_quirk_lookup(chip->pci, position_fix_list); |
2075 | q = snd_pci_quirk_lookup(chip->pci, position_fix_list); | 2079 | if (q) { |
2076 | if (q) { | 2080 | printk(KERN_INFO |
2077 | printk(KERN_INFO | 2081 | "hda_intel: position_fix set to %d " |
2078 | "hda_intel: position_fix set to %d " | 2082 | "for device %04x:%04x\n", |
2079 | "for device %04x:%04x\n", | 2083 | q->value, q->subvendor, q->subdevice); |
2080 | q->value, q->subvendor, q->subdevice); | 2084 | return q->value; |
2081 | return q->value; | ||
2082 | } | ||
2083 | } | 2085 | } |
2084 | return fix; | 2086 | return POS_FIX_AUTO; |
2085 | } | 2087 | } |
2086 | 2088 | ||
2087 | /* | 2089 | /* |
@@ -2098,6 +2100,8 @@ static struct snd_pci_quirk probe_mask_list[] __devinitdata = { | |||
2098 | SND_PCI_QUIRK(0x1028, 0x20ac, "Dell Studio Desktop", 0x01), | 2100 | SND_PCI_QUIRK(0x1028, 0x20ac, "Dell Studio Desktop", 0x01), |
2099 | /* including bogus ALC268 in slot#2 that conflicts with ALC888 */ | 2101 | /* including bogus ALC268 in slot#2 that conflicts with ALC888 */ |
2100 | SND_PCI_QUIRK(0x17c0, 0x4085, "Medion MD96630", 0x01), | 2102 | SND_PCI_QUIRK(0x17c0, 0x4085, "Medion MD96630", 0x01), |
2103 | /* conflict of ALC268 in slot#3 (digital I/O); a temporary fix */ | ||
2104 | SND_PCI_QUIRK(0x1179, 0xff00, "Toshiba laptop", 0x03), | ||
2101 | {} | 2105 | {} |
2102 | }; | 2106 | }; |
2103 | 2107 | ||
@@ -2211,9 +2215,17 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
2211 | gcap = azx_readw(chip, GCAP); | 2215 | gcap = azx_readw(chip, GCAP); |
2212 | snd_printdd("chipset global capabilities = 0x%x\n", gcap); | 2216 | snd_printdd("chipset global capabilities = 0x%x\n", gcap); |
2213 | 2217 | ||
2218 | /* ATI chips seems buggy about 64bit DMA addresses */ | ||
2219 | if (chip->driver_type == AZX_DRIVER_ATI) | ||
2220 | gcap &= ~0x01; | ||
2221 | |||
2214 | /* allow 64bit DMA address if supported by H/W */ | 2222 | /* allow 64bit DMA address if supported by H/W */ |
2215 | if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK)) | 2223 | if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK)) |
2216 | 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 | } | ||
2217 | 2229 | ||
2218 | /* read number of streams from GCAP register instead of using | 2230 | /* read number of streams from GCAP register instead of using |
2219 | * hardcoded value | 2231 | * hardcoded value |
@@ -2468,7 +2480,6 @@ static struct pci_driver driver = { | |||
2468 | .remove = __devexit_p(azx_remove), | 2480 | .remove = __devexit_p(azx_remove), |
2469 | #ifdef CONFIG_PM | 2481 | #ifdef CONFIG_PM |
2470 | .suspend = azx_suspend, | 2482 | .suspend = azx_suspend, |
2471 | .resume_early = azx_resume_early, | ||
2472 | .resume = azx_resume, | 2483 | .resume = azx_resume, |
2473 | #endif | 2484 | #endif |
2474 | }; | 2485 | }; |