[PATCH] ASoC: rt715: add main capture switch and main capture volume
Mark Brown
broonie at kernel.org
Thu Mar 18 13:08:57 CET 2021
On Thu, Mar 18, 2021 at 03:35:31AM +0000, Jack Yu wrote:
> > > - *l_val = (val_h << 8);
> > > + *l_val = val_h << 8;
> > > ret = regmap_read(rt715->regmap, addr_h, l_val);
> > > if (ret < 0)
> > > pr_err("Failed to get L channel gain.\n");
> > This looks like an unrelated formatting change.
> Because regmap has its own callback for read/write, so the formatting change is required for callback.
This change is literally just removing some brackets that don't do
anything, the regmap API has no impact here.
> > > if (mc->invert) {
> > > /* for mute status */
> > > - read_ll = !((read_ll & 0x80) >> RT715_MUTE_SFT);
> > > - read_rl = !((read_rl & 0x80) >> RT715_MUTE_SFT);
> > > + read_ll = !(read_ll & 0x80);
> > > + read_rl = !(read_rl & 0x80);
> > > } else {
> > > /* for gain */
> > > read_ll = read_ll & 0x7f;
> > This too.
> This change is just to simplify the code. The result will still be the same.
Sure, but that should be a separate patch with a separate changelog
which explicitly says that this is being done.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210318/5b7dd709/attachment-0001.sig>
More information about the Alsa-devel
mailing list