devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Linus Walleij" <linusw@kernel.org>
Cc: mfd@lists.linux.dev, conor+dt@kernel.org, lee@kernel.org,
	devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 5/9] ASoC: ux500: Remove the MOP500 machine driver
Date: Thu, 17 Sep 2026 23:03:29 +0000	[thread overview]
Message-ID: <20260917230329.BC95C1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260918-ux500-simple-sound-v2-5-88d29416e3c3@kernel.org>

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] ALSA: devicetree ABI breakage due to removal of stericsson,snd-soc-mop500
- [High] ALSA: ux500: mono streams fail with -EINVAL due to rigid static TDM slot masks
- [Medium] ALSA: silent loss of audio on kernel upgrade due to missing SND_AUDIO_GRAPH_CARD2 selection
- [Medium] ALSA: ux500: loss of cross-DAI synchronization allows conflicting hardware parameters
--

commit 310750ed2beb07b175f87e9079b77587ed249ddd
Author: Linus Walleij <linusw@kernel.org>

ASoC: ux500: Remove the MOP500 machine driver

This patch removes the MOP500 machine driver and its obsolete binding, replacing
it with audio-graph-card2. It updates the ux500 ASoC Kconfig to directly select
the codec, MSP, and DMA platform components previously selected by the machine
driver.

> diff --git a/sound/soc/ux500/Kconfig b/sound/soc/ux500/Kconfig
> index 1130580603500..f3c7c216267c0 100644
> --- a/sound/soc/ux500/Kconfig
> +++ b/sound/soc/ux500/Kconfig
> @@ -6,28 +6,19 @@ menuconfig SND_SOC_UX500
>  	tristate "Ux500"
>  	depends on SND_SOC
>  	depends on MFD_DB8500_PRCMU
> +	depends on AB8500_CORE && AB8500_GPADC
> +	select SND_SOC_AB8500_CODEC
> +	select SND_SOC_UX500_PLAT_MSP_I2S
> +	select SND_SOC_UX500_PLAT_DMA

[Severity: Medium]
Will this lead to a silent loss of audio on kernel upgrade?

When upgrading a kernel config where CONFIG_SND_SOC_UX500_MACH_MOP500 was set,
the old config is dropped. Since the required replacement
CONFIG_SND_AUDIO_GRAPH_CARD2 is neither selected nor implied by SND_SOC_UX500,
users upgrading their kernel using make oldconfig might lose audio support.

[ ... ]

> diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c
> deleted file mode 100644
> index 6d196b4b88027..0000000000000
> --- a/sound/soc/ux500/mop500.c
> +++ /dev/null
[ ... ]
> -static const struct of_device_id snd_soc_mop500_match[] = {
> -	{ .compatible = "stericsson,snd-soc-mop500", },
> -	{},
> -};

[Severity: High]
Does removing this compatible string break devicetree backward compatibility?

Without a backward-compatibility binding provided in the generic driver, audio
will fail to probe on systems booting with existing or older devicetrees that
contain the stericsson,snd-soc-mop500 compatible string.

[ ... ]

