mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Jack Yu <jack.yu@realtek.com>, linux-sound@vger.kernel.org
Cc: Mark Brown <broonie@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: re: ASoC: rt721-sdca: Add RT721 SDCA driver
Date: Tue, 8 Oct 2024 18:02:37 +0100	[thread overview]
Message-ID: <d4ff08fa-199d-4114-bae1-fd36f6a9313c@gmail.com> (raw)

Hi Jack,

With respect to the recent commit in linux-next:

commit 86ce355c1f9ab943bbe099ea7d0b8a3af2247f65
Author: Jack Yu <jack.yu@realtek.com>
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


             reply	other threads:[~2024-10-08 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-08 17:02 Colin King (gmail) [this message]
2024-10-08 17:18 Colin King (gmail)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d4ff08fa-199d-4114-bae1-fd36f6a9313c@gmail.com \
    --to=colin.i.king@gmail.com \
    --cc=broonie@kernel.org \
    --cc=jack.yu@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®