Re: [PATCH v6 1/3] ASoC: tac5xx2-sdw: add soundwire based codec driver

Mark Brown
2026-04-09T20:35:40Z

[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]

On Thu, Apr 09, 2026 at 12:22:09AM +0530, Niranjan H Y wrote:
> Add codec driver for tac5xx2 family of devices.

Only a couple of very minor additional issues:

> This includes the support for

> 4. tac5682 - Similar to tac5672 with Amplifier DSP.

> +config SND_SOC_TAC5XX2_SDW
> + tristate "Texas Instruments TAC5XX2 SoundWire Smart Amplifier"
> + depends on SOUNDWIRE
> + depends on SND_SOC_SDCA
> + help
> + This option enables support for Texas Instruments TAC5XX2 family
> + of SoundWire Smart Amplifiers. This includes TAC5572, TAC5672,
> + TAC568 and TAS2883. To compile this driver as a module, choose
> + M here: the module will be called snd-soc-tac5xx2.

TAC568 is a typo isn't it?

> +static int tac5xx2_set_jack(struct snd_soc_component *component,
> + struct snd_soc_jack *hs_jack, void *data)
> +{

> + ret = regmap_write(tac_dev->regmap, SDW_SCP_SDCA_INTMASK2,
> + SDW_SCP_SDCA_INTMASK_SDCA_11);
> + if (ret)
> + dev_warn(tac_dev->dev,
> + "Failed to register jack detection interrupt");
> +
> + ret = regmap_write(tac_dev->regmap, SDW_SCP_SDCA_INTMASK3,
> + SDW_SCP_SDCA_INTMASK_SDCA_16);
> + if (ret)
> + dev_warn(tac_dev->dev,
> + "Failed to register for button detect interrupt");
> +
> + return ret;
> +}

It's a bit odd that we log but don't return the error from the first
write failure but do return the second one. Really we ought to do
return both, and unwind the first enable if the second write fails.
Probably not that important though.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]