Bug 444818 - Add an option to pause playback whenever audio transfers from one port to another.
Summary: Add an option to pause playback whenever audio transfers from one port to ano...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Audio in general (show other bugs)
Version: 6.2.4
Platform: Other Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: David Rosca
URL:
Keywords:
: 453924 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-11-02 11:26 UTC by Antti Savolainen
Modified: 2024-12-18 21:10 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Savolainen 2021-11-02 11:26:56 UTC
SUMMARY
Similar to how phones do it. When the option is set,, whenever audio playback moves from one port to another (for example when front panel headphones are disconnected), the media player should pause all playback. The option should be fine grained enough to set if moving from front panel to back or if moving from back panel to front pauses the playback
Comment 1 Nate Graham 2021-11-08 17:47:23 UTC
...Why? What's the use case?
Comment 2 Antti Savolainen 2021-11-08 22:13:12 UTC
If you're in any sort of public situation, the pause would allow to not blast the audio around you in the case that you accidentally unplug the audio jack.
Comment 3 Nate Graham 2021-11-08 22:20:46 UTC
I imagine there are non-public situations where this would also make sense: using your computer next to a sleeping spouse, child, or roommate, for example. But when you're not in such an environment, it would be really annoying, so it couldn't be a thing that just always happens.

So an option could work here, but the system can't detect when you're in an environment that would benefit from this feature, so you would have to remember to turn the option on when you're in such an environment. And if you're going to need to remember to turn something on manually... you might as well just remember to pause the audio before unplugging your headphones. :)
Comment 4 Nicolas Fella 2021-11-08 23:44:46 UTC
I think it's a reasonable request and I've wanted to implement that for a while.

We can even implement it in a way that it is only done when going from Headphones->Speaker and not the other way around or speaker->speaker, thus minimizing false positives
Comment 5 Nate Graham 2021-11-08 23:46:56 UTC
If we can do just that, it would probably be fine, ok. Not sure I would want a user-facing option for it though--or at least, it should be on by default if we do add one. If you have to know about it and go turn it, most people won't, largely defeating the point of any safety it would offer.
Comment 6 Nicolas Fella 2021-11-08 23:52:49 UTC
The port type information requires PulseAudio 14, which is recent, but not too recent, so we should be fine.

I agree that it should be on by default
Comment 7 Nicolas Fella 2022-05-17 12:21:04 UTC
*** Bug 453924 has been marked as a duplicate of this bug. ***