diff options
| author | Vincent Cloutier <vincent@cloutier.co> | 2026-11-03 19:40:25 -0500 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-11-05 08:54:46 +0100 |
| commit | f14f5be3c9e1ca01dce882f43a6fd07afb39542c (patch) | |
| tree | 93332d2d5146f1eca689d7efbc268190f180e817 /scripts/stackusage | |
| parent | f13964de5ee38be8af3cdcbe143cb17431ba3c0d (diff) | |
ALSA: pcm: Allow HW_REFINE queries with mapped buffers
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>
Link: https://patch.msgid.link/20261104004113.546712-1-vincent.cloutier@icloud.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
