Bug 366032

Summary: plasma-pa should allow to select the sink for volume control
Product: [Plasma] plasmashell Reporter: Niels Ole Salscheider <niels_ole>
Component: Audio in generalAssignee: David Rosca <nowrep>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: isma.af, kristen, nate, plasma-bugs-null, sitter
Priority: NOR    
Version First Reported In: 6.2.4   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Niels Ole Salscheider 2016-07-24 11:08:01 UTC
Currently, plasma-pa just sets the volume of the default sink when the volume keys on the keyboard are pressed. This is not necessarily what the user wants if he has a bit more complex setup.
It would therefore be good if the sink for the volume control could be configured in plasma-pa's KCM.

For example, I have this in my default.pa:

load-module module-remap-sink sink_name=headphones channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right remix=0 sink_properties=device.description=Headphones
load-module module-virtual-surround-sink sink_name=vsurround master=headphones hrir=/home/olesalscheider/.ir.wav sink_properties=device.description=VirtualSurround
set-default-sink vsurround

This splits two channels of the sound card and creates a "headphone" sink from them. The other channels could for example be connected to a surround sound system but I do not use them currently.
Then it creates another sink (vsurround) with the "headphone" sink as master. This sink computes virtual surround sound from its input signals and passes the generated signal to the master.

I have set "vsurround" as my default sink because I want all new streams to go there by default. But I have moved some manually to "headphones" where I do not want the virtual surround effect (e. g. for music).
When I now press the volume keys I want them not to change the volume of the "vsurround" sink but the volume of the master sink. Because otherwise the volume of the streams that I moved to "headphones" is not changed.

Reproducible: Always
Comment 1 Niels Ole Salscheider 2016-07-24 12:09:09 UTC
Or maybe it would be enough to recursively query the master sink starting from the default sink and then adjust the volume of the sink you end up with eventually. That would fix my use-case at least but I do not know about others...
Comment 2 Kristen McWilliam 2020-08-06 20:36:21 UTC
Been having the same issue. I have HDMI audio set as default so new streams go to my TV, but I have a seperate setup to control that volume.

I want my keyboard volume slider to control the (non-default) sink that connects to the PC speakers.
Comment 3 Harald Sitter 2024-10-03 23:17:11 UTC
I am leaning towards this being out of scope. If you want to manipulate a specific stream that is easily scripted via pactl. If you create bespoke routing setups I don't think it's unreasonable to expect also bespoke volume manipulation. The trouble here is that this is complexity a lot of users will have trouble grasping. They'll tick a box and then wonder why when they plug in their headphones the volume keys do nothing.
Comment 4 Kristen McWilliam 2024-10-05 12:12:08 UTC
Yeah, I agree. I ended up doing exactly that, just rebinding the volume keys on my keyboard to control it like you described. Much better than adding a ton of complexity for an edge case like this.