elementary / elementary/settings-sound
Fallback to stream-based device discovery when no input/output port is available
- Dominant language
- Vala
- Stars
- 15
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
### Problem
My Focusrite Clarett 4Pre USB is not listed in elementary Sound’s **Input** tab, even though it is active and usable.
After debugging between `pactl`, testing on elementary, pavucontrol and GNOME, here is the behavior on my machine:
- Clarett appears in **Output** in elementary Sound
- Clarett does **not** appear in **Input** in elementary Sound
- Clarett input/output are both visible and selectable in GNOME Sound and pavucontrol
- Default source is already the Clarett pro input (alsa_input...pro-input-0)
- Device is on pro-audio profile
I have checked the code, and this seems related to how devices are discovered:
- elementary currently relies heavily on **card ports** and active-port matching to build/bind device rows
- in this Clarett pro-audio case, the input stream exists but does not expose usable input port metadata (`Ports` / `Active Port`)
- result: no input device row is created for Clarett in elementary
### Proposal
Keep current port-based discovery, but add a fallback path that discovers devices from real source/sink streams when no matching port-backed device exists.
Suggested behavior:
1. Continue using card ports as primary discovery for normal hardware.
2. If a valid non-monitor source/sink exists but no port-backed row can represent it, create a stream-backed device row.
3. Apply this for both Input and Output.
4. Deduplicate when a port-backed and stream-backed row refer to the same endpoint.
### Prior Art (Optional)
I have no idea how hard the implementation could be, but at least I see that both GNOME and pavucontrol handle it.
GNOME Sound appears to handle this via `gvc`.
And `pavucontrol` enumerates sinks/sources directly from PulseAudio, and ports are only attached as optional metadata. If no ports, it just hides port controls, but the device row itself remains visible.
Contributor guide
Assessment
This issue has not been assessed yet.