Re: Independent usage of two channels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux