diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-07-09 12:48:38 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-07-09 12:48:38 -0400 |
commit | 305355aad89f1b7eb27cb210fad2f9d3c67b2572 (patch) | |
tree | b7510300fae4fd06a29b2d773fb841e4ca3c8956 /sound/pci/hda/hda_intel.c | |
parent | b1e4422f96a9b4830ffd8119b05211abb830ef4a (diff) | |
parent | 005b10769c05fb16db70f7689ffb5ba17e3fc324 (diff) |
Merge branch 'fix/hda' into topic/hda
Conflicts:
sound/pci/hda/patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 6abaa6bbb3d6..a7cf34965225 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1470,6 +1470,17 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) | |||
1470 | return err; | 1470 | return err; |
1471 | } | 1471 | } |
1472 | snd_pcm_limit_hw_rates(runtime); | 1472 | snd_pcm_limit_hw_rates(runtime); |
1473 | /* sanity check */ | ||
1474 | if (snd_BUG_ON(!runtime->hw.channels_min) || | ||
1475 | snd_BUG_ON(!runtime->hw.channels_max) || | ||
1476 | snd_BUG_ON(!runtime->hw.formats) || | ||
1477 | snd_BUG_ON(!runtime->hw.rates)) { | ||
1478 | azx_release_device(azx_dev); | ||
1479 | hinfo->ops.close(hinfo, apcm->codec, substream); | ||
1480 | snd_hda_power_down(apcm->codec); | ||
1481 | mutex_unlock(&chip->open_mutex); | ||
1482 | return -EINVAL; | ||
1483 | } | ||
1473 | spin_lock_irqsave(&chip->reg_lock, flags); | 1484 | spin_lock_irqsave(&chip->reg_lock, flags); |
1474 | azx_dev->substream = substream; | 1485 | azx_dev->substream = substream; |
1475 | azx_dev->running = 0; | 1486 | azx_dev->running = 0; |
@@ -1478,13 +1489,6 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) | |||
1478 | runtime->private_data = azx_dev; | 1489 | runtime->private_data = azx_dev; |
1479 | snd_pcm_set_sync(substream); | 1490 | snd_pcm_set_sync(substream); |
1480 | mutex_unlock(&chip->open_mutex); | 1491 | mutex_unlock(&chip->open_mutex); |
1481 | |||
1482 | if (snd_BUG_ON(!runtime->hw.channels_min || !runtime->hw.channels_max)) | ||
1483 | return -EINVAL; | ||
1484 | if (snd_BUG_ON(!runtime->hw.formats)) | ||
1485 | return -EINVAL; | ||
1486 | if (snd_BUG_ON(!runtime->hw.rates)) | ||
1487 | return -EINVAL; | ||
1488 | return 0; | 1492 | return 0; |
1489 | } | 1493 | } |
1490 | 1494 | ||
@@ -2344,9 +2348,19 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
2344 | gcap = azx_readw(chip, GCAP); | 2348 | gcap = azx_readw(chip, GCAP); |
2345 | snd_printdd(SFX "chipset global capabilities = 0x%x\n", gcap); | 2349 | snd_printdd(SFX "chipset global capabilities = 0x%x\n", gcap); |
2346 | 2350 | ||
2347 | /* ATI chips seems buggy about 64bit DMA addresses */ | 2351 | /* disable SB600 64bit support for safety */ |
2348 | if (chip->driver_type == AZX_DRIVER_ATI) | 2352 | if ((chip->driver_type == AZX_DRIVER_ATI) || |
2349 | gcap &= ~ICH6_GCAP_64OK; | 2353 | (chip->driver_type == AZX_DRIVER_ATIHDMI)) { |
2354 | struct pci_dev *p_smbus; | ||
2355 | p_smbus = pci_get_device(PCI_VENDOR_ID_ATI, | ||
2356 | PCI_DEVICE_ID_ATI_SBX00_SMBUS, | ||
2357 | NULL); | ||
2358 | if (p_smbus) { | ||
2359 | if (p_smbus->revision < 0x30) | ||
2360 | gcap &= ~ICH6_GCAP_64OK; | ||
2361 | pci_dev_put(p_smbus); | ||
2362 | } | ||
2363 | } | ||
2350 | 2364 | ||
2351 | /* allow 64bit DMA address if supported by H/W */ | 2365 | /* allow 64bit DMA address if supported by H/W */ |
2352 | if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) | 2366 | if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) |