ALSA: hda: Refer to correct stream index at loops
authorTakashi Iwai <tiwai@suse.de>
Tue, 21 Nov 2023 15:41:25 +0000 (16:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:26 +0000 (20:14 +0000)
commit32a600b8f6f4354a93dcbe4d874c3293d9383293
treea11dcbaad48e7f078bca0245ce26a3a77992b103
parent2a7b12d4705bc308cf18eae2b69ec8db34881cc3
ALSA: hda: Refer to correct stream index at loops

[ Upstream commit 26257869672fd4a06a60c2da841e15fb2cb47bbe ]

In a couple of loops over the all streams, we check the bitmap against
the loop counter.  A more correct reference would be, however, the
index of each stream, instead.

This patch corrects the check of bitmaps to the stream index.

Note that this change doesn't fix anything for now; all existing
drivers set up the stream indices properly, hence the loop count is
always equal with the stream index.  That said, this change is only
for consistency.

Link: https://lore.kernel.org/r/20231121154125.4888-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/hda/hdac_stream.c