All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ALSA: hda - fix Lewisburg audio issue
@ 2017-02-15 16:09 Jaroslav Kysela
  2017-02-15 16:09 ` [PATCH 2/2] ALSA: hda - add sanity check to force the separate stream tags Jaroslav Kysela
  2017-02-15 20:25 ` [PATCH 1/2] ALSA: hda - fix Lewisburg audio issue Takashi Iwai
  0 siblings, 2 replies; 4+ messages in thread
From: Jaroslav Kysela @ 2017-02-15 16:09 UTC (permalink / raw)
  To: ALSA development; +Cc: Takashi Iwai

Like for Sunrise Point, the total stream number of Lewisburg's
input and output stream exceeds 15 (GCAP is 0x9701), which will
cause some streams do not work because of the overflow on
SDxCTL.STRM field if using the legacy stream tag allocation method.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
 sound/pci/hda/hda_intel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index faf99cc..7d77bb5 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2214,9 +2214,9 @@ static const struct pci_device_id azx_ids[] = {
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
 	/* Lewisburg */
 	{ PCI_DEVICE(0x8086, 0xa1f0),
-	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
+	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
 	{ PCI_DEVICE(0x8086, 0xa270),
-	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
+	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
 	/* Lynx Point-LP */
 	{ PCI_DEVICE(0x8086, 0x9c20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ALSA: hda - add sanity check to force the separate stream tags
  2017-02-15 16:09 [PATCH 1/2] ALSA: hda - fix Lewisburg audio issue Jaroslav Kysela
@ 2017-02-15 16:09 ` Jaroslav Kysela
  2017-02-15 20:25   ` Takashi Iwai
  2017-02-15 20:25 ` [PATCH 1/2] ALSA: hda - fix Lewisburg audio issue Takashi Iwai
  1 sibling, 1 reply; 4+ messages in thread
From: Jaroslav Kysela @ 2017-02-15 16:09 UTC (permalink / raw)
  To: ALSA development; +Cc: Takashi Iwai

It seems that newer Intel chipsets have more than 15 I/O streams (total).
This patch forces the separate stream tags, when this hardware is detected
to avoid SDxCTL.STRM field overflow and an unexpected behaviour.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
 sound/pci/hda/hda_intel.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 7d77bb5..16108f0e 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1778,6 +1778,14 @@ static int azx_first_init(struct azx *chip)
 	chip->playback_index_offset = chip->capture_streams;
 	chip->num_streams = chip->playback_streams + chip->capture_streams;
 
+	/* sanity check for the SDxCTL.STRM field overflow */
+	if (chip->num_streams > 15 &&
+	    (chip->driver_caps & AZX_DCAPS_SEPARATE_STREAM_TAG) == 0) {
+		dev_warn(chip->card->dev, "number of I/O streams is %d, "
+			 "forcing separate stream tags", chip->num_streams);
+		chip->driver_caps |= AZX_DCAPS_SEPARATE_STREAM_TAG;
+	}
+
 	/* initialize streams */
 	err = azx_init_streams(chip);
 	if (err < 0)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ALSA: hda - fix Lewisburg audio issue
  2017-02-15 16:09 [PATCH 1/2] ALSA: hda - fix Lewisburg audio issue Jaroslav Kysela
  2017-02-15 16:09 ` [PATCH 2/2] ALSA: hda - add sanity check to force the separate stream tags Jaroslav Kysela
@ 2017-02-15 20:25 ` Takashi Iwai
  1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2017-02-15 20:25 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: ALSA development

On Wed, 15 Feb 2017 17:09:42 +0100,
Jaroslav Kysela wrote:
> 
> Like for Sunrise Point, the total stream number of Lewisburg's
> input and output stream exceeds 15 (GCAP is 0x9701), which will
> cause some streams do not work because of the overflow on
> SDxCTL.STRM field if using the legacy stream tag allocation method.
> 
> Signed-off-by: Jaroslav Kysela <perex@perex.cz>

Applied (with Cc to stable) now.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] ALSA: hda - add sanity check to force the separate stream tags
  2017-02-15 16:09 ` [PATCH 2/2] ALSA: hda - add sanity check to force the separate stream tags Jaroslav Kysela
@ 2017-02-15 20:25   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2017-02-15 20:25 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: ALSA development

On Wed, 15 Feb 2017 17:09:43 +0100,
Jaroslav Kysela wrote:
> 
> It seems that newer Intel chipsets have more than 15 I/O streams (total).
> This patch forces the separate stream tags, when this hardware is detected
> to avoid SDxCTL.STRM field overflow and an unexpected behaviour.
> 
> Signed-off-by: Jaroslav Kysela <perex@perex.cz>

It's a good idea.  Applied now.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-15 20:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 16:09 [PATCH 1/2] ALSA: hda - fix Lewisburg audio issue Jaroslav Kysela
2017-02-15 16:09 ` [PATCH 2/2] ALSA: hda - add sanity check to force the separate stream tags Jaroslav Kysela
2017-02-15 20:25   ` Takashi Iwai
2017-02-15 20:25 ` [PATCH 1/2] ALSA: hda - fix Lewisburg audio issue Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.