mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 13:41:55 +00:00
ALSA: hda - add sanity check to force the separate stream tags
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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
e7480b34ad
commit
df56c3dbae
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user