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

From: ALOK TIWARI
Date: Thu Jun 19 2025 - 15:27:37 EST




On 6/19/2025 9:08 PM, Andy Shevchenko wrote:
On Wed, Jun 18, 2025 at 12:19:21PM -0700, Alok Tiwari wrote:
Correct the index to use codec[i] to match the loop iteration, not codec[1].

Is this a mistake or intentional?

You marked it as a BUG in the Subject, can you elaborate more, please?


I should have mark this as a query.
Why is the value 1 hardcoded here in the codec?

tmp |= chip->ac97_sdin[pcm->r[0].codec[1]->num] << ICH_DI2L_SHIFT;

https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/sound/pci/intel8x0.c#n2252


Thanks,
Alok