[pulseaudio-discuss] Recording from USB devices without channel mixing

Tanu Kaskinen tanuk at iki.fi
Thu Mar 3 09:11:51 UTC 2016


On Wed, 2016-03-02 at 20:23 +0100, David Henningsson wrote:
> 
> On 2016-03-01 15:44, Tanu Kaskinen wrote:
> > On Tue, 2016-03-01 at 14:40 +0100, Klaus Jaensch wrote:
> > > Am 01.03.2016 um 11:19 schrieb Tanu Kaskinen:
> > > > On Mon, 2016-02-29 at 17:33 +0100, Klaus Jaensch wrote:
> > > > > I'm wondering why it is the default to mix the channels.
> > > > If there's a device with channel map "front-left,front-right", and a
> > > > capture stream appears that has channel map "mono", do you wish that
> > > > pulseaudio would by default take audio only from the left channel? Why
> > > > would that be more likely what the user wants, rather than taking audio
> > > > from all channels the device has, or only from the right channel?
> > > Yes. If the user wants only the left channel he has no chance to do so.
> > > (Without changing the configuration.)
> > > You can't split the mixed channels later. The only way is to record
> > > stereo and split the channels later.
> > > 
> > > If you want a mix of both channels  it is always possible to record
> > > stereo and mix it later.
> > > 
> > > Another problem with mixing is that the level meter of applications like
> > > audacity show the amplitude of the mix. If you do not know that the
> > > level meter shows only half of the dynamic range (-6dB) if only one
> > > microphone is plugged to the left channel it is likely that you overmodulate
> > > the recording.
> > > 
> > > And as far as I know it is the default on Windows and Mac OS X to record
> > > only the left channel. I've checked this with some of our USB audio devices.
> > 
> > It could be also argued that if the recording application wants to pick
> > just one specific channel, it should set the stream channel map
> > accordingly. But after pondering this for a bit, I think I agree it
> > would probably good to map mono recording streams only to the first
> > channel (usually left) of the device by default.
> 
> But - now every mono recording of, e g, line in, will only record the 
> left channel instead of both.
> 
> Also, what about dual-channel internal laptop microphones with high 
> background noise? By not mixing the channels, won't your S/N ratio 
> decrease by 6 dB?

Why would that make the S/N ratio drop? If you mix two noisy channels,
surely the noise gets doubled just like the signal? Or is the argument
that the signal is the same on both channels, while the noise is
uncorrelated, and summing correlated signals causes higher gain than
summing uncorrelated signals? That would make sense, although my vague
recollection is that summing correlated signals causes +6 dB gain and
summing uncorrelated signals causes an average of +3 dB gain, so I
think the reduction in the S/N ratio would be 3 dB, not 6 dB.

> This sounds like fixing one problem but causing other problems.

Quite possible. It occurred to me that maybe the real problem is that
we use stereo channel maps for devices that actually have two mono
recording inputs from the user's perspective (although at alsa level
they appear to be stereo devices).

After I'm done with the USB analog/digital hw volume stuff, I plan to
start working on making it possible to more easily split multichannel
devices into smaller virtual devices.

-- 
Tanu


More information about the pulseaudio-discuss mailing list