> 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 <[email protected]>

Reply via email to