Skip to contentSkip to conversation

hda_intel: switch Intel chipsets to COMBO position_fix

PATCH In review Seth Heasley 2 participants 4 messages Jun 12, 2012 – Jun 14, 2012 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hda_intel: switch Intel chipsets to COMBO position_fix

This patch implements the COMBO position_fix for recent Intel client chipsets.

---
 sound/pci/hda/hda_intel.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
sound/pci/hda/hda_intel.c +8 -3
index 2b6392b..466a88c 100644
@@ -535,6 +535,7 @@ enum {
 #define AZX_DCAPS_BUFSIZE	(1 << 21)	/* no buffer size alignment */
 #define AZX_DCAPS_ALIGN_BUFSIZE	(1 << 22)	/* buffer size alignment */
 #define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23)	/* BDLE in 4k boundary */
+#define AZX_DCAPS_POSFIX_COMBO  (1 << 24)	/* Use COMBO as default */
 
 /* quirks for ATI SB / AMD Hudson */
 #define AZX_DCAPS_PRESET_ATI_SB \
@@ -2728,6 +2729,10 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
 		snd_printd(SFX "Using LPIB position fix\n");
 		return POS_FIX_LPIB;
 	}
+	if (chip->driver_caps & AZX_DCAPS_POSFIX_COMBO) {
+		snd_printd(SFX "Using COMBO position fix\n");
+		return POS_FIX_COMBO;
+	}
 	return POS_FIX_AUTO;
 }
 
