From: "Holalu Yogendra, Niranjan" <niranjan.hy@ti.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Mark Brown <broonie@kernel.org>
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 v15 2/4] ASoC: tac5xx2-sdw: add soundwire based codec driver
Date: Tue, 5 May 2026 10:38:37 +0000 [thread overview]
Message-ID: <5279216f15c144eb84ef39fe53ea0386@ti.com> (raw)
In-Reply-To: <71f22f63-c772-42c5-86e2-2703be7fb056@linux.dev>
> On 23:11-20260504, Pierre-Louis Bossart wrote:
> Subject: Re: [PATCH v15 2/4] ASoC: tac5xx2-sdw: add soundwire based codec driver
>
> On 5/4/26 15: 52, Mark Brown wrote:
> > On Mon, May 04, 2026 at 06:27:14PM +0530, Niranjan H Y wrote:
> >> Add codec driver for tac5xx2 family of devices.
> >
> >> +static s32 tac5xx2_sdca_dev_resume(struct device *dev)
> >> +{
> >> + struct tac5xx2_prv *tac_dev = dev_get_drvdata(dev);
> >> + struct sdw_slave *slave = dev_to_sdw_dev(dev);
> >> + unsigned long t;
> >> + int ret;
> >
> >> +
> >> + /* Detect and set jack type for UAJ path before playback.
> >> + * This is required as jack detection does not trigger interrupt
> >> + * when device is in runtime_pm suspend with bus in clock stop mode.
> >> + */
> >> + if (tac_has_uaj_support(tac_dev))
> >> + tac5xx2_sdca_headset_detect(tac_dev);
> >> +
> >> +regmap_sync:
> >> + regcache_cache_only(tac_dev->regmap, false);
> >> + regcache_mark_dirty(tac_dev->regmap);
> >> + ret = regcache_sync(tac_dev->regmap);
> >> + if (ret < 0)
> >> + dev_warn(dev, "Failed to sync regcache: %d\n", ret);
> >
> > We do the jack detect before we reinitialise the registers, meaning the
> > device is still in cache only mode and volatile reads will all return
> > -EBUSY.
>
> Indeed, and there's also another set of initializations that won't happen in the
> io_init.
>
> It's a bit complicated because we have to deal with device attachment and
> suspend-resume, and the two parts aren't necessarily equivalent.
> - when resuming the bus the codec will also be resumed
> - but the device can go to runtime_pm suspend while still attached on the bus
> (e.g. if another device is active on the same bus).
>
> Other drivers have regcache_cache_only(tac_dev->regmap, false); in the two
> paths (io_init and resume) to make sure both cases are handled.
I will reorder and fix it in next patch.
The reason there was no error while testing is that, the callback always waited for
"attach" to finish. During attach we call regcache_cache_only(tac_dev->regmap, false) before calling io_init.
Regards
Niranjan
next prev parent reply other threads:[~2026-05-05 10:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 12:57 [PATCH v15 0/4] ASoC: Add TI TAC5XX2 SoundWire codec driver support Niranjan H Y
2026-05-04 12:57 ` [PATCH v15 1/4] ASoC: SDCA: Add PDE verification reusable helper Niranjan H Y
2026-05-04 17:07 ` Pierre-Louis Bossart
2026-05-04 12:57 ` [PATCH v15 2/4] ASoC: tac5xx2-sdw: add soundwire based codec driver Niranjan H Y
2026-05-04 13:52 ` Mark Brown
2026-05-04 17:41 ` Pierre-Louis Bossart
2026-05-05 10:38 ` Holalu Yogendra, Niranjan [this message]
2026-05-04 17:07 ` Pierre-Louis Bossart
2026-05-04 12:57 ` [PATCH v15 3/4] ASoC: sdw_utils: TI amp utility for tac5xx2 family Niranjan H Y
2026-05-04 13:49 ` Mark Brown
2026-05-04 12:57 ` [PATCH v15 4/4] ASoC: tac5xx2-sdw: ACPI match for intel mtl platform Niranjan H Y
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=5279216f15c144eb84ef39fe53ea0386@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