From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Niranjan H Y <niranjan.hy@ti.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
tiwai@suse.com, cezary.rojewski@intel.com,
peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com,
ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com,
pierre-louis.bossart@linux.dev, baojun.xu@ti.com,
shenghao-ding@ti.com, sandeepk@ti.com, v-hampiholi@ti.com
Subject: Re: [PATCH v9 1/4] ASoC: SDCA: Add PDE verification reusable helper
Date: Mon, 20 Apr 2026 10:57:59 +0100 [thread overview]
Message-ID: <aeX4pw35JhUbVom4@opensource.cirrus.com> (raw)
In-Reply-To: <20260417131401.3104-1-niranjan.hy@ti.com>
On Fri, Apr 17, 2026 at 06:43:58PM +0530, Niranjan H Y wrote:
> Implement sdca_asoc_pde_ensure_ps() helper function to poll for PDE
> power state transitions. Per SDCA specification, after writing
> REQUESTED_PS, drivers must poll ACTUAL_PS until the target power state
> is reached.
>
> Changes include:
> - Add sdca_asoc_pde_ensure_ps() to handle ACTUAL_PS polling with
> support for device-specific delay tables or default intervals
> - Export function via sdca_asoc.h for use by SDCA-compliant drivers
> - Refactor entity_pde_event() in sdca_asoc.c to use the helper
>
> Signed-off-by: Niranjan H Y <niranjan.hy@ti.com>
> ---
> --- a/include/sound/sdca_asoc.h
> +++ b/include/sound/sdca_asoc.h
> @@ -99,4 +99,13 @@ int sdca_asoc_q78_put_volsw(struct snd_kcontrol *kcontrol,
> struct snd_ctl_elem_value *ucontrol);
> int sdca_asoc_q78_get_volsw(struct snd_kcontrol *kcontrol,
> struct snd_ctl_elem_value *ucontrol);
> +
> +struct device;
> +struct sdca_pde_delay;
sdca_pde_delay should go at the top of the file with the others,
device is already there so can be removed.
> +int sdca_asoc_pde_ensure_ps(struct device *dev, struct regmap *regmap,
Perhaps sdca_asoc_pde_poll_ps, but I don't feel super strongly on
that.
> + int function_id, int entity_id,
> + int from_ps, int to_ps,
> + const struct sdca_pde_delay *pde_delays,
> + int num_delays)
> +{
> + static const int polls = 100;
> + static const int default_poll_us = 1000;
> + unsigned int reg, val;
> + int i, poll_us = default_poll_us;
Put poll_us on its own line, and do all the assigned variables
first. I would combine i and ret on the same line instead.
Other than those minor nitpicks this looks good to me though.
Thanks,
Charles
prev parent reply other threads:[~2026-04-20 9:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 13:13 [PATCH v9 1/4] ASoC: SDCA: Add PDE verification reusable helper Niranjan H Y
2026-04-17 13:13 ` [PATCH v9 2/4] ASoC: tac5xx2-sdw: add soundwire based codec driver Niranjan H Y
2026-04-20 10:10 ` Pierre-Louis Bossart
2026-04-20 16:18 ` Holalu Yogendra, Niranjan
2026-04-21 16:10 ` Pierre-Louis Bossart
2026-04-17 13:14 ` [PATCH v9 3/4] ASoC: sdw_utils: TI amp utility for tac5xx2 family Niranjan H Y
2026-04-17 13:14 ` [PATCH v9 4/4] ASoC: tac5xx2-sdw: ACPI match for intel mtl platform Niranjan H Y
2026-04-20 9:49 ` [PATCH v9 1/4] ASoC: SDCA: Add PDE verification reusable helper Pierre-Louis Bossart
2026-04-20 10:35 ` Charles Keepax
2026-04-20 11:26 ` Pierre-Louis Bossart
2026-04-20 14:03 ` [EXTERNAL] " Holalu Yogendra, Niranjan
2026-04-20 9:57 ` Charles Keepax [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=aeX4pw35JhUbVom4@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=niranjan.hy@ti.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.