[pulseaudio-discuss] xine 5.1 channel downmix

Nikolaus Filus nfilus at gmx.net
Wed Jun 6 11:31:57 PDT 2007


Hi,

Lennart Poettering wrote:
> On Fri, 11.05.07 18:06, Nikolaus Filus (nfilus at gmx.net) wrote:
> 
>> Ok, so now I confirmed the channel maps are different. But where can I downmix
>> 5.1 to 2? Where can I read more about possible setups?
>> - configure sink for 5.1 (my notebook can't do that, but this would be nice-to-know)
>> - downmix channels
>> - select n channels and pass to sink

> PA will not downmix channels. It will only copy or drop
> channels. Channels are mapped by names. I.e. if a sink has
> fron-left,front-right,lfe and a stream just has
> front-left,front-right, then the lfe will get silence. The only
> special rule is that we mix front-left+front-right into mono, and copy
> mono to front-left and front-riught.
> 
> In essence: the rules are vey basic. We don't do any dolby surround
> coding. No lowpass filtering for LFE. (Which btw, is another item on my todo list)

So I figured out, it is possible to downmix (and upmix) channels in ALSA by
using the following definition in asound.conf

pcm.51to20 {
     type route
     slave.pcm default
     slave.channels 6
     ttable.0.0 1      # front left -> left
     ttable.1.1 1      # front right -> right
     ttable.2.0 0.707  # hinten left -> left, gain 3dB
     ttable.3.1 0.707  # hinten right -> right, gain 3dB
     ttable.4.0 0.5    # center -> left, gain 6dB
     ttable.4.1 0.5    # center -> right, gain 6dB
     ttable.5.0 0.5    # LFE -> left, gain 6dB
     ttable.5.1 0.5    # LFE -> right, gain 6dB
}
ctl.51to20 {
  type hw
  card 0
}

xine [pulse, 5.1] -> pulseaudio [sink:51to20] -> alsa [pcm.51to20]
-> alsa [default] -> alsa [hw:0,0 aka intel8x0]

This kinda works, so that I can change the volume of each stream channel
independantly in pavucontrol and hear the effect on my speakers. BUT now
pulseaudio has a much higher load and the sound isn't clear so I hear cracking
noises. My only guess is, that pulseaudio shows the sink as
"ALSA PCM on 51to20 (dmix:0)" and I don't know why it identifies it as dmix.

Any hints or tweaks?


Nikolaus




More information about the pulseaudio-discuss mailing list