Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeviceManager: Remember previously selected devices #192

Merged
merged 7 commits into from Jun 15, 2021

Conversation

bluesabre
Copy link
Sponsor Member

This branch updates the device manager to remember previously selected devices and keep them available. This helps users with advanced audio setups, removing the need to return to the Sound plug any time they reconnect. Please let me know if you'd me to make any changes, thanks!

Fixes #189

@tintou
Copy link
Member

tintou commented Apr 15, 2021

I first thought that this should be the role of PulseAudio itself to do this, but this is actually a good practical way to achieve this result. The implementation looks good, my only complain would be that there is no way a device would be removed from preferred-devices, maybe it'd be useful to keep a last-used timestamp and remove it if it's been unused since a week or two (or some reasonable time), because if you select the wrong device then you're stuck with it 🙂

@bluesabre bluesabre removed the request for review from danirabbit April 19, 2021 01:31
@bluesabre bluesabre requested a review from tintou April 20, 2021 09:46
@bluesabre
Copy link
Sponsor Member Author

I first thought that this should be the role of PulseAudio itself to do this, but this is actually a good practical way to achieve this result. The implementation looks good, my only complain would be that there is no way a device would be removed from preferred-devices, maybe it'd be useful to keep a last-used timestamp and remove it if it's been unused since a week or two (or some reasonable time), because if you select the wrong device then you're stuck with it

@tintou Thanks for the review. I've implemented your suggestion of maintaining a timestamp with each preferred device, automatically removing devices that go unused for 7 days. Please let me know if you have any other changes.

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

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

This seems to work as intended. Nice job :)

@danirabbit danirabbit merged commit c2b210c into elementary:master Jun 15, 2021
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.

Linear output disappears from the list when choosing HDMI/DisplayPort output
3 participants