You are not logged in.
Pages: 1
Apparently, by default PulseAudio would allow me to set the volume higher than 100%. I'm afraid that if the volume accidentally go up to some insane value that it would broke my speaker. How can I set a maximum possible volume for PulseAudio (possibly with a configuration file)?
Sorry if my English is bad.
Oh, and PLEASE remind me if I had accidentally post something sensitive...
Offline
You can't for the server as a whole but there are volume adjustment clients you can configure their max in, e.g. pulsemixer
In any case this should not be able to damage your speakers
Offline
You sound card has a physical limit on what it can provide, Generally that should be safe for speakers I think. If you crank the volume up too high, the sections that are too loud will be clipped.
Last edited by progandy (2023-01-15 13:50:20)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Yeah days ago my ignorant friend would raise up the speaker (laptop's built-in) to a very high level. Right now I use external usb speaker because the laptop's speaker sound became very low, raising it to some level just make the sound distorted ![]()
Sorry if my English is bad.
Oh, and PLEASE remind me if I had accidentally post something sensitive...
Offline
If you use pipewire it looks like you can set a volume limit. I do not know how that maps to the pulseaudio percentage scale.
https://gitlab.freedesktop.org/pipewire … ssues/1372
https://forum.manjaro.org/t/pipewire-co … lume/59380
Last edited by progandy (2023-01-15 15:48:43)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
this logic is leveraged from pulse directly you could do the same workaround on pulse but this will afaik simply limit by how far the underlying ALSA control is adjusted and would still allow the "normal" pulse sink volume to be increased past this point.
Offline
OK after searching for a while I use a bash script found here. Works tbh.
#!/bin/sh
max_volume=100 # in percent
pactl subscribe \
| grep --line-buffered 'sink ' \
| stdbuf -o0 cut -d# -f2 \
| while read index; do
volume=$(pactl get-sink-volume $index | head -n1 | cut -d/ -f2 | tr -d ' %');
if (( volume > max_volume )); then
pactl set-sink-volume $index $max_volume%;
fi;
doneWhat do you think?
Sorry if my English is bad.
Oh, and PLEASE remind me if I had accidentally post something sensitive...
Offline
Pages: 1