Skip to content

Commit

Permalink
ALSA: hda - add sanity check to force the separate stream tags
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
perexg authored and tiwai committed Feb 15, 2017
1 parent e7480b3 commit df56c3d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit df56c3d

Please sign in to comment.