[pulseaudio-discuss] [RFC] Source Output Volumes

Maarten Bosmans mkbosmans at gmail.com
Fri May 20 05:42:38 PDT 2011

2011/5/20 Colin Guthrie <gmane at colin.guthr.ie>:
> 'Twas brillig, and Maarten Bosmans at 20/05/11 10:23 did gyre and gimble:
>>> > With flat volumes, adding per-stream volumes to capture streams makes sense.
>> With these changes, would it still be possible to record audio without
>> software gain? As it is now, I can record from a source that has its
>> volume set to 100% and be confident that I'm getting the signal direct
>> from the soundcard.
>> Is that still the case with the default source output volume?
> Yeah, that should still be the case. If you set the volume to of your
> stream to 100%, even if some other stream is recording at 50%, the h/w
> volume should be set to 100%
> Of course this is all rather arbitrary, as on my h/w the gain is 0dB
> when I set the volume to 0.... at 100% it's +22.5dB, so to say direct
> from the sound card at 100% is a little strange.... it's getting +22.5dB :)

Ah, well I should probably have given some context. I'm recording from
a 24bit/96Hz USB audio interface, so I want the PCM signal of the A/D
converter as it is send over USB. This soundcard has no ALSA mixer
element, so that part is easy. I just want to make sure Pulse doesn't
do anything with that signal.

> I guess the problem would come when recording two things at once. If you
> set one to 100% (thus +22.5dB on my system) and one to the base volume
> of the source it's attached to (thus ALSA's 0dB*), then the one that
> expects to be recording at 0dB will actually get a signal that has gone
> up to +22.5dB and then come back down in software to 0dB. This isn't
> ideal, but then it's as non-ideal as it is currently and the use case
> for recording two streams at the same time is rather minimal anyway, so
> I don't think in all practicality, this is a big issue.

Actually in my setup, I specifically put Pulse in the audio pipeline
to be able to start multiple independent recordings simultaneously,
without that requirement I could have just as well used ALSA directly
(it's a headless audio server, not a desktop).
The reason for this is that I want to be able to start a recording and
separately decide whether the audio should be streamed (either RTP
over LAN, or HTTP/Ogg/Vorbis over the internet, or both) and Pulse
lets me start and stop the recording and live stream independently,
which is great.

> Of course if you don't use flat volumes and only use per-stream
> recording volumes in your app, then the difference between the source
> volume and the stream volume does come into play AFAIUI. But then if you
> take the time to disable flat volumes, that's presumably a consequence
> you can live with.

I have some experimenting to do with Pulse git, but I might very well
end up disabling flat volumes, thanks for the hint.

> Col
> * I have one USB mic that reports it's range as +20dB to +50dB in alsa,
> so the base volume for it is actually significantly below the ALSA 0
> point on the kcontrol!


More information about the pulseaudio-discuss mailing list