From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Cc: Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Maciej Strozek <mstrozek@opensource.cirrus.com>,
linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@opensource.cirrus.com
Subject: Re: [PATCH v4 6/8] ASoC: SDCA: add sdca_apply_default_control_classifiers() helper
Date: Fri, 18 Sep 2026 15:16:19 +0100 [thread overview]
Message-ID: <aq1Hsw0se8zKVQSE@opensource.cirrus.com> (raw)
In-Reply-To: <20260918131914.681588-7-srinivas.kandagatla@oss.qualcomm.com>
On Fri, Sep 18, 2026 at 02:19:11PM +0100, Srinivas Kandagatla wrote:
> sdca_parse_function() derives is_volatile (see c7b6c6b60594) and the
> spec-defined reset value (see 02d851b46b36) from each Control's
> (entity type, selector, access mode). Codecs that ship static SDCA
> tables via populate_function skip that path, so RW1S action Controls
> end up with is_volatile=0 and get replayed on every regcache_sync.
>
> Add sdca_apply_default_control_classifiers() to re-run those two
> classifiers over a Function. Elevate-only, so codec-set flags win.
> Call from the tail of populate_function.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> ---
> +/**
> + * sdca_apply_default_control_classifiers - apply framework-known Control fields
> + * @function: Function populated via static tables (populate_function path).
> + *
> + * Runs the same per-Control classifiers as sdca_parse_function() so both
> + * entry paths land on identical @is_volatile and @has_reset/@reset fields.
> + * Elevate-only: codec-set flags/values are preserved.
> + */
> +void sdca_apply_default_control_classifiers(struct sdca_function_data *function)
> +{
> + int i, j;
> +
> + for (i = 0; i < function->num_entities; i++) {
> + struct sdca_entity *entity = &function->entities[i];
> +
> + for (j = 0; j < entity->num_controls; j++) {
> + struct sdca_control *control = &entity->controls[j];
> +
> + if (!control->is_volatile)
> + control->is_volatile =
> + find_sdca_control_volatile(entity, control);
> +
> + if (!control->has_reset)
> + find_sdca_control_reset(entity, control);
> + }
> + }
> +}
> +EXPORT_SYMBOL_NS(sdca_apply_default_control_classifiers, "SND_SOC_SDCA");
Just set the values correctly in the tables in the driver, I
don't really like this going back and fixing the tables up leaves
the driver tables looking slightly confusing.
Thanks,
Charles
next prev parent reply other threads:[~2026-09-18 14:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 13:19 [PATCH v4 0/8] ASoC: Qualcomm Tambora (WCD9378) SDCA codec Srinivas Kandagatla
2026-09-18 13:19 ` [PATCH v4 1/8] ASoC: SDCA: allow building without ACPI Srinivas Kandagatla
2026-09-18 13:19 ` [PATCH v4 2/8] ASoC: SDCA: export PM helpers keyed on sdca_class_drv Srinivas Kandagatla
2026-09-18 13:19 ` [PATCH v4 3/8] ASoC: SDCA: expose class SoundWire probe/remove as library Srinivas Kandagatla
2026-09-18 13:19 ` [PATCH v4 4/8] ASoC: SDCA: add class_ops with populate_function Srinivas Kandagatla
2026-09-18 14:15 ` Charles Keepax
2026-09-18 13:19 ` [PATCH v4 5/8] ASoC: SDCA: class_function: xlate sound-dai cell by entity index Srinivas Kandagatla
2026-09-18 13:19 ` [PATCH v4 6/8] ASoC: SDCA: add sdca_apply_default_control_classifiers() helper Srinivas Kandagatla
2026-09-18 14:16 ` Charles Keepax [this message]
2026-09-18 14:20 ` Srinivas Kandagatla
2026-09-18 13:19 ` [PATCH v4 7/8] dt-bindings: sound: qcom: add Tambora WCD9378 SDCA codec Srinivas Kandagatla
2026-09-18 13:51 ` Mark Brown
2026-09-18 13:19 ` [PATCH v4 8/8] ASoC: codecs: add Qualcomm Tambora (WCD9378) " Srinivas Kandagatla
2026-09-18 14:28 ` Charles Keepax
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=aq1Hsw0se8zKVQSE@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mstrozek@opensource.cirrus.com \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@oss.qualcomm.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
all inboxes | Powered by JetHome®