[meta-freescale] Audio stream routing

Alexander Shashkevych alex at stunpix.com
Tue Dec 9 04:29:17 PST 2014


> Hi,  everyone
>
>      This is a question about audio stream routing.
>
>      Soft arch:
>      gstreamer--->pluseaudio--->alsa
>
>      There are two media players playing different mp3 files at the same
> time. How to route them to different sound card?
>      Where should I config the route? pluseaudio or alsa?

Hi,

Alsa is api for direct communication with audio devices (no less, no
more), while pulseaudio is intermediate audio
routing/mixing/converting/distributing server between applications and
device apis like alsa or jack. If both players are using pulseaudio,
then routing can be done with pavucontrol. But if your players also
are supporting direct output to alsa devices, then you can just point
players to different cards and pulseaudio in such case not involved.
If you are using gstreamer then this can be achieved with alsasink
plugin as output for decoded audio streams instead of pulsesink plugin
which seems selected by default in your players. Example:

gst-launch-1.0 playbin uri=file:///home/user/song.mp3
audio-sink='alsasink device=hw:0,0'

By changing hw:<device>,<card> in above command you can point out
different players to different devices.

PS: Actually this question is not imx/freescale specific, so this
mailing list is not best place for it.

Alexander


More information about the meta-freescale mailing list