From: sashiko-bot@kernel.org
To: "Niranjan H Y" <niranjan.hy@ti.com>, linux-sound@vger.kernel.org
Subject: Re: [PATCH v2 1/5] ASoC: tac5xx2-sdw: add tac5272 support
Date: Thu, 26 Nov 2026 11:36:33 +0000 [thread overview]
Message-ID: <sashiko-outbox-235383@kernel.org> (raw)
In-Reply-To: <20261126112023.29054-1-niranjan.hy@ti.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] ASoC: tac5xx2-sdw: tac_component_probe() registers speaker
path on tac5272
--
commit fd04f2d835d7450161d1e9e240c16a2e7cecb8a0
Author: Niranjan H Y <niranjan.hy@ti.com>
ASoC: tac5xx2-sdw: add tac5272 support
This commit adds support for the tac5272 SoundWire codec variant and
refactors tac_component_probe() to dynamically register common and UAJ
DAPM widgets, routes, and controls based on the part ID.
> diff --git a/sound/soc/codecs/tac5xx2-sdw.c b/sound/soc/codecs/tac5xx2-sdw.c
> index 43584bebdafee..a541f95e4cc5b 100644
> --- a/sound/soc/codecs/tac5xx2-sdw.c
> +++ b/sound/soc/codecs/tac5xx2-sdw.c
[ ... ]
> @@ -1353,40 +1387,78 @@ static struct snd_soc_dai_driver tas2883_dai_driver[] = {
> static s32 tac_component_probe(struct snd_soc_component *component)
> {
> struct tac5xx2_prv *tac_dev = snd_soc_component_get_drvdata(component);
> + u32 part_id = tac_dev->part_id;
> int ret;
>
> ret = pm_runtime_resume(component->dev);
> if (ret < 0 && ret != -EACCES)
> return ret;
>
> - if (!tac_has_uaj_support(tac_dev))
> - goto done_comp_probe;
> + switch (part_id) {
> + case 0x2883:
> + case 0x5272:
> + case 0x5572:
> + case 0x5672:
> + case 0x5682:
> + ret = snd_soc_dapm_new_controls(snd_soc_component_to_dapm(component),
> + tac5xx2_common_widgets,
> + ARRAY_SIZE(tac5xx2_common_widgets));
> + if (ret) {
> + dev_err(component->dev, "Failed to add common widgets: %d\n", ret);
> + break;
> + }
>
> - ret = snd_soc_dapm_new_controls(snd_soc_component_to_dapm(component),
> - tac_uaj_widgets,
> - ARRAY_SIZE(tac_uaj_widgets));
> - if (ret) {
> - dev_err(component->dev, "Failed to add UAJ widgets: %d\n", ret);
> - return ret;
> - }
> + ret = snd_soc_dapm_add_routes(snd_soc_component_to_dapm(component),
> + tac5xx2_common_routes,
> + ARRAY_SIZE(tac5xx2_common_routes));
> + if (ret) {
> + dev_err(component->dev, "Failed to add common routes: %d\n", ret);
> + break;
> + }
>
> - ret = snd_soc_dapm_add_routes(snd_soc_component_to_dapm(component),
> - tac_uaj_routes, ARRAY_SIZE(tac_uaj_routes));
> - if (ret) {
> - dev_err(component->dev, "Failed to add UAJ routes: %d\n", ret);
> - return ret;
> - }
> + ret = snd_soc_add_component_controls(component, tac5xx2_snd_controls,
> + ARRAY_SIZE(tac5xx2_snd_controls));
[Severity: Medium]
Does registering tac5xx2_common_widgets, tac5xx2_common_routes, and
tac5xx2_snd_controls for case 0x5272 still register the speaker path on
tac5272?
Although tac5272_dai_driver omits tac5xx2-aif1 ("DP1 Speaker Playback"),
those three tables still bundle the Port 1 speaker widgets, routes, and
SmartAmp controls alongside the DMIC definitions:
sound/soc/codecs/tac5xx2-sdw.c:
static const struct snd_kcontrol_new tac5xx2_snd_controls[] = {
SOC_DOUBLE_R_RANGE_TLV("Amp Volume", TAC_AMP_LVL_CFG0, TAC_AMP_LVL_CFG1,
2, 0, 44, 1, tac5xx2_amp_tlv),
TAC_DOUBLE_Q78_TLV("DMIC Capture Volume", SM, FU113),
TAC_DOUBLE_Q78_TLV("Speaker Volume", SA, FU21),
};
...
static const struct snd_soc_dapm_widget tac5xx2_common_widgets[] = {
/* Port 1: Speaker Playback Path */
SND_SOC_DAPM_AIF_IN("AIF1 Playback", "DP1 Speaker Playback", 0,
SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_PGA("FU21_L", FU21_L_MUTE_REG, 0, 1, NULL, 0),
SND_SOC_DAPM_PGA("FU21_R", FU21_R_MUTE_REG, 0, 1, NULL, 0),
SND_SOC_DAPM_PGA("FU23_L", FU23_L_MUTE_REG, 0, 1, NULL, 0),
SND_SOC_DAPM_PGA("FU23_R", FU23_R_MUTE_REG, 0, 1, NULL, 0),
SND_SOC_DAPM_OUTPUT("SPK_L"),
SND_SOC_DAPM_OUTPUT("SPK_R"),
On tac5272, this exposes dangling speaker DAPM widgets/routes and
non-existent "Amp Volume" and "Speaker Volume" mixer controls that access
unimplemented SmartAmp SDCA registers when read or written from userspace.
Should the speaker widgets, routes, and controls be split out from the
DMIC entries so that 0x5272 only registers the DMIC and UAJ paths?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126112023.29054-1-niranjan.hy@ti.com?part=1
prev parent reply other threads:[~2026-11-26 11:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 11:20 [PATCH v2 1/5] ASoC: tac5xx2-sdw: add tac5272 support Niranjan H Y
2026-11-26 11:20 ` [PATCH v2 2/5] ASoC: sdw_utils: " Niranjan H Y
2026-11-26 11:33 ` sashiko-bot
2026-11-26 11:20 ` [PATCH v2 3/5] ASoC: tac5xx2-sdw: correct default volume registers Niranjan H Y
2026-11-26 11:28 ` sashiko-bot
2026-11-26 11:20 ` [PATCH v2 4/5] ASoC: tac5xx2-sdw: initialize volume registers to 0 dBFS on first probe Niranjan H Y
2026-11-26 11:20 ` [PATCH v2 5/5] ASoC: tac5xx2-sdw: drop DSP algo re-enable from port post-prepare Niranjan H Y
2026-11-26 11:36 ` sashiko-bot [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=sashiko-outbox-235383@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=niranjan.hy@ti.com \
--cc=sashiko-reviews@lists.linux.dev \
/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