Re: [PATCH v1 7/8] ASoC: tac5x1x: Add TI TAC5x1x codec driver

From: Mark Brown

Date: Thu Mar 12 2026 - 15:56:45 EST


On Fri, Mar 13, 2026 at 12:18:32AM +0530, Niranjan H Y wrote:

> +/* ADC Analog source Selection */
> +static const char *const tac5x1x_input_analog_sel_text[] = {
> + "Differential",
> + "Single-ended",
> + "Single-ended mux INxP",
> + "Single-ended mux INxM",
> +};
> +
> +static const char *const tac5x1x_input_analog2_sel_text[] = {
> + "Differential",
> + "Single-ended",
> +};

Should these be configurd from DT given that they'll likely depend on
wiring (I know a lot of drivers, especially old ones) make them runtime
configurable)?

> +static s32 tac5x1x_add_ip_diag_controls(struct snd_soc_component *component)
> +{
> + struct tac5x1x_priv *tac5x1x_priv =
> + snd_soc_component_get_drvdata(component);
> + struct tac5x1x *tac5x1x = tac5x1x_priv->tac5x1x;
> + struct tac5x1x_input_diag_config *input_diag_config =
> + &tac5x1x_priv->tac5x1x->input_diag_config;
> + s32 ret = 0;
> +
> + switch (tac5x1x->codec_type) {
> + case TAA5212:
> + break;
> + case TAA5412:
> + case TAC5301:
> + case TAC5311:
> + case TAC5312:
> + case TAC5411:
> + case TAC5412:
> + if (input_diag_config->in_ch_en) {
> + ret = snd_soc_add_component_controls(component,
> + taa_ip_controls,
> + ARRAY_SIZE(taa_ip_controls));

These...

> +static s32 tac5x1x_add_controls(struct snd_soc_component *component)
> +{

> + case TAA5412:
> + ret =
> + snd_soc_add_component_controls(component, tolerance_ctrls,
> + ARRAY_SIZE(tolerance_ctrls));
> + if (ret)
> + return ret;
> + ret =
> + snd_soc_add_component_controls(component,
> + taa_ip_controls,
> + ARRAY_SIZE(taa_ip_controls));

..are also added unconditionally here which will fail due to duplciate
registration?

> +static int tac5x1x_soc_resume(struct snd_soc_component *component)
> +{
> + return 0;
> +}

Just delete the function if there's nothig to do.

Attachment: signature.asc
Description: PGP signature