> diff --git a/sound/soc/ux500/mop500_ab8500.c b/sound/soc/ux500/mop500_ab8500.c
> deleted file mode 100644
> index feb683c55d113..0000000000000
> --- a/sound/soc/ux500/mop500_ab8500.c
> +++ /dev/null
[ ... ]
> -static int mop500_ab8500_hw_params(struct snd_pcm_substream *substream,
> -			struct snd_pcm_hw_params *params)
> -{
[ ... ]
> -	/* Ensure configuration consistency between DAIs */
> -	scoped_guard(mutex, &mop500_ab8500_params_lock) {
> -		if (mop500_ab8500_usage) {
> -			if (mop500_ab8500_rate != params_rate(params) ||
> -			    mop500_ab8500_channels != params_channels(params)) {
> -				return -EBUSY;
> -			}
> -		} else {
> -			mop500_ab8500_rate = params_rate(params);
> -			mop500_ab8500_channels = params_channels(params);
> -		}
> -		__set_bit(cpu_dai->id, &mop500_ab8500_usage);
> -	}

[Severity: Medium]
Will the removal of these consistency checks allow conflicting hardware
parameters?

When two applications open concurrent streams on the separate DAIs exposed by
the AB8500 codec, requesting different sample rates or channel counts, the
hardware might receive conflicting configuration requests. Since this lock is
removed and neither the generic audio-graph-card2 nor the codec driver
enforces cross-DAI consistency, can this cause synchronization regressions?

[ ... ]
> -	is_playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
> -	switch (channels) {
> -	case 1:
> -		slots = 16;
> -		tx_slots = (is_playback) ? TX_SLOT_MONO : 0;
> -		rx_slots = (is_playback) ? 0 : RX_SLOT_MONO;
> -		break;
> -	case 2:

[Severity: High]
Does removing this dynamic TDM slot configuration cause mono streams to fail?

Without this dynamic update, the CPU DAI falls back to enforcing the static
devicetree mask. The ALSA core will call ux500_msp_dai_hw_params(), which
validates the channel count against the static TDM mask. 

Because the devicetree statically sets a stereo TDM mask (slots_active = 2),
a mono playback request evaluates params_channels() != slots_active as true
and returns -EINVAL. Can this prevent users or applications from requesting
mono playback?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260918-ux500-simple-sound-v2-0-88d29416e3c3@kernel.org?part=5

  reply	other threads:[~2026-09-17 23:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 22:50 [PATCH v2 0/9] ASoC: ux500: Migrate HREF and Samsung audio to audio-graph-card2 Linus Walleij
2026-09-17 22:50 ` [PATCH v2 1/9] ASoC: dt-bindings: sound: Prepare Ux500 audio graph links Linus Walleij
2026-09-17 22:59   ` sashiko-bot
2026-09-17 22:51 ` [PATCH v2 2/9] mfd: dt-bindings: ab8500: Describe codec graph and microphone wiring Linus Walleij
2026-09-17 22:57   ` sashiko-bot
2026-09-24 14:21   ` (subset) " Lee Jones
2026-09-17 22:51 ` [PATCH v2 3/9] ASoC: dt-bindings: ux500: Remove MOP500 sound card binding Linus Walleij
2026-09-17 22:56   ` sashiko-bot
2026-09-17 22:51 ` [PATCH v2 4/9] ASoC: ab8500: Skip digital microphone support on AB8505 Linus Walleij
2026-09-17 23:07   ` sashiko-bot
2026-09-17 22:51 ` [PATCH v2 5/9] ASoC: ux500: Remove the MOP500 machine driver Linus Walleij
2026-09-17 23:03   ` sashiko-bot [this message]
2026-09-18  8:36     ` Linus Walleij
2026-09-17 22:51 ` [PATCH v2 6/9] ARM: dts: ux500: Add sound DAI provider cells Linus Walleij
2026-09-17 22:55   ` sashiko-bot
2026-09-23 17:27   ` Linus Walleij
2026-09-24  6:54     ` Lee Jones
2026-09-24  7:00       ` Linus Walleij
2026-09-24  9:44         ` Lee Jones
2026-09-24 11:04           ` Linus Walleij
2026-09-24 14:22             ` Lee Jones
2026-09-17 22:51 ` [PATCH v2 7/9] ARM: dts: ux500: Convert HREF audio to audio-graph-card2 Linus Walleij
2026-09-17 23:06   ` sashiko-bot
2026-09-18  8:37     ` Linus Walleij
2026-09-17 22:51 ` [PATCH v2 8/9] ARM: dts: ux500: Add Samsung phone audio graphs Linus Walleij
2026-09-17 23:06   ` sashiko-bot
2026-09-17 22:51 ` [PATCH v2 9/9] ARM: config: u8500: Enable audio graph card2 Linus Walleij
2026-09-17 22:57   ` sashiko-bot
2026-09-18 17:17 ` (subset) [PATCH v2 0/9] ASoC: ux500: Migrate HREF and Samsung audio to audio-graph-card2 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=20260917230329.BC95C1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lee@kernel.org \
    --cc=linusw@kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).