Re: Multiple capture (mic & mic + pcm out)

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

 



Well i think i found the best solution for me using aloop device and
the latest alsa drivers.
With default PCM i can play through my sound card and record from mic,
with ear PCM i can capture all sounds played and at the same time
record from MIC. Mix from these sources is limited because it records
only left channels, unfortunately i can't use dmix plugin for capture
streams.
Hope it will useful for others guy.

bye,
   Dino

#
#  Split 4 channels stream to play them to 2 soundcards:	
#
#  in: LRLR  out: LR -> through main  sound card (with dmix)
#		  LR -> through aloop sound card (with dmix)
#
pcm.multi {
   type multi
   slaves.a.pcm "dmix:0,0" # main sound card
   slaves.a.channels 2
   slaves.b.pcm "dmix:1,0" # aloop sound card
   slaves.b.channels 2
   bindings.0.slave a
   bindings.0.channel 0
   bindings.1.slave a
   bindings.1.channel 1
   bindings.2.slave b
   bindings.2.channel 0
   bindings.3.slave b
   bindings.3.channel 1
}

#
#  Create a 4 channels stream from a normal stereo one
#
#  in: LR capture   out: LRLR
#
pcm.hdaloop_out {
        type route
        slave.pcm "multi"
        slave.channels 4
        ttable.0.0 1
        ttable.1.1 1
        ttable.0.2 1
        ttable.1.3 1
}

#
#  Create a 2 channels stream from 2 capture devices, taking only
#  the left channel
#
#  main  sound card (with dsnoop) -> in: L
#  aloop sound card (with dsnoop) -> in: L   out: LL
#
pcm.hdaloop_in {
   type multi
   slaves.a.pcm "dsnoop:0,0" # main sound card
   slaves.a.channels 2
   slaves.b.pcm "dsnoop:1,1" # aloop sound card
   slaves.b.channels 2
   bindings.0.slave a
   bindings.0.channel 0
   bindings.1.slave b
   bindings.1.channel 0
}

#
# default PCM able to play through main sound card and record from
capture device
#
pcm.!default {
    type asym
    playback.pcm {
        type plug
        slave.pcm "hdaloop_out"            	
    }
    capture.pcm {
        type plug
	slave.pcm "dsnoop:0,0"
    }
}

#
# PCM able to record from capture device and default PCM out
#
pcm.ear {
    type plug
    slave.pcm "hdaloop_in"
}



2009/9/25 Dino Puller <dino.puller@xxxxxxxxx>:
> Good so this may be a good solution!!!
> Anyway i've found the snd-loop and it seems another possible solution,
> anyway i didn't find documentation on how to set it up. Do you know
> it?
>
> tnx,
>   Dino
>
>
> 2009/9/25 John Haxby <jch@xxxxxxxxxxxxxxx>:
>> On 25/09/09 14:40, Dino Puller wrote:
>>>
>>> Well really i need to capture linphone calls and record them,
>>> unfortunately linphone doesn't have support for jack.
>>>
>>
>> You don't need direct jack support.  There are both pulseaudio and alsa
>> modules that allow applications to have their audio connections diverted
>> into jack.  I've used the pulseaudio one quite recently, I think I've
>> probably used the alsa one as well.
>>
>> jch
>>
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux