linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Ryan Lee <RyanS.Lee@maximintegrated.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"perex@perex.cz" <perex@perex.cz>,
	"tiwai@suse.com" <tiwai@suse.com>,
	"yung-chuan.liao@linux.intel.com"
	<yung-chuan.liao@linux.intel.com>,
	"guennadi.liakhovetski@linux.intel.com" 
	<guennadi.liakhovetski@linux.intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"sathya.prakash.m.r@intel.com" <sathya.prakash.m.r@intel.com>,
	"ryan.lee.maxim@gmail.com" <ryan.lee.maxim@gmail.com>
Subject: Re: [EXTERNAL] Re: [PATCH] ASoC: max98373: Mark cache dirty before entering sleep
Date: Mon, 27 Sep 2021 17:06:22 +0100	[thread overview]
Message-ID: <20210927160622.GE4199@sirena.org.uk> (raw)
In-Reply-To: <SJ0PR11MB566107A6AB3D18ABDEDCF245E7A79@SJ0PR11MB5661.namprd11.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-09-27 16:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 22:13 [PATCH] ASoC: max98373: Mark cache dirty before entering sleep Ryan Lee
2021-09-27 14:54 ` Pierre-Louis Bossart
2021-09-27 16:01   ` [EXTERNAL] " Ryan Lee
2021-09-27 16:06     ` Mark Brown [this message]
2021-09-27 16:48       ` Pierre-Louis Bossart
2021-09-27 17:10         ` Mark Brown
2021-09-27 17:23           ` Pierre-Louis Bossart
2021-09-27 17:29             ` Mark Brown
2021-09-28 16:43             ` Ryan Lee
2021-09-28 18:15               ` Pierre-Louis Bossart
2021-09-27 18:44         ` Ryan Lee
2021-09-27 19:34           ` Pierre-Louis Bossart
2021-09-27 22:43             ` Ryan Lee
2021-09-30  6:21             ` Ryan Lee
2021-09-30 13:29               ` Pierre-Louis Bossart
2021-09-30 23:31               ` Ryan Lee
2021-09-30 23:53                 ` Pierre-Louis Bossart

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=20210927160622.GE4199@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=RyanS.Lee@maximintegrated.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ryan.lee.maxim@gmail.com \
    --cc=sathya.prakash.m.r@intel.com \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).