[alsa-devel] My PC has 6GB memory but the limitation of the alsa-driver is 4GB.
Takashi Iwai
tiwai at suse.de
Mon Mar 16 08:15:21 CET 2009
At Sun, 15 Mar 2009 14:02:36 +0900,
Emmanuel Chanel wrote:
>
> The problem "Fedora 10 x86_64 alsa problem: Realtek ALC889A Audio
> Codec(ATI azalia) not detected on alsa" seems solved.
> I consulted #alsa on FreeNode. And Mr. Daniel Koukola discovered the
> reason. He spared for 14 hours in all this evening and all this night
> for my problem. Thank you very, very, much, Mr. Daniel Koukola!
> See https://bugzilla.redhat.com/show_bug.cgi?id=489828 #17 and #18
Hmm, then it's a bug of AMD/ATI controller chip.
The problem is however likely only about CORB/RIRB addresses, and not
about the sample buffers. So setting 32bit there couldn't be the
"right" fix.
How about the patch below?
thanks,
Takashi
---
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 92a73e8..2a7b9ab 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2136,7 +2136,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
struct azx **rchip)
{
struct azx *chip;
- int i, err;
+ int i, err, rirb_32bit;
unsigned short gcap;
static struct snd_device_ops ops = {
.dev_free = azx_dev_free,
@@ -2218,11 +2218,21 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
pci_set_master(pci);
synchronize_irq(chip->irq);
+ /* ATI chips seems buggy about 64bit CORB/RIRB addresses */
+ if (chip->driver_type == AZX_DRIVER_ATI)
+ rirb_32bit = 1;
+ else
+ rirb_32bit = 0;
+
gcap = azx_readw(chip, GCAP);
snd_printdd("chipset global capabilities = 0x%x\n", gcap);
/* allow 64bit DMA address if supported by H/W */
- if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK))
+ /* Don't set 64bit DMA here for the controller buffer allocations
+ * on some buggy hardwares
+ */
+ if (!rirb_32bit &&
+ (gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK))
pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK);
/* read number of streams from GCAP register instead of using
@@ -2309,6 +2319,11 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
sprintf(card->longname, "%s at 0x%lx irq %i",
card->shortname, chip->addr, chip->irq);
+ /* allow 64bit DMA address if supported by H/W (if not set yet) */
+ if (rirb_32bit &&
+ (gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK))
+ pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK);
+
*rchip = chip;
return 0;
More information about the Alsa-devel
mailing list