Skip to content

Fix selection failures - #325

Merged
danirabbit merged 2 commits into
elementary:masterfrom
flodavid:fix-selection-failures
May 22, 2026
Merged

danirabbit merged 2 commits into
elementary:masterfrom
flodavid:fix-selection-failures

Conversation

@flodavid

@flodavid flodavid commented May 17, 2026 •

Copy link
Copy Markdown
Contributor

The current behaviour of the output list is very spotty, especially for devices with multiples inputs/outputs.
This PR addresses this, with two fixes. It resolves #223.

With both fixes, output selection is now working correctly even when the device has multiple outputs or some input. The behaviour is now the same as in sound settings.

First fix: Device card_sink_port_name was not set when it could have.

Not setting card_sink_port_name could induce failure of PulseAudioManager.set_default_device ().
Hence action #2 "Set sink / source port" was not triggered.
Then action #3 "Wait for sink / source" failed and the default device was not set.

This would result in a selection of an of the output of a device with multiple ones to not have any effect (only one is working, without a way to know which one).

Second fix: Input and Output were reversed when checking card profiles

Selection of an output of devices with some input may not have any effect because of this.
It was introduced by #293.

Not setting card_sink_port_name could induce failure of PulseAudioManager.set_default_device ().
Action elementary#2 "Set sink / source port" was not triggered.
Then action elementary#3 "Wait for sink / source" failed and the default device was not set in the end.
@flodavid
flodavid marked this pull request as draft May 17, 2026 03:17
This could prevent selection of devices with multiple outputs.
It was introduced by elementary#293.
@flodavid
flodavid force-pushed the fix-selection-failures branch from 20144d4 to dd63bbe Compare May 19, 2026 20:28
@flodavid
flodavid marked this pull request as ready for review May 19, 2026 20:40
@stsdc
stsdc requested a review from a team May 21, 2026 21:23
Comment thread data/indicator.css Outdated
@flodavid
flodavid force-pushed the fix-selection-failures branch from dd63bbe to f26c0b1 Compare May 22, 2026 18:17

@danirabbit danirabbit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Nice fix!

@danirabbit
danirabbit merged commit ec08a48 into elementary:master May 22, 2026
4 checks passed
@flodavid
flodavid deleted the fix-selection-failures branch May 22, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selecting from multiple available audio devices behavior

2 participants