ALSA: hda - Enable sync_write workaround for AMD generically
authorTakashi Iwai <tiwai@suse.de>
Tue, 26 Apr 2011 13:25:02 +0000 (15:25 +0200)
committerSteve Conklin <sconklin@canonical.com>
Fri, 15 Jul 2011 17:20:44 +0000 (12:20 -0500)
BugLink: http://bugs.launchpad.net/bugs/741825

Backport from d507cd668a3f6d07b31e914722b453c454b03204.

The workaround for AMD chipset via sync_write flag seems needed for
machines with Realtek codecs.  So, it's better to activate it
generically in hda_intel.c from the beginning.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

sound/pci/hda/hda_intel.c

index 5fd012b..c9fb18e 100644 (file)
@@ -1449,6 +1449,17 @@ static int __devinit azx_codec_create(struct azx *chip, const char *model)
                }
        }
 
+       /* AMD chipsets often cause the communication stalls upon certain
+        * sequence like the pin-detection.  It seems that forcing the synced
+        * access works around the stall.  Grrr...
+        */
+       if (chip->pci->vendor == PCI_VENDOR_ID_AMD ||
+           chip->pci->vendor == PCI_VENDOR_ID_ATI) {
+               snd_printk(KERN_INFO SFX "Enable sync_write for AMD chipset\n");
+               chip->bus->sync_write = 1;
+               chip->bus->allow_bus_reset = 1;
+       }
+
        /* Then create codec instances */
        for (c = 0; c < max_slots; c++) {
                if ((chip->codec_mask & (1 << c)) & chip->codec_probe_mask) {