[PATCH v2 05/20] ASoC: codecs: pcm1754: Add PCM1773 support

Mark Brown broonie at kernel.org
Tue Nov 24 06:48:03 PST 2026


> Extend the PCM1754 codec driver to support the related PCM1773 DAC.
> Select the DAI name, supported formats and sample rate limits per
> variant. Handle the different FMT pin polarity and an optional format
> GPIO, avoiding GPIO writes when the format pin is not controlled by the
> driver. Add an optional enable GPIO for the PCM1773 power-down input,
> controlled by a DAPM supply event to enable the DAC after power-up and
> disable it before power-down.

> +	case SND_SOC_DAIFMT_LEFT_J:
> +		if (priv->variant != &pcm1773_variant ||
> +		    (params_width(params) != 16 && params_width(params) != 24))
> +			return -EINVAL;
> +		format = 0;
>  		break;

If you've got a struct describing the variant it is obviously not
tasteful to open code a check based on the address of the variant struct
rather than looking at something inside the description of the variant.

-- 
Mark Brown <broonie at kernel.org>



More information about the linux-arm-kernel mailing list