Re: [PATCH] ASoC: rt715: add main capture switch and main capture volume

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

 



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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux