public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: "Holalu Yogendra, Niranjan" <niranjan.hy@ti.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"ckeepax@opensource.cirrus.com" <ckeepax@opensource.cirrus.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"perex@perex.cz" <perex@perex.cz>,
	"tiwai@suse.com" <tiwai@suse.com>,
	"cezary.rojewski@intel.com" <cezary.rojewski@intel.com>,
	"peter.ujfalusi@linux.intel.com" <peter.ujfalusi@linux.intel.com>,
	"yung-chuan.liao@linux.intel.com"
	<yung-chuan.liao@linux.intel.com>,
	"ranjani.sridharan@linux.intel.com"
	<ranjani.sridharan@linux.intel.com>,
	"kai.vehmanen@linux.intel.com" <kai.vehmanen@linux.intel.com>,
	"Xu, Baojun" <baojun.xu@ti.com>,
	"Ding, Shenghao" <shenghao-ding@ti.com>,
	"Kasargod, Sandeep" <sandeepk@ti.com>,
	"Hampiholi, Vallabha" <v-hampiholi@ti.com>,
	"linux-sound@vger.kernel.org" <linux-sound@vger.kernel.org>
Subject: RE: [EXTERNAL] Re: [PATCH v8 1/3] ASoC: tac5xx2-sdw: add soundwire based codec driver
Date: Fri, 17 Apr 2026 04:09:45 +0000	[thread overview]
Message-ID: <b86dab1cf42d4238afd96c1d56757054@ti.com> (raw)
In-Reply-To: <b1970c45-0dd5-476e-88e6-a5eb1b7ee10b@linux.dev>

> On 17:18-20260414, Pierre-Louis Bossart wrote:
> Subject: Re: [PATCH v8 1/3] ASoC: tac5xx2-sdw: add soundwire based codec driver
> 
> > +static int tac_sdw_hw_params(struct snd_pcm_substream *substream,
> > +			     struct snd_pcm_hw_params *params,
> > +			     struct snd_soc_dai *dai)

> > +
> > +	mutex_lock(&tac_dev->pde_lock);
> > +	regmap_write(tac_dev->regmap, SDW_SDCA_CTL(function_id,
> pde_entity,
> > +						   TAC_SDCA_REQUESTED_PS,
> 0),
> > +		     0x03);
> > +	mutex_unlock(&tac_dev->pde_lock);
> 
> I think I provided the feedback several times that the "SDCA way" is to write
> REQUESTED_PS but then wait for ACTUAL_PS to reflect the intended power
> state.
> If this is not required for these devices, you absolutely want to comment on
> this non-standard device-specific sequences.
> 
> Edit: you have a loop to wait on ACTUAL_PS below when you write
> REQUESTED_PS a second time.
> This does require more comments or a code simplification...

This is to ensure D3, so that other writes will happen with device powered down ...

> > +
> > +	guard(mutex)(&tac_dev->pde_lock);
> > +	ret = regmap_write(tac_dev->regmap,
> > +			   SDW_SDCA_CTL(function_id, pde_entity,
> > +					TAC_SDCA_REQUESTED_PS, 0), 0);
> > +	if (ret) {
> > +		dev_err(tac_dev->dev, "failed to set PS to 0: %d\n", ret);
> > +		return ret;
> > +	}
> 
> humm, why do you need to write REQUESTED_PS again?

... and this is D3 -> D0 transition. I will see if I can improve this logic in the next patch.  Thanks 

Regards
Niranjan

      reply	other threads:[~2026-04-17  4:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 14:12 [PATCH v8 1/3] ASoC: tac5xx2-sdw: add soundwire based codec driver Niranjan H Y
2026-04-10 14:12 ` [PATCH v8 2/3] ASoC: sdw_utils: TI amp utility for tac5xx2 family Niranjan H Y
2026-04-10 14:12 ` [PATCH v8 3/3] ASoC: tac5xx2-sdw: ACPI match for intel mtl platform Niranjan H Y
2026-04-14 11:47 ` [PATCH v8 1/3] ASoC: tac5xx2-sdw: add soundwire based codec driver Pierre-Louis Bossart
2026-04-17  4:09   ` Holalu Yogendra, Niranjan [this message]

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=b86dab1cf42d4238afd96c1d56757054@ti.com \
    --to=niranjan.hy@ti.com \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sandeepk@ti.com \
    --cc=shenghao-ding@ti.com \
    --cc=tiwai@suse.com \
    --cc=v-hampiholi@ti.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