[pulseaudio-discuss] Split Stereo into two mono channels

Caio caiortp at gmail.com
Thu May 28 11:25:55 PDT 2015


Hello,

I would like to split my stereo codec into two mono channels (input/output)
(hardware restriction, I would like to use this configuration into a
embedded system) but using pulse audio.
I could have separated using Alsa , but I will need apply echo-cancelling
in each channel.
I'm trying to connect the alsa output to pulseaudio but I didn't have
success.

Someone has some better idea to split this channels using pulseaudio? My
configuration using alsa is above.

The basic configuration in my .asounrd is:

cat ~/.asoundrc

pcm.input_left {
    type dsnoop
    ipc_key 234884
    slave {
        pcm "hw:0,0"
        channels 2
    }
    bindings.0  0
}
pcm.input_right {
    type dsnoop
    ipc_key 2241234
    slave {
        pcm "hw:0,0"
        channels 2
    }
    bindings.0  1
}

pcm.device-separation {
   type dmix
   ipc_key 1234
   slave {
      pcm "hw:0,0"
      period_time 0
      period_size 4096
      buffer_size 8192
      rate 44100
   }
}

pcm.output_left {
   type route
   slave.pcm device-separation
   slave.channels 2
   ttable.0.0 0.5
   ttable.1.0 0.5
   hint.description "Left channel"
}

pcm.output_right {
   type route
   slave.pcm device-separation
   slave.channels 2
   ttable.0.1 0.5
   ttable.1.1 0.5
   hint.description "Right channel"
}




After I modify the file to try connect the alsa to pulseaudio

pcm.input_left {
    type dsnoop
    ipc_key 234884
    slave {
        pcm "hw:0,0"
        channels 2
    }
    bindings.0  0
}
pcm.input_right {
    type dsnoop
    ipc_key 2241234
    slave {
        pcm "hw:0,0"
        channels 2
    }
    bindings.0  1
}

pcm.input_left_pulse {
   type pulse
   slave.pcm input_left
}

ctl.input_left_pulse {
   type pulse
}


pcm.intput_right_pulse {
  type pulse
  slave.pcm input_right
}

ctl.intput_right_pulse {
  type pulse
}

pcm.device-separation {
   type dmix
   ipc_key 1234
   slave {
      pcm "hw:0,0"
      period_time 0
      period_size 4096
      buffer_size 8192
      rate 44100
   }
}

pcm.output_left {
   type pulse
   slave.pcm device-separation
   slave.channels 2
   ttable.0.0 0.5
   ttable.1.0 0.5
   hint.description "Left channel"
}

clt.output_left {
   type pulse
}

pcm.output_right {
   type pulse
   slave.pcm device-separation
   slave.channels 2
   ttable.0.1 0.5
   ttable.1.1 0.5
   hint.description "Right channel"
}

ctl.output_right {
    type pulse
}

In the /etc/pulse/default.pa I added these lines

load-module module-alsa-sink device=output_right
load-module module-alsa-source device=input_right_plug

load-module module-alsa-sink device=output_left
load-module module-alsa-source device=input_left_plug

But these configuration it's wrong and doesn't work .

Someone have a better idea?

Thank you very much!

Regards,


-- 
----------------------------------------------
Caio Pereira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20150528/02f54362/attachment-0001.html>


More information about the pulseaudio-discuss mailing list