Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c673ba1c authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Workaround for buggy DMA position on ATI controllers



The position-buffer on ATI controllers are unreliable as well as
on VIA chips, thus the same workaround for DMA position reading as
VIA is useful for ATI.

Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 09240cf4
Loading
Loading
Loading
Loading
+18 −13
Original line number Diff line number Diff line
@@ -2059,16 +2059,22 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
{
	const struct snd_pci_quirk *q;

	/* Check VIA HD Audio Controller exist */
	if (chip->pci->vendor == PCI_VENDOR_ID_VIA &&
	    chip->pci->device == VIA_HDAC_DEVICE_ID) {
	switch (fix) {
	case POS_FIX_LPIB:
	case POS_FIX_POSBUF:
		return fix;
	}

	/* Check VIA/ATI HD Audio Controller exist */
	switch (chip->driver_type) {
	case AZX_DRIVER_VIA:
	case AZX_DRIVER_ATI:
		chip->via_dmapos_patch = 1;
		/* Use link position directly, avoid any transfer problem. */
		return POS_FIX_LPIB;
	}
	chip->via_dmapos_patch = 0;

	if (fix == POS_FIX_AUTO) {
	q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
	if (q) {
		printk(KERN_INFO
@@ -2077,8 +2083,7 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
		       q->value, q->subvendor, q->subdevice);
		return q->value;
	}
	}
	return fix;
	return POS_FIX_AUTO;
}

/*