I'm trying to set up PulseAudio for some streaming, and I thought I had it set up correctly. Apparently I was wrong. I was having some issues with volume in my setup, so I decided to start from scratch.

After running the below commands, any input (program) attached to "stream_spkr" comes out at a low volume, probably about half of what it is supposed to be. The created sink is at 100% volume:

pacmd insert-module module-null-sink sink_name=stream_spkr sink_properties=device.description=sink_spkr
pacmd insert-module module-loopback source=stream_spkr.monitor sink=alsa_output.pci-0000_00_1b.0.analog-stereo

I deleted the loopback and used ffplay -f pluse -i stream_spkr.monitor to play the input from the null-sink over my speakers, and it's at full volume. This leads me to believe that it is, in fact, the loopback causing the issue.

Any PulseAudio gurus here? I can't for the life of me figure out what the problem is. I checked the module options in PulseAudio's documentation and there doesn't seem to be any options for volume so I must be missing something.

EDIT: Upon further investigation, pacmd shows that the loopback volume is, indeed, 36%:

index: 37
driver: <module-loopback.c>
state: RUNNING
sink: 1 <alsa_output.pci-0000_00_1b.0.analog-stereo>
volume: 0:  36% 1:  36%
        0: -26.62 dB 1: -26.62 dB
        balance 0.00
muted: no
current latency: 35.78 ms
requested latency: 66.67 ms
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
resample method: speex-float-1
module: 35
    media.role = "abstract"
    module-stream-restore.id = "sink-input-by-media-role:abstract"
    media.name = "Loopback from Monitor of stream_spkr_sink"
    media.icon_name = "audio-input-microphone" 

Why would it start a loopback at 36% volume, and how can I override that?


I think I know what happened here, I had changed the volume of the sink in Pavucontrol a while back. Pulseaudio kept the setting somewhere and was loading my old volume when I re-added the loopback. Subsequent unload/load of the module-loopback after changing the volume back to 100% proved this.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.