[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250621185233.4081094-1-alok.a.tiwari@oracle.com>
Date: Sat, 21 Jun 2025 11:52:24 -0700
From: Alok Tiwari <alok.a.tiwari@...cle.com>
To: perex@...ex.cz, tiwai@...e.com, phasta@...nel.org,
andriy.shevchenko@...ux.intel.com, linux-sound@...r.kernel.org
Cc: alok.a.tiwari@...cle.com, linux-kernel@...r.kernel.org
Subject: [PATCH] ALSA: intel8x0: Fix incorrect codec index usage in mixer for ICH4
code mistakenly used a hardcoded index (codec[1]) instead of
iterating, over the codec array using the loop variable i.
Use codec[i] instead of codec[1] to match the loop iteration.
Signed-off-by: Alok Tiwari <alok.a.tiwari@...cle.com>
---
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 51e7f1f1a48e4..b521cec203336 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.46.0
Powered by blists - more mailing lists