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

Mark Brown broonie at kernel.org
Fri Sep 11 12:25:20 PDT 2026


On Sat, Jul 11, 2026 at 08:01:55AM +0200, H. Nikolaus Schaller wrote:
> From: Grond <grond66 at riseup.net>
> 
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260911/94e095f7/attachment.sig>


More information about the linux-arm-kernel mailing list