[linux-audio-dev] Writing PCM to left and right channel sperately?

Clemens Ladisch clemens at ladisch.de
Fri Mar 10 08:32:19 UTC 2006


Tobias Scharnberg wrote:
> I need to use the left and the right audio channel seperately.

If you're using the ALSA library, you can use the following definitions
in /etc/asound.conf or ~/.asoundrc to get two independent virtual
devices:

pcm.left {
	type plug
	slave.pcm {
		type dshare
		ipc_key 12345
		slave.pcm "hw:0,0"
		slave.channels 2
		bindings {
			0 0
		}
	}
}

pcm.right {
	type plug
	slave.pcm {
		type dshare
		ipc_key 12345
		slave.pcm "hw:0,0"
		slave.channels 2
		bindings {
			0 1
		}
	}
}


HTH
Clemens



More information about the Linux-audio-dev mailing list