the pcm-loopback interface of alsa

Csaba Henk ekho at renyi.hu
Fri Nov 1 00:18:00 PST 2002


 Hi!

 I intended to be able to grab any sound stream that passes my box, most
noteably live srteams of internet radio broadcasts. (In a more elegant
way than sending the sounds to my hi-fi and then recording it all thru the
line.) I digged the web how is it possible. I quote the following form
some alsa mailing lists:

1)>>>>>>>>>>>>>>>>>>>>>>>>>
---------- Forwarded message ----------
> What I first want to know is: Can I use ecasound to record
> streamed audio (RealPlayer w/ netradio)?

Ecasound doesn't know how to read/write realplayer's files (proprietary
format), but you can grab realplayer's output using ALSA's pcm-loopback
together with ecasound. You'll need to use ALSA 0.4.x/0.5.x. ALSA 0.6.x
doesn't (yet?) have support for loopback devices.
<<<<<<<<<<<<<<<<<<<<<<<<<


2)>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Is there any way with ALSA to capture the
sound being sent to the
output and patch it in to, say, a
recording application? I've heard
mention of a pcm loopback device, and
indeed my /proc/asound/CARD_0/
has two files named  pcmloopD0S0c and
pcmloopD0S0p ... but I can't
find any docs on how to use them.
 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


3)>>>>>>>>>>>>>>>>>>>>>>>>>>>
> Is there any way with ALSA to capture the sound being sent to the
> output and patch it in to, say, a recording application? I've heard

Yup, the capturing application needs to support ALSA's loopback interface.
Here's how you do it with ecasound (capture from oss-emulated
dummy-device).

--cut--
|$ play -d /dev/dsp1 /empty1/track04.wav &
[1] 9485
|$ ecasound -i alsalb,1,0 -o alsa,0,0
--cut--
<<<<<<<<<<<<<<<<<<<<<<<<<<<

 So, one needs to use & configure this loopback thingy. I think it would
collaborate with arecord, which is good enough for me. 
 But does anybody know anything about it? Is it supported by
alsa-0.9.0rc3? How to configure it? What devices are to made (with my
ens-1371 type card I have only 

controlC0  midiC0D0  pcmC0D0c  pcmC0D0p  pcmC0D1p  timer

sound devices (with alsa), and there is no thing like pcmloopD0S0c,
pcmloopD0S0p). How to edit the /etc/moduls.conf file, and the
/etc/asound.state file to make it work, what pcm's are to be defined?

Csaba

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message




More information about the blfs-support mailing list