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.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 4e9ea7080270..77c1b840ca8b 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1454,6 +1454,18 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
1454 mutex_unlock(&chip->open_mutex); 1454 mutex_unlock(&chip->open_mutex);
1455 return err; 1455 return err;
1456 } 1456 }
1457 snd_pcm_limit_hw_rates(runtime);
1458 /* sanity check */
1459 if (snd_BUG_ON(!runtime->hw.channels_min) ||
1460 snd_BUG_ON(!runtime->hw.channels_max) ||
1461 snd_BUG_ON(!runtime->hw.formats) ||
1462 snd_BUG_ON(!runtime->hw.rates)) {
1463 azx_release_device(azx_dev);
1464 hinfo->ops.close(hinfo, apcm->codec, substream);
1465 snd_hda_power_down(apcm->codec);
1466 mutex_unlock(&chip->open_mutex);
1467 return -EINVAL;
1468 }
1457 spin_lock_irqsave(&chip->reg_lock, flags); 1469 spin_lock_irqsave(&chip->reg_lock, flags);
1458 azx_dev->substream = substream; 1470 azx_dev->substream = substream;
1459 azx_dev->running = 0; 1471 azx_dev->running = 0;
@@ -1462,7 +1474,6 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
1462 runtime->private_data = azx_dev; 1474 runtime->private_data = azx_dev;
1463 snd_pcm_set_sync(substream); 1475 snd_pcm_set_sync(substream);
1464 mutex_unlock(&chip->open_mutex); 1476 mutex_unlock(&chip->open_mutex);
1465
1466 return 0; 1477 return 0;
1467} 1478}
1468 1479
@@ -2322,9 +2333,19 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
2322 gcap = azx_readw(chip, GCAP); 2333 gcap = azx_readw(chip, GCAP);
2323 snd_printdd(SFX "chipset global capabilities = 0x%x\n", gcap); 2334 snd_printdd(SFX "chipset global capabilities = 0x%x\n", gcap);
2324 2335
2325 /* ATI chips seems buggy about 64bit DMA addresses */ 2336 /* disable SB600 64bit support for safety */
2326 if (chip->driver_type == AZX_DRIVER_ATI) 2337 if ((chip->driver_type == AZX_DRIVER_ATI) ||
2327 gcap &= ~ICH6_GCAP_64OK; 2338 (chip->driver_type == AZX_DRIVER_ATIHDMI)) {
2339 struct pci_dev *p_smbus;
2340 p_smbus = pci_get_device(PCI_VENDOR_ID_ATI,
2341 PCI_DEVICE_ID_ATI_SBX00_SMBUS,
2342 NULL);
2343 if (p_smbus) {
2344 if (p_smbus->revision < 0x30)
2345 gcap &= ~ICH6_GCAP_64OK;
2346 pci_dev_put(p_smbus);
2347 }
2348 }
2328 2349
2329 /* allow 64bit DMA address if supported by H/W */ 2350 /* allow 64bit DMA address if supported by H/W */
2330 if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) 2351 if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64)))