Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: arif setiawan <n.arif.setiawan@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: get two mono channel from stereo line
Date: Fri, 24 Jul 2009 11:09:35 +0200	[thread overview]
Message-ID: <4A697A4F.6000809@ladisch.de> (raw)
In-Reply-To: <c697747b0907232107k749c413bx2a88ccc97505447b@mail.gmail.com>

arif setiawan wrote:
> We have a beagleboard with one audio line-in and one audio line-out. From
> the documentation both are stereo line. Now we want to use four mono audio
> line for our system. two input from radio and microphone, two output to
> radio and speaker. We use ALSA and we would like to know how we can achieve
> this either by plugin or programming alsa.

Try something like this:

pcm_slave.stereo {
	pcm "hw:0,0"	# or whatever your device is
	channels 2
}

pcm.left {
	type asym
	playback.pcm {
		type plug
		slave.pcm {
			type dshare
			slave stereo
			ipc_key 200907241
			bindings [ 0 ]
		}
	}
	capture.pcm {
		type plug
		slave.pcm {
			type dsnoop
			slave stereo
			ipc_key 200907242
			bindings [ 0 ]
		}
	}
}

pcm.right {
	type asym
	playback.pcm {
		type plug
		slave.pcm {
			type dshare
			slave stereo
			ipc_key 20090724
			bindings [ 1 ]
		}
	}
	capture.pcm {
		type plug
		slave.pcm {
			type dsnoop
			slave stereo
			ipc_key 200907242
			bindings [ 1 ]
		}
	}
}


HTH
Clemens

  reply	other threads:[~2009-07-24  9:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24  4:07 get two mono channel from stereo line arif setiawan
2009-07-24  9:09 ` Clemens Ladisch [this message]
     [not found]   ` <c697747b0907272008m291a97ach6b7cfbab4e2da50d@mail.gmail.com>
     [not found]     ` <c697747b0907272239w379d52cew5c31d285b1552f10@mail.gmail.com>
2009-07-28  7:29       ` Clemens Ladisch
  -- strict thread matches above, loose matches on Subject: below --
2009-07-24  6:05 arif setiawan
2009-07-27  8:54 arif setiawan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A697A4F.6000809@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=n.arif.setiawan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox