[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ0PR11MB566107A6AB3D18ABDEDCF245E7A79@SJ0PR11MB5661.namprd11.prod.outlook.com>
Date: Mon, 27 Sep 2021 16:01:25 +0000
From: Ryan Lee <RyanS.Lee@...imintegrated.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
"lgirdwood@...il.com" <lgirdwood@...il.com>,
"broonie@...nel.org" <broonie@...nel.org>,
"perex@...ex.cz" <perex@...ex.cz>,
"tiwai@...e.com" <tiwai@...e.com>,
"yung-chuan.liao@...ux.intel.com" <yung-chuan.liao@...ux.intel.com>,
"guennadi.liakhovetski@...ux.intel.com"
<guennadi.liakhovetski@...ux.intel.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "sathya.prakash.m.r@...el.com" <sathya.prakash.m.r@...el.com>,
"ryan.lee.maxim@...il.com" <ryan.lee.maxim@...il.com>
Subject: RE: [EXTERNAL] Re: [PATCH] ASoC: max98373: Mark cache dirty before
entering sleep
> -----Original Message-----
> From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
> Sent: Monday, September 27, 2021 7:55 AM
> To: Ryan Lee <RyanS.Lee@...imintegrated.com>; lgirdwood@...il.com;
> broonie@...nel.org; perex@...ex.cz; tiwai@...e.com; yung-
> chuan.liao@...ux.intel.com; guennadi.liakhovetski@...ux.intel.com; alsa-
> devel@...a-project.org; linux-kernel@...r.kernel.org
> Cc: sathya.prakash.m.r@...el.com; ryan.lee.maxim@...il.com
> Subject: [EXTERNAL] Re: [PATCH] ASoC: max98373: Mark cache dirty before
> entering sleep
>
> EXTERNAL EMAIL
>
>
>
> On 9/24/21 5:13 PM, Ryan Lee wrote:
> > Amp lose its register values in case amp power loss or 'ForceReset'
> > over Soundwire SCP_ctrl register(0x0044) or HW_RESET pin control
> > during the audio suspend and resume.
> > Mark cache dirty before audio suspension to restore existing values
> > when audio resume.
> >
> > Signed-off-by: Ryan Lee <ryans.lee@...imintegrated.com>
> > ---
> > sound/soc/codecs/max98373-sdw.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/sound/soc/codecs/max98373-sdw.c
> > b/sound/soc/codecs/max98373-sdw.c index dc520effc61c..a7e4a6e880b0
> > 100644
> > --- a/sound/soc/codecs/max98373-sdw.c
> > +++ b/sound/soc/codecs/max98373-sdw.c
> > @@ -259,6 +259,7 @@ static __maybe_unused int
> max98373_suspend(struct device *dev)
> > regmap_read(max98373->regmap, max98373->cache[i].reg,
> > &max98373->cache[i].val);
> >
> > 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.
>
> Does this actually improve anything?
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.
>
Powered by blists - more mailing lists