From: Takashi Iwai Subject: Re: Application and hw mixing for VoIP (modified) Date: Tue, 22 Sep 2009 15:58:52 +0200 Message-ID: References: <000001ca3ac2$3a3293a0$ae97bae0$@comte@ercogener.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 00F2B24389 for ; Tue, 22 Sep 2009 15:58:53 +0200 (CEST) In-Reply-To: <000001ca3ac2$3a3293a0$ae97bae0$@comte@ercogener.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Fabien COMTE Cc: alsa-user@lists.sourceforge.net, alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Mon, 21 Sep 2009 15:48:39 +0200, Fabien COMTE wrote: > > Hi, > I need some help please. > I have an application that does VoIP and alsa interface. > > I want to : > - send through VoIP application a mixed sound from mic and an another > application (aplay should be ok for testing). > > mic ---------- soundcard 0 -------------> > mix ---- alsa interface -----> > voip application > application 1 --- alsa interface ------> > (aplay) > > - use sound received from VoIP with HP output and an another application > (arecord should be ok for testing). > > ----- alsa interface > ------> application 2 (arecord) > voip application ----- alsa interface ----> share > ------ soundcard 0 > --------> HP output > > > And a little question : > How to define an application interface in asoundrc ? Well, this isn't so trivial as it sounds. If the application 1 (aplay) needs to be output actually, it means to split the signal to two interfaces, one to voip program, and another to the output channel. If app1 doesn't have to be heard, then you can use a loopback device (snd-aloop driver included in alsa-driver tree) and bind with the mic device using multi plugin. The latter case, split from voip to app2 and HP output, can be also done via multi plugin + aloop device. But, this kind of infrastructure could be better done with a proper daemon, such as JACK, I guess... Takashi