[EXTERNAL] Re: [PATCH] ASoC: max98373: Mark cache dirty before entering sleep

Mark Brown broonie at kernel.org
Mon Sep 27 18:06:22 CEST 2021


On Mon, Sep 27, 2021 at 04:01:25PM +0000, Ryan Lee wrote:

> > >       regcache_cache_only(max98373->regmap, true);
> > > +     regcache_mark_dirty(max98373->regmap);

> > We already do the following sequence in max98373_io_init() when the
> > amplifier re-attaches:

> >         if (max98373->first_hw_init) {
> >                 regcache_cache_bypass(max98373->regmap, false);
> >                 regcache_mark_dirty(max98373->regmap);
> >         }

> > I don't see what marking the cache as dirty on suspend might do, we will do a
> > sync only in the resume step.

> > IIRC this is a patch that we've seen before and removed since it wasn't
> > aligned with any other codec driver.

> Yes, it does. There was an mute problem report due to amp register reset
> during suspend/resume. and we confirmed that the modification 
> is effective. (https://partnerissuetracker.corp.google.com/issues/194472331)
> The added code helps to re-write valid values in cache to the amp hardware
> when audio resume. Same code was there on i2c driver, but not on Soundwire
> driver.

More specifically what it does is make the invalidation of the register
cache unconditional.  It doesn't really matter if the invalidation is
done on suspend or resume, so long as it happens before we attempt to
resync - this could also be done by deleting the first_hw_init check.
-------------- 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/20210927/15a5a5f0/attachment.sig>


More information about the Alsa-devel mailing list