From: Andreas Gnau <rondom@rondom.de>
To: Christian Marangi <ansuelsmth@gmail.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 2/2] ASoC: airoha: Add support for AN7581 PCM driver
Date: Thu, 26 Nov 2026 23:33:51 +0100 [thread overview]
Message-ID: <cd519b00-247e-4dab-8b0f-b339b1908859@rondom.de> (raw)
In-Reply-To: <20261120234640.169279-3-ansuelsmth@gmail.com>
Hi Christian,
On 21/11/2026 00:46, Christian Marangi wrote:
> 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.
>
> Add an ASoC platform driver for the AN7581 PCM controller configured for
> ZSI attached voice chip.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> MAINTAINERS | 7 +
> sound/soc/Kconfig | 1 +
> sound/soc/Makefile | 1 +
> sound/soc/airoha/Kconfig | 11 +
> sound/soc/airoha/Makefile | 3 +
> sound/soc/airoha/an7581-pcm.c | 929 ++++++++++++++++++++++++++++++++++
> 6 files changed, 952 insertions(+)
> create mode 100644 sound/soc/airoha/Kconfig
> create mode 100644 sound/soc/airoha/Makefile
> create mode 100644 sound/soc/airoha/an7581-pcm.c
>
> <snip>
> + if ((unsigned long)rate * channels * bit_width > AN7581_PCM_DEFAULT_BCLK * HZ_PER_KHZ) {
> + dev_err(rtd->card->dev,
> + "%u channels at %u Hz and %d-bit exceed %u KHz BCLK\n",
> + channels, rate, bit_width,
> + AN7581_PCM_DEFAULT_BCLK);
> + mutex_unlock(&priv->user_lock);
> + return -EINVAL;
> + }
> +
> + if (priv->users <= 1) {
> + /* one bit delay for ZSI */
> + regmap_set_bits(priv->map, AN7581_PCM_PICR, AN7581_PCM_ONE_BIT_DELAY);
Sorry for coming so late with this and maybe it is not a big issue and
maybe you already thought about this:
ZSI (Zarlink Serial Interface) is a Microsemi/Microchip/Zarlink protocol
that multiplexes the control channel of the SLIC over the PCM pins.
Assuming that a conventionally connected SLIC (i.e. control via SPI and
voice via plain PCM) does not require this "one bit delay for ZSI", how
would we add support for it, without introducing a regression for
ZSI-attached SLICs? I mean, there is nothing in the device-tree telling
the driver that there is a SLIC attached via ZSI and this code here
suggests that the driver hardcodes some behaviour only desired when ZSI
rather than plain PCM+SPI is used.
Best Regards,
Andreas Gnau
next prev parent reply other threads:[~2026-11-26 22:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 23:46 [PATCH v7 0/2] ASoC: " Christian Marangi
2026-11-20 23:46 ` [PATCH v7 1/2] ASoC: dt-bindings: airoha: Add AN7581 PCM controller Christian Marangi
2026-11-20 23:46 ` [PATCH v7 2/2] ASoC: airoha: Add support for AN7581 PCM driver Christian Marangi
2026-11-26 22:33 ` Andreas Gnau [this message]
2026-11-24 18:07 ` [PATCH v7 0/2] ASoC: " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd519b00-247e-4dab-8b0f-b339b1908859@rondom.de \
--to=rondom@rondom.de \
--cc=ansuelsmth@gmail.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®