From: Takashi Iwai <tiwai@suse.de>
To: Vincent Cloutier <vincent.cloutier@icloud.com>
Cc: Takashi Iwai <tiwai@suse.de>,
Vincent Cloutier <vincent@cloutier.co>,
Christian Zigotzky <chzigotzky@xenosoft.de>,
Cen Zhang <zzzccc427@gmail.com>, Jaroslav Kysela <perex@perex.cz>,
linux-sound@vger.kernel.org
Subject: Re: [PATCH] ALSA: pcm: Allow HW_REFINE queries with mapped buffers
Date: Wed, 04 Nov 2026 08:28:45 +0100 [thread overview]
Message-ID: <87ld79ukb6.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261104004113.546712-1-vincent.cloutier@icloud.com>
On Wed, 04 Nov 2026 01:40:25 +0100,
Vincent Cloutier wrote:
>
> From: Vincent Cloutier <vincent@cloutier.co>
>
> PulseAudio 16.1 queries supported formats after configuring and mapping
> a PCM buffer. Sharing HW_PARAMS' state checker with HW_REFINE causes
> these queries to fail with -EBADFD because a non-OSS stream has active
> buffer mappings. PulseAudio then fails to create its sinks and sources.
>
> Make the mmap restriction optional in the shared state checker. Keep it
> for HW_PARAMS, which can reconfigure the mapped buffer, but skip it for
> HW_REFINE, which only refines the caller's constraint structure. Keep
> the stream-state checks and buffer access locking for native, compat
> and legacy refinement ioctls rather than bypassing their wrapper.
> Leave the accepted stream states unchanged.
>
> On Librem 5, both L5 and Modem cards reproduce the failure for playback
> and capture: refinement succeeds before setup and after RW setup, but
> fails after MMAP setup in PREPARED state. With this change, all eight
> cases pass, PulseAudio starts normally and audible playback works.
> The reproducer does not start streams or transfer audio data.
>
> Fixes: ad28d2f607d1 ("ALSA: pcm: Serialize and check HW_REFINE ioctls")
> Link: https://lore.kernel.org/linux-sound/41a2e39a-5637-8afa-f84f-f79e63b3b56e@xenosoft.de/
> Link: https://lore.kernel.org/linux-sound/874idyx9n6.wl-tiwai@suse.de/
> Assisted-by: OpenCode:GPT-6.1 Sol
> Signed-off-by: Vincent Cloutier <vincent@cloutier.co>
Applied now. Thanks.
Takashi
next prev parent reply other threads:[~2026-11-04 7:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 9:15 Void PPC: PulseAudio issue with sound updates 7.4-rc1 Christian Zigotzky
2026-11-01 14:53 ` Christian Zigotzky
2026-11-01 15:26 ` Takashi Iwai
2026-11-03 7:34 ` Christian Zigotzky
2026-11-03 7:44 ` Takashi Iwai
2026-11-03 12:00 ` Christian Zigotzky
2026-11-03 14:38 ` Takashi Iwai
2026-11-04 0:40 ` [PATCH] ALSA: pcm: Allow HW_REFINE queries with mapped buffers Vincent Cloutier
2026-11-04 5:27 ` Christian Zigotzky
2026-11-04 7:30 ` Takashi Iwai
2026-11-04 7:28 ` Takashi Iwai [this message]
2026-11-04 11:38 ` Christian Zigotzky
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=87ld79ukb6.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=chzigotzky@xenosoft.de \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=vincent.cloutier@icloud.com \
--cc=vincent@cloutier.co \
--cc=zzzccc427@gmail.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