Audio portal #1142
Replies: 17 comments 66 replies
-
One question here is: does it make to keep the camera separate? Or could this just be an 'Pipewire access' portal? I seem to remember that people have asked for screencast+audio before |
Beta Was this translation helpful? Give feedback.
-
I think the screencast+audio case would be entirely contained within the Screencast portal. Apps request a screencast with audio, get a PipeWire remote, and connect to whatever streams are available there. @Obsessee per-device control sounds like a policy to implement on the media session (WirePlumber) level, not on portal level. |
Beta Was this translation helpful? Give feedback.
-
Since it's just audio, why not group camera and microphone as a request for audio input? |
Beta Was this translation helpful? Give feedback.
-
Sure |
Beta Was this translation helpful? Give feedback.
-
Differentiating between switches for input and output would be really terrific. I'd like to disallow badly behaving apps from capturing my microphone for voice input when I'm just using it to play music. Would especially help for fat fingering buttons on a Linux phone. I feel like bringing this up now before there's an implementation because I don't think it'd be considered a big enough issue to revise the portal later down the line.
I think application audio would probably be better fit for a Media Sharing portal, as it's not a (physical) device. |
Beta Was this translation helpful? Give feedback.
-
Another device category I did not consider: MIDI devices. They're managed by PipeWire as well. |
Beta Was this translation helpful? Give feedback.
-
PulseAudio access is done with About the sources:
Also how do you specify the control of the graph? Example Helvum. Or the DAW that want to control all the audio, but do not need the video. Shall we have a permission for fuller access or shall grant it like it is currently done with |
Beta Was this translation helpful? Give feedback.
-
This sounds a bit like the devices portal that has been discussed as a "replacement" for the camera portal. Perhaps a less generic name is needed than "devices". A "audio" portal that doesn't involve cameras could work too I guess, but it should ideally be easy to open a PipeWire remote that gets you both microphone and camera streams. The "OpenPipeWireRemote" you add here adds different sources that would be exposed in the remote, including "camera", is that intentional?
The point here is to create some predictable expectations. If an app gets "microphone" access, it shouldn't be able to "eaves drop" on every app's PipeWire source. In other words, applications can be audio input, but that doesn't mean it's a "microphone". |
Beta Was this translation helpful? Give feedback.
-
Yes indeed. |
Beta Was this translation helpful? Give feedback.
-
We seem to cyclicly float between "specific portals for independent categories of devices", and "generic portal covering pretty much all that PipeWire covers". I can see pros and cons for both approaches, and I haven't really made my mind about it. I like the elegance and explicit semantic of specific portals. Want a camera? Camera portal; need audio? Audio portal; etc. But the downside is that we have to copy-paste an almost identical API in each one of them ( A catch-all PipeWire portal ("Devices" portal) would solve the multiple remotes problem, apps would be able to request multiple classes of devices in a single call ( I don't have a conclusive answer here, but I'm slightly happier with separate portals, even if that means apps having to open multiple PipeWire remotes. We can encode domain-specific knowledge in these portals - like the discussion above about audio device types, which wouldn't apply to camera video. |
Beta Was this translation helpful? Give feedback.
-
The Audio portal is still being discussed ? |
Beta Was this translation helpful? Give feedback.
-
How would this interact with the JACK, PulseAudio, and ALSA APIs? Would applications need to use PipeWire's APIs for audio I/O? If so, it will be an uphill battle getting applications to use the portal instead of continuing to use |
Beta Was this translation helpful? Give feedback.
-
Now that the Pipewire Security Context is landing, would it technically be possible to start work on this, or is there more work needed for this to fall into place? |
Beta Was this translation helpful? Give feedback.
-
I try to restart discussion about audio source type so from I found here, we have:
|
Beta Was this translation helpful? Give feedback.
-
This thread is about how the flow portal should be: Microphone, speaker, midi wording will be kept to avoid confusion. Wording of media roles is not part of this thread. To took in account:
If a new potential flow is proposed, I might add it in the following. Full access to all device of the same type (actual proposition)Like the Camera portal, the application get a PipeWire core with all Microphone/Speaker/Midi devices. Similar to the android way… Fine-grained accessThe android way has its limits and allowing some devices through a prompt may be better…
|
Beta Was this translation helpful? Give feedback.
-
Software Sound Control
Hardware Sound Control
Are there any specific limitations that we want to apply if hardware volume control is available? (then, options to override limitations) |
Beta Was this translation helpful? Give feedback.
-
Earphones and Headsets (audio output + microphone)
|
Beta Was this translation helpful? Give feedback.
-
Right now, the almost ubiquitous way for sandboxed applications to access audio is through PulseAudio (even if the other end of the socket is PipeWire). On Flatpak, that translates to most apps having the
pipewire
socket always enabled as a static permission.This is not ideal for multiple reasons: we're trying to move away from static permissions as much as possible; and this mechanism doesn't give much granularity over permissions to control audio.
We should discuss and explore introducing an Audio portal, that would operate much like the Camera portal, but focused on the various ways apps can use audio devices.
The D-Bus interface would look roughly like this:
Design Considerations
CC @hfiguiere @matthiasclasen @jadahl
Beta Was this translation helpful? Give feedback.
All reactions