--- sound/pci/hda/hda_intel.orig.c 2007-07-13 00:10:25.000000000 +0100 +++ sound/pci/hda/hda_intel.c 2007-07-13 00:11:18.000000000 +0100 @@ -1086,6 +1086,18 @@ unsigned long flags; int err; + /* patch to fix error for kernel 2.6.20 where SMP CPUs are started after PCI devices + and over-write the value of the TCSEL register, causing DMA buffer looping and static + For details see https://bugs.launchpad.net/ubuntu/+bug/100114 + */ + unsigned char reg; + pci_read_config_byte(chip->pci, ICH6_PCIREG_TCSEL, ®); + if (reg != 0) { + pci_write_config_byte(chip->pci, ICH6_PCIREG_TCSEL, reg & 0xf8); + snd_printk(KERN_WARNING SFX "BUG: PCI register TCSEL=%d, resetting to zero (see Ubuntu bug #100114)\n", reg); + } + /* end of patch */ + mutex_lock(&chip->open_mutex); azx_dev = azx_assign_device(chip, substream->stream); if (azx_dev == NULL) {