@@ -3240,7 +3245,7 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
 	/* CPT */
 	{ PCI_DEVICE(0x8086, 0x1c20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE },
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* PBG */
 	{ PCI_DEVICE(0x8086, 0x1d20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
@@ -3248,11 +3253,11 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
 	/* Panther Point */
 	{ PCI_DEVICE(0x8086, 0x1e20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE},
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* Lynx Point */
 	{ PCI_DEVICE(0x8086, 0x8c20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE},
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* SCH */
 	{ PCI_DEVICE(0x8086, 0x811b),
 	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP |
Signature · 1 line
1.7.4.4
#1 lore raw

At Tue, 12 Jun 2012 16:30:00 -0700,

Quoted 4 lines · Seth Heasley

This patch implements the COMBO position_fix for recent Intel client chipsets.

Thanks for the patch.
But could you give a bit more context why this change is needed?

Takashi

Quoted 53 lines
---
 sound/pci/hda/hda_intel.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
sound/pci/hda/hda_intel.c +8 -3
index 2b6392b..466a88c 100644
@@ -535,6 +535,7 @@ enum {
 #define AZX_DCAPS_BUFSIZE	(1 << 21)	/* no buffer size alignment */
 #define AZX_DCAPS_ALIGN_BUFSIZE	(1 << 22)	/* buffer size alignment */
 #define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23)	/* BDLE in 4k boundary */
+#define AZX_DCAPS_POSFIX_COMBO  (1 << 24)	/* Use COMBO as default */
 
 /* quirks for ATI SB / AMD Hudson */
 #define AZX_DCAPS_PRESET_ATI_SB \
@@ -2728,6 +2729,10 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
 		snd_printd(SFX "Using LPIB position fix\n");
 		return POS_FIX_LPIB;
 	}
+	if (chip->driver_caps & AZX_DCAPS_POSFIX_COMBO) {
+		snd_printd(SFX "Using COMBO position fix\n");
+		return POS_FIX_COMBO;
+	}
 	return POS_FIX_AUTO;
 }
 
@@ -3240,7 +3245,7 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
 	/* CPT */
 	{ PCI_DEVICE(0x8086, 0x1c20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE },
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* PBG */
 	{ PCI_DEVICE(0x8086, 0x1d20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
@@ -3248,11 +3253,11 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
 	/* Panther Point */
 	{ PCI_DEVICE(0x8086, 0x1e20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE},
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* Lynx Point */
 	{ PCI_DEVICE(0x8086, 0x8c20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE},
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* SCH */
 	{ PCI_DEVICE(0x8086, 0x811b),
 	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP |
Signature · 1 line
1.7.4.4
#2 lore raw
Quoted 7 lines
Quoted 1 line

This patch implements the COMBO position_fix for recent Intel client

chipsets.

Quoted 2 lines

Thanks for the patch.
But could you give a bit more context why this change is needed?

The COMBO method was recommended for Intel chipsets by a certain audio maintainer. ;) It was also tested on the most recent Intel chips because we were seeing warning messages when using DMA positioning ("Invalid position buffer, using LPIB read method instead.").

Quoted 59 lines

sound/pci/hda/hda_intel.c enum { · line 535

Quoted 10 lines
---
 sound/pci/hda/hda_intel.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
sound/pci/hda/hda_intel.c +0 -0
index 2b6392b..466a88c 100644
@@ -535,6 +535,7 @@ enum {
 #define AZX_DCAPS_BUFSIZE	(1 << 21)	/* no buffer size

alignment */

sound/pci/hda/hda_intel.c enum { · line 536

Quoted 1 line
sound/pci/hda/hda_intel.c +0 -0
 #define AZX_DCAPS_ALIGN_BUFSIZE	(1 << 22)	/* buffer size

alignment */

sound/pci/hda/hda_intel.c enum { · line 537

Quoted 1 line
sound/pci/hda/hda_intel.c +0 -0
 #define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23)	/* BDLE in 4k boundary

*/

sound/pci/hda/hda_intel.c enum { · line 538

Quoted 1 line
sound/pci/hda/hda_intel.c +1 -0
+#define AZX_DCAPS_POSFIX_COMBO  (1 << 24)	/* Use COMBO as

default */

sound/pci/hda/hda_intel.c static int __devinit check_position_fix(struct azx

Quoted 4 lines
sound/pci/hda/hda_intel.c +0 -0
 /* quirks for ATI SB / AMD Hudson */
 #define AZX_DCAPS_PRESET_ATI_SB \
@@ -2728,6 +2729,10 @@ static int __devinit check_position_fix(struct azx

*chip, int fix)

Quoted 11 lines
sound/pci/hda/hda_intel.c +4 -0
 		snd_printd(SFX "Using LPIB position fix\n");
 		return POS_FIX_LPIB;
 	}
+	if (chip->driver_caps & AZX_DCAPS_POSFIX_COMBO) {
+		snd_printd(SFX "Using COMBO position fix\n");
+		return POS_FIX_COMBO;
+	}
 	return POS_FIX_AUTO;
 }
 

sound/pci/hda/hda_intel.c static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { · line 3251

Quoted 8 lines
sound/pci/hda/hda_intel.c +1 -1
@@ -3240,7 +3245,7 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
 	/* CPT */
 	{ PCI_DEVICE(0x8086, 0x1c20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE },
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* PBG */
 	{ PCI_DEVICE(0x8086, 0x1d20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | @@ -

3248,11

Quoted 17 lines

+3253,11 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {

sound/pci/hda/hda_intel.c +2 -3
 	/* Panther Point */
 	{ PCI_DEVICE(0x8086, 0x1e20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE},
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* Lynx Point */
 	{ PCI_DEVICE(0x8086, 0x8c20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE},
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* SCH */
 	{ PCI_DEVICE(0x8086, 0x811b),
 	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP |
--

1.7.4.4

#3 lore raw

At Wed, 13 Jun 2012 17:58:57 +0000,

Quoted 10 lines · Seth
Quoted 8 lines
Quoted 2 lines

This patch implements the COMBO position_fix for recent Intel client

chipsets.

Quoted 2 lines

Thanks for the patch.
But could you give a bit more context why this change is needed?

The COMBO method was recommended for Intel chipsets by a certain audio maintainer. ;) It was also tested on the most recent Intel chips because we were seeing warning messages when using DMA positioning ("Invalid position buffer, using LPIB read method instead.").

Could you resend the patch with such some reasonable comments in the changelog?

thanks,

Takashi

Quoted 60 lines
Quoted 59 lines

sound/pci/hda/hda_intel.c enum { · line 535

Quoted 10 lines
---
 sound/pci/hda/hda_intel.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
sound/pci/hda/hda_intel.c +0 -0
index 2b6392b..466a88c 100644
@@ -535,6 +535,7 @@ enum {
 #define AZX_DCAPS_BUFSIZE	(1 << 21)	/* no buffer size

alignment */

sound/pci/hda/hda_intel.c enum { · line 536

Quoted 1 line
sound/pci/hda/hda_intel.c +0 -0
 #define AZX_DCAPS_ALIGN_BUFSIZE	(1 << 22)	/* buffer size

alignment */

sound/pci/hda/hda_intel.c enum { · line 537

Quoted 1 line
sound/pci/hda/hda_intel.c +0 -0
 #define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23)	/* BDLE in 4k boundary

*/

sound/pci/hda/hda_intel.c enum { · line 538

Quoted 1 line
sound/pci/hda/hda_intel.c +1 -0
+#define AZX_DCAPS_POSFIX_COMBO  (1 << 24)	/* Use COMBO as

default */

sound/pci/hda/hda_intel.c static int __devinit check_position_fix(struct azx

Quoted 4 lines
sound/pci/hda/hda_intel.c +0 -0
 /* quirks for ATI SB / AMD Hudson */
 #define AZX_DCAPS_PRESET_ATI_SB \
@@ -2728,6 +2729,10 @@ static int __devinit check_position_fix(struct azx

*chip, int fix)

Quoted 11 lines
sound/pci/hda/hda_intel.c +4 -0
 		snd_printd(SFX "Using LPIB position fix\n");
 		return POS_FIX_LPIB;
 	}
+	if (chip->driver_caps & AZX_DCAPS_POSFIX_COMBO) {
+		snd_printd(SFX "Using COMBO position fix\n");
+		return POS_FIX_COMBO;
+	}
 	return POS_FIX_AUTO;
 }
 

sound/pci/hda/hda_intel.c static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { · line 3251

Quoted 8 lines
sound/pci/hda/hda_intel.c +1 -1
@@ -3240,7 +3245,7 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
 	/* CPT */
 	{ PCI_DEVICE(0x8086, 0x1c20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE },
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* PBG */
 	{ PCI_DEVICE(0x8086, 0x1d20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | @@ -

3248,11

Quoted 17 lines

+3253,11 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {

sound/pci/hda/hda_intel.c +2 -3
 	/* Panther Point */
 	{ PCI_DEVICE(0x8086, 0x1e20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE},
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* Lynx Point */
 	{ PCI_DEVICE(0x8086, 0x8c20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
-	  AZX_DCAPS_BUFSIZE},
+	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_COMBO },
 	/* SCH */
 	{ PCI_DEVICE(0x8086, 0x811b),
 	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP |
--

1.7.4.4