* Independent usage of two channels
@ 2009-01-22 11:16 Pavel Fedin
2009-01-22 11:42 ` Clemens Ladisch
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Fedin @ 2009-01-22 11:16 UTC (permalink / raw)
To: alsa-devel
Hello!
I'm novice in ALSA programming and i've got a question.
Is it possible to use two channels of a sound card as two independent
devices for PCM playback? I'm making a PC-based security system, and i
would like to use one channel as a voice feedback for control panel
and another one - as a software-driven siren.
Kind regards
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Independent usage of two channels
2009-01-22 11:16 Independent usage of two channels Pavel Fedin
@ 2009-01-22 11:42 ` Clemens Ladisch
0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2009-01-22 11:42 UTC (permalink / raw)
To: Pavel Fedin; +Cc: alsa-devel
Pavel Fedin wrote:
> Is it possible to use two channels of a sound card as two independent
> devices for PCM playback?
The sound card is probably not able to handle two independent mono
streams, but it is possible to use alsa-lib's software plugins to
emulate two devices on top of the real one.
Put this into your ~/.asoundrc or into /etc/asound.conf:
pcm_slave.stereo_slave {
pcm "hw:0" # or "hw:1" for the second card ...
channels 2
}
pcm.left {
type plug
slave.pcm {
type dshare
slave stereo_slave
}
bindings [ 0 ]
}
pcm.right {
type plug
slave.pcm { type dshare slave stereo_slave }
bindings [ 1 ]
}
Then use device names "left" and "right" instead of "default".
HTH
Clemens
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-22 11:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 11:16 Independent usage of two channels Pavel Fedin
2009-01-22 11:42 ` Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.