Re: [PATCH v6 2/2] ASoC: airoha: Add support for AN7581 PCM driver

From: Mark Brown

Date: Tue Nov 17 2026 - 18:06:29 EST


> The Airoha AN7581 SoC provides a PCM interface for VoIP applications,
> supporting playback and capture at sample rates of 8 kHz and 16 kHz.
> The driver configures the PCM bit clock to 2.048 KHz and supports
> 8-bit and 16-bit samples, with up to 32 channels.

> +++ b/MAINTAINERS
> @@ -796,6 +796,13 @@ F: Documentation/devicetree/bindings/sound/airoha,an7581-afe.yaml
> F: Documentation/devicetree/bindings/sound/airoha,an7581-wm8960.yaml
> F: sound/soc/mediatek/an7581/*
>
> +AIROHA PCM CONTROLLER DRIVER
> +M: Christian Marangi <ansuelsmth@xxxxxxxxx>
> +L: linux-sound@xxxxxxxxxxxxxxx
> +S: Maintained
> +F: Documentation/devicetree/bindings/sound/airoha,an7581-pcm.yaml
> +F: sound/soc/airoha/*
> +

> --- /dev/null
> +++ b/sound/soc/airoha/an7581-pcm.c
> @@ -0,0 +1,931 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Airoha ALSA SoC PCM platform driver for AN7581
> + *
> + * Copyright (C) 2026 Christian Marangi <ansuelsmth@xxxxxxxxx>
> + */

Please keep the entire comment block C++.

> +static irqreturn_t an7581_pcm_irq_handler(int irq, void *data)
> +{
> + struct snd_pcm_substream *substream;
> + struct an7581_pcm_priv *priv = data;
> + unsigned long flags;
> + u32 status, isr = 0;
> + int ret;

This should be irqreturn_t and needs to be initialized in case we didn't
see anything we recognise.

> +static struct platform_driver an7581_pcm_driver = {
> + .driver = {
> + .name = "an7581-pcm",
> + .of_match_table = an7581_pcm_dt_match,
> + },
> + .probe = an7581_pcm_probe,
> + .remove = an7581_pcm_remove,
> +};
> +module_platform_driver(an7581_pcm_driver);

You should set snd_soc_pm_ops too.

--
Mark Brown <broonie@xxxxxxxxxx>