Re: [PATCH 08/16] ASoC: pcm1773-codec: write a driver for the PCM1773 chip from TI

From: Mark Brown

Date: Fri Sep 11 2026 - 15:34:13 EST


On Sat, Jul 11, 2026 at 08:01:55AM +0200, H. Nikolaus Schaller wrote:
> From: Grond <grond66@xxxxxxxxxx>
>
> This chip is used in the OpenPandora.

> +++ b/sound/soc/codecs/pcm1773.c
> @@ -0,0 +1,149 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * pcm1773.c -- codec for the simple PCM1773 output codec from TI
> + *
> + * Shamelessly cobbled together from sound/soc/ti/omap3pandora.c and a few
> + * other codec drivers in sound/soc/codecs/

Please make the entire comment a C++ one so things look more
intentional.

> + .playback = {
> + .stream_name = "PCM1773 IN",
> + .channels_min = 2,
> + .channels_max = 2,
> + .rates = SNDRV_PCM_RATE_8000_48000,
> + // [TODO] these really should be BE, per the data sheet but for
> + // some reason the omap-mcbsp driver claims only to support LE.
> + // investigate
> + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
> + },

The format described here is the in memory format, not the wire format.

> + ctx->regulator = devm_regulator_get(dev, "vcc");
> + if (IS_ERR(ctx->regulator)) {
> + dev_warn(dev, "cannot get regulator 'vcc'");
> + ctx->regulator = NULL;
> + }

This is obviously broken. The driver should handle the error as a
normal error, not just ignore it.

Attachment: signature.asc
Description: PGP signature