WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
297784
[GStreamer] Cannot switch audio outputs using PipeWire w/ PulseAudio compatibility enabled
https://bugs.webkit.org/show_bug.cgi?id=297784
Summary
[GStreamer] Cannot switch audio outputs using PipeWire w/ PulseAudio compatib...
Adrian Perez
Reported
2025-08-22 08:34:52 PDT
Steps to reproduce: - Have a session with PipeWire running, plus the pipewire-pulse compatibility service. - Run: GST_DEBUG='webkit*:5' run-minibrowser --wpe \ --features=PerElementSpeakerSelection,ExposeSpeakersWithoutMicrophone,ExposeSpeakers \
https://people.igalia.com/aperez/joplin.html
- Try changing outputs What actually happens is that autoaudiosink has chosen pulsesink to produce output, but the capture device manager is using PipeWire to enumerate devices, hence when trying to switch outputs, we attempt to reconfigure a pulsesink using a GstPipeWireDevice, but of course that doesn't work because the latter can only reconfigure pipewiresink elements! We can see the mismatch in the logged output: 0:00:11.643063450 37 0x5bb3806fb2b0 DEBUG webkitcapturedevicemanager GStreamerCaptureDeviceManager.cpp:171:gstreamerDeviceWithUID: Looking for device with UID alsa_output.usb-Generic_KM_B2_Digital_Audio_20210726905926-00.analog-stereo 0:00:11.643149681 37 0x5bb3806fb2b0 DEBUG webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:4640:audioOutputDeviceChanged:<song-0> Switching to pipewiredevice5<0x7cde64019ff0>, output 'KM_B2 Digital Audio Analog Stereo' 0:00:11.643201328 37 0x5bb3806fb2b0 DEBUG webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:4609:applyAudioSinkDevice:<song-0> Skipped element 'autoaudiosink0-actual-sink-pulse' with device pipewiredevice5<0x7cde64019ff0> 0:00:11.643242415 37 0x5bb3806fb2b0 DEBUG webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:4645:audioOutputDeviceChanged:<song-0> Could not change to audio output device 'alsa_output.usb-Generic_KM_B2_Digital_Audio_20210726905926-00.analog-stereo'
Attachments
Add attachment
proposed patch, testcase, etc.
Adrian Perez
Comment 1
2025-08-22 08:40:38 PDT
Of course if the element chosen by autoaudiosink matches what is being used by the device capture manager to enumerate available devices, things work as expected. I am not sure how to go about fix this, but I do know that autoaudiosink does NOT support telling it which kind of sink to use. Maybe we will have to go through gst_device_create_element() when initially creating the audio sink for the media player pipeline. Or replace the output element from the pipeline with a new one, if we detect that it mismatches what the GstDevice can handle... but I am not sure if this second option can actually be done. Docs:
https://gstreamer.freedesktop.org/documentation/gstreamer/gstdevice.html?gi-language=c#gst_device_create_element
Philippe Normand
Comment 2
2025-08-25 02:51:29 PDT
The PipeWire device provider masks the ALSA device provider when it detects ALSA devices, afaics...
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/gst/gstpipewiredeviceprovider.c?ref_type=heads#L677
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug