public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Holalu Yogendra, Niranjan" <niranjan.hy@ti.com>
To: Mark Brown <broonie@kernel.org>,
	"pierre-louis.bossart@linux.dev" <pierre-louis.bossart@linux.dev>
Cc: "linux-sound@vger.kernel.org" <linux-sound@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.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>
Subject: Re: [PATCH v5 1/3] ASoC: tac5xx2-sdw: add soundwire based codec driver
Date: Wed, 8 Apr 2026 13:37:44 +0000	[thread overview]
Message-ID: <f3c662fcbdb8483f9ba676e5d00837d0@ti.com> (raw)
In-Reply-To: <476c9252-fd4d-4e9f-9f32-6ae3aa3ddc1c@sirena.org.uk>

> On 22:01-20260407, Mark Brown wrote:
> Subject: Re: [PATCH v5 1/3] ASoC: tac5xx2-sdw: add soundwire based codec driver
> 
> On Tue, Apr 07, 2026 at 03:18:27PM +0530, Niranjan H Y wrote:
> 
> > +static s32 tac_load_and_cache_firmware(struct tac5xx2_prv *tac_dev)
> > +{
...
> > +	ret = request_firmware(&fmw, tac_dev->fw_binaryname, tac_dev-
> >dev);
> 
> This is happening in the SoundWire bus callback - if request_firmware()
> ends up being slow (eg, a userspace helper faffing) we might block other
> things on the bus.
I'll move this to probe and use request_firmware_nowait() to prepare
the firmware in background.

> > +
> > +		if (first) {
> > +			/* Set default value to CS:11 */
> > +			tac_dev->cx11_value = 1;
> > +			regmap_write(tac_dev->regmap,
> > +				     SDW_SDCA_CTL(TAC_FUNCTION_ID_SM,
> > +						  TAC_SDCA_ENT_CX11,
> > +
> 	TAC_SDCA_CTL_CX_CLK_SEL, 0),
> > +					tac_dev->cx11_value);
> 
> This looks like it could race with tac_cx11_put() - they both write
> cx11_value but the control could be modifying it.  I can imagine that
> happening if userspace starts and is setting config while the SoundWire
> bus is coming on line.

I will drop the userspace control as Pierre suggested. The CX11 clock 
selector will be set to the default value (CS:11) during initialization,
eliminating the race condition. The device functions correctly with this
fixed configuration for smart mic based on my testing.

Regards
Niranjan

  reply	other threads:[~2026-04-08 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07  9:48 [PATCH v5 1/3] ASoC: tac5xx2-sdw: add soundwire based codec driver Niranjan H Y
2026-04-07  9:48 ` [PATCH v5 2/3] ASoC: sdw_utils: TI amp utility for tac5xx2 family Niranjan H Y
2026-04-07  9:48 ` [PATCH v5 3/3] ASoC: tac5xx2-sdw: ACPI match for intel mtl platform Niranjan H Y
2026-04-07 16:31 ` [PATCH v5 1/3] ASoC: tac5xx2-sdw: add soundwire based codec driver Mark Brown
2026-04-08 13:37   ` Holalu Yogendra, Niranjan [this message]
2026-04-08  7:03 ` 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=f3c662fcbdb8483f9ba676e5d00837d0@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