re: ASoC: rt721-sdca: Add RT721 SDCA driver
From: Colin King (gmail)
Date: Tue Oct 08 2024 - 13:02:55 EST
Hi Jack,
With respect to the recent commit in linux-next:
commit 86ce355c1f9ab943bbe099ea7d0b8a3af2247f65
Author: Jack Yu <jack.yu@xxxxxxxxxxx>
Date: Tue Oct 1 09:17:38 2024 +0000
ASoC: rt721-sdca: Add RT721 SDCA driver
I'm flagging up an issue in function rt721_sdca_dmic_set_gain_get there
are a bunch of nested if statements as follows:
if (!adc_vol_flag) /* boost gain */
ctl = regvalue / boost_step;
else { /* ADC gain */
if (adc_vol_flag)
ctl = p->max - (((vol_max - regvalue) &
0xffff) / interval_offset);
else
ctl = p->max - (((0 - regvalue) &
0xffff) / interval_offset);
}
The last else statement ctl = p->max - (((0 - regvalue) & 0xffff) /
interval_offset) is redundant, since this is the !adc_vol_flag checked
for in the first boost gain if clause.
Colin