]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ALSA: hda - Enable snoop bit for AMD controllers
authorTakashi Iwai <tiwai@suse.de>
Tue, 17 May 2011 16:41:25 +0000 (18:41 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 17 May 2011 16:41:25 +0000 (18:41 +0200)
AMD Hudson controllers give noisy outputs when the buffer data is
rewritten on the fly as PulseAudio does.  This seems fixed by the
snoop bit enabled just like ATI chipset.

Also, disable 64bit DMA as now, to be sure.
We can revisit this later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_intel.c

index 010fd3181961b185abcb7ea3843a15ae8079c185..ecadb5b7d647b0d65fdac7086fc30a7e3c57883a 100644 (file)
@@ -1092,7 +1092,13 @@ static void azx_init_pci(struct azx *chip)
                                ? "Failed" : "OK");
                }
                break;
-
+       default:
+               /* AMD Hudson needs the similar snoop, as it seems... */
+               if (chip->pci->vendor == PCI_VENDOR_ID_AMD)
+                       update_pci_byte(chip->pci,
+                               ATI_SB450_HDAUDIO_MISC_CNTR2_ADDR,
+                               0x07, ATI_SB450_HDAUDIO_ENABLE_SNOOP);
+               break;
         }
 }
 
@@ -2566,6 +2572,13 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
                                gcap &= ~ICH6_GCAP_64OK;
                        pci_dev_put(p_smbus);
                }
+       } else {
+               /* FIXME: not sure whether this is really needed, but
+                * Hudson isn't stable enough for allowing everything...
+                * let's check later again.
+                */
+               if (chip->pci->vendor == PCI_VENDOR_ID_AMD)
+                       gcap &= ~ICH6_GCAP_64OK;
        }
 
        /* disable 64bit DMA address for Teradici */