Skip to content

Commit b045ab3

Browse files
committed
ALSA: ctxfi: Fix missing SPDIFI1 index handling
SPDIF1 DAIO type isn't properly handled in daio_device_index() for hw20k2, and it returned -EINVAL, which ended up with the out-of-bounds array access. Follow the hw20k1 pattern and return the proper index for this type, too. Reported-and-tested-by: Karsten Hohmeier <linux@hohmatik.de> Closes: https://lore.kernel.org/20260315155004.15633-1-linux@hohmatik.de Cc: <stable@vger.kernel.org> Link: https://patch.msgid.link/20260329091240.420194-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 1fbf85d commit b045ab3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sound/pci/ctxfi/ctdaio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ static unsigned int daio_device_index(enum DAIOTYP type, struct hw *hw)
118118
switch (type) {
119119
case SPDIFOO: return 0;
120120
case SPDIFIO: return 0;
121+
case SPDIFI1: return 1;
121122
case LINEO1: return 4;
122123
case LINEO2: return 7;
123124
case LINEO3: return 5;

0 commit comments

Comments
 (0)