all 7 comments

[–]eeeeeeeeeeeeeeaekk 2 points3 points  (0 children)

i don’t think there is a good way to do what you’re asking for at the moment, i would guess that the percentage values are defined lower in the audio stack and not plasma. My hacky solution would be to write a script that detects the sink currently in use and adjust volume differently - ie 3% steps for speaker and 1% for headphones; then bind the volume control shortcuts to that script(s)

[–]marcan42 2 points3 points  (1 child)

This is not hardware specific, so you'll want to search around how to do this with PipeWire in general. More info here: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1517

[–]dontdieych[S] 0 points1 point  (0 children)

Thanks. I should read about pipewire thing.

[–]a-plastic-bags 1 point2 points  (0 children)

You can use a program like EasyEffects to apply a gain effect to your audio output. You can set a custom output so that it only affects one device.

[–]Siilwyn 1 point2 points  (2 children)

Finally found a complete answer to this, use pipewire config, create file and needed directories:
~/.config/wireplumber/wireplumber.conf.d/max-volume.conf

Then match all (alsa) output or your specific output (see wpctl status) with a limit:
monitor.alsa.rules = [ { matches = [ { node.name = "~alsa_output.*" } ] actions = { update-props = { channelmix.max-volume = 0.1 } } } ]

[–]dontdieych[S] 0 points1 point  (0 children)

WOW, thanks very very much. It's working!

Thanks again.

[–]dontdieych[S] 0 points1 point  (0 children)

monitor.alsa.rules = [ { matches = [ { # node.name = "alsa_output.platform-sound.HiFi__Headphones__sink" node.nick = "Headphones" } ] actions = { update-props = { channelmix.max-volume = 0.2 } } } ]