[BUG] ALSA: intel8x: Why incorrect codec index used setting ICH_DI2L SDIN

From: Alok Tiwari
Date: Wed Jun 18 2025 - 15:19:59 EST


Correct the index to use codec[i] to match the loop iteration, not codec[1].

Is this a mistake or intentional?

Thanks,
Alok

propose changes
Signed-off-by: Alok Tiwari <alok.a.tiwari@xxxxxxxxxx>
---
sound/pci/intel8x0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 51e7f1f1a48e..b521cec20333 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -2249,7 +2249,7 @@ static int snd_intel8x0_mixer(struct intel8x0 *chip, int ac97_clock,
tmp |= chip->ac97_sdin[0] << ICH_DI1L_SHIFT;
for (i = 1; i < 4; i++) {
if (pcm->r[0].codec[i]) {
- tmp |= chip->ac97_sdin[pcm->r[0].codec[1]->num] << ICH_DI2L_SHIFT;
+ tmp |= chip->ac97_sdin[pcm->r[0].codec[i]->num] << ICH_DI2L_SHIFT;
break;
}
}
--
2.47.1