Skip to contentSkip to conversation

ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers

PATCH Superseded David Henningsson 3 participants 5 messages Oct 4, 2010 – Oct 22, 2010 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers

Position_fix quirks for specific machines now override the default position_fix behavior for all HDA controllers.

Signature · 2 lines
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
Quoted 1 line

From b36e71f568c26ab11909454c5bf8bc5d47dbf025 Mon Sep 17 00:00:00 2001

From: David Henningsson <[email protected]>
Date: Mon, 4 Oct 2010 12:02:14 +0200
Subject: [PATCH] ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers

Position_fix quirks for specific machines now override the default position_fix behavior for all HDA controllers.

---
 sound/pci/hda/hda_intel.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
sound/pci/hda/hda_intel.c +9 -8
index 38b063e..5cbea85 100644
@@ -2315,14 +2315,6 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
 		return fix;
 	}
 
-	/* Check VIA/ATI HD Audio Controller exist */
-	switch (chip->driver_type) {
-	case AZX_DRIVER_VIA:
-	case AZX_DRIVER_ATI:
-		/* Use link position directly, avoid any transfer problem. */
-		return POS_FIX_VIACOMBO;
-	}
-
 	q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
 	if (q) {
 		printk(KERN_INFO
@@ -2331,6 +2323,15 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
 		       q->value, q->subvendor, q->subdevice);
 		return q->value;
 	}
+
+	/* Check VIA/ATI HD Audio Controller exist */
+	switch (chip->driver_type) {
+	case AZX_DRIVER_VIA:
+	case AZX_DRIVER_ATI:
+		/* Use link position directly, avoid any transfer problem. */
+		return POS_FIX_VIACOMBO;
+	}
+
 	return POS_FIX_AUTO;
 }
 
Signature · 1 line
1.7.1

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw
Quoted 8 lines · David Henningsson

Position_fix quirks for specific machines now override the default position_fix behavior for all HDA controllers.

...and here's the version for 2.6.35 and 2.6.32 stable trees.

Signature · 2 lines
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
Quoted 1 line

From 693810d675f1923449d7d38893a614c975bd359c Mon Sep 17 00:00:00 2001

From: David Henningsson <[email protected]>
Date: Mon, 4 Oct 2010 13:13:44 +0200
Subject: [PATCH] ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers

Position_fix quirks for specific machines now override the default position_fix behavior for all HDA controllers.

---
 sound/pci/hda/hda_intel.c |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)
sound/pci/hda/hda_intel.c +12 -9
index 741ad32..51b088e 100644
@@ -2264,12 +2264,24 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
 {
 	const struct snd_pci_quirk *q;
 
+	chip->via_dmapos_patch = 0;
+
 	switch (fix) {
 	case POS_FIX_LPIB:
 	case POS_FIX_POSBUF:
 		return fix;
 	}
 
+	q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
+	if (q) {
+		/* Note that this implicitly sets via_dmapos_patch to zero */
+		printk(KERN_INFO
+		       "hda_intel: position_fix set to %d "
+		       "for device %04x:%04x\n",
+		       q->value, q->subvendor, q->subdevice);
+		return q->value;
+	}
+
 	/* Check VIA/ATI HD Audio Controller exist */
 	switch (chip->driver_type) {
 	case AZX_DRIVER_VIA:
@@ -2278,16 +2290,7 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
 		/* Use link position directly, avoid any transfer problem. */
 		return POS_FIX_LPIB;
 	}
-	chip->via_dmapos_patch = 0;
 
-	q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
-	if (q) {
-		printk(KERN_INFO
-		       "hda_intel: position_fix set to %d "
-		       "for device %04x:%04x\n",
-		       q->value, q->subvendor, q->subdevice);
-		return q->value;
-	}
 	return POS_FIX_AUTO;
 }
 
Signature · 1 line
1.7.1

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw
Quoted 11 lines · David Henningsson
Quoted 8 lines · David Henningsson

Position_fix quirks for specific machines now override the default position_fix behavior for all HDA controllers.

...and here's the version for 2.6.35 and 2.6.32 stable trees.

Ok, but what's the corrisponding fix in Linus's tree? What is the git id of the patch there?

Please resend your version with that information in it.

thanks,

greg k-h

#3 lore raw

PATCH RESEND 1/1 ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers

In reply to David Henningsson

This one never got picked up when I posted it a week ago.

Quoted 15 lines · David Henningsson

Position_fix quirks for specific machines now override the default position_fix behavior for all HDA controllers.

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 2 lines
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
Quoted 1 line

From b36e71f568c26ab11909454c5bf8bc5d47dbf025 Mon Sep 17 00:00:00 2001

From: David Henningsson <[email protected]>
Date: Mon, 4 Oct 2010 12:02:14 +0200
Subject: [PATCH] ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers

Position_fix quirks for specific machines now override the default position_fix behavior for all HDA controllers.

---
 sound/pci/hda/hda_intel.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
sound/pci/hda/hda_intel.c +9 -8
index 38b063e..5cbea85 100644
@@ -2315,14 +2315,6 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
 		return fix;
 	}
 
-	/* Check VIA/ATI HD Audio Controller exist */
-	switch (chip->driver_type) {
-	case AZX_DRIVER_VIA:
-	case AZX_DRIVER_ATI:
-		/* Use link position directly, avoid any transfer problem. */
-		return POS_FIX_VIACOMBO;
-	}
-
 	q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
 	if (q) {
 		printk(KERN_INFO
@@ -2331,6 +2323,15 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
 		       q->value, q->subvendor, q->subdevice);
 		return q->value;
 	}
+
+	/* Check VIA/ATI HD Audio Controller exist */
+	switch (chip->driver_type) {
+	case AZX_DRIVER_VIA:
+	case AZX_DRIVER_ATI:
+		/* Use link position directly, avoid any transfer problem. */
+		return POS_FIX_VIACOMBO;
+	}
+
 	return POS_FIX_AUTO;
 }
 
Signature · 1 line
1.7.1

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#4 lore raw

At Tue, 12 Oct 2010 12:36:45 +0200,

Quoted 2 lines · David Henningsson

This one never got picked up when I posted it a week ago.

Oh yeah, thanks for noticing.
Applied now.

Takashi

Quoted 77 lines · David Henningsson
Quoted 15 lines

Position_fix quirks for specific machines now override the default position_fix behavior for all HDA controllers.

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 3 lines
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
[2 0001-ALSA-HDA-Correctly-apply-position_fix-quirks-for-ATI.patch <text/x-patch (7bit)>]
Quoted 1 line

From b36e71f568c26ab11909454c5bf8bc5d47dbf025 Mon Sep 17 00:00:00 2001

From: David Henningsson <[email protected]>
Date: Mon, 4 Oct 2010 12:02:14 +0200
Subject: [PATCH] ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA controllers

Position_fix quirks for specific machines now override the default position_fix behavior for all HDA controllers.

---
 sound/pci/hda/hda_intel.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
sound/pci/hda/hda_intel.c +9 -8
index 38b063e..5cbea85 100644
@@ -2315,14 +2315,6 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
 		return fix;
 	}
 
-	/* Check VIA/ATI HD Audio Controller exist */
-	switch (chip->driver_type) {
-	case AZX_DRIVER_VIA:
-	case AZX_DRIVER_ATI:
-		/* Use link position directly, avoid any transfer problem. */
-		return POS_FIX_VIACOMBO;
-	}
-
 	q = snd_pci_quirk_lookup(chip->pci, position_fix_list);
 	if (q) {
 		printk(KERN_INFO
@@ -2331,6 +2323,15 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
 		       q->value, q->subvendor, q->subdevice);
 		return q->value;
 	}
+
+	/* Check VIA/ATI HD Audio Controller exist */
+	switch (chip->driver_type) {
+	case AZX_DRIVER_VIA:
+	case AZX_DRIVER_ATI:
+		/* Use link position directly, avoid any transfer problem. */
+		return POS_FIX_VIACOMBO;
+	}
+
 	return POS_FIX_AUTO;
 }
 
Signature · 1 line
1.7.1