re: ASoC: rt721-sdca: Add RT721 SDCA driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux