Hi, i talked a bit with peter in the #alsa channel on irc.freenode.org and i found i can reproduce the behaviour on my machine. I have included my full .asoundrc and some more info about my machine at the bottom of this email.
So basically it goes like this: my soundcard does support hw mixing for playback streams. It does not support opening the capture stream twice. Test: Use "arecord -D hw:0,0" in two terms at the same time Result: second arecord blocks until first one exits. I get baically the same for using sox to record something: Test: Use "sox -t ossdsp /dev/dsp fooN.wav" in two terms at the same time [N = 1,2] Result: second sox blocks until first one exits [you can see in the length of the recorded .wavs. sox iteself is not too verbose]. Now we test the "pasymed" device which is just asym pointing to dmix and dsnoop and a plug plugin to do the converting magic [see .asoundrc]: Test: Use "arecord -D pasymed" in two terms at the same time Result: second arecord does _not_ block. dsnoop and asym seem to do their thing [i record silence, but see my other mail on that] Now, the pcm.dsp0 definition in the .asoundrc should point the aoss script to the asymed device. Sadly it still blocks. Test: Use "aoss sox -t ossdsp /dev/dsp fooN.wav" in two terms at the same time [N = 1,2] Result: second sox blocks until first one exits.. Now the question is: does the "virtual dsp device" of aoss _always_ block for capture? If not, what parameters might influence the behaviiour of that? We tried playing around with the /proc interface of the kernel level OSS emu [as described here: http://alsa-project.org/~iwai/OSS-Emulation.html] but to no avail. Interestingly, something like echo sox 0 0 non-block > /proc/asound/card0/pcm0c/oss _does_ have an effect on aoss, too. It actually has the same effect on kernel level OSS emu and the aoss script. After the above command all sox always returns immeaditly to the command line when trying to record. It's the same for sox with or w/o aoss. So what might be the fault here? Does OSS support multiple opening of capture streams anyway? TIA Flo On Mon, 2 Feb 2004 09:44:38 +0100 Peter Kirk <[EMAIL PROTECTED]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > what I want to do is to run two oss applications that want to record > at once. After following the relevant documentation from this list, I > have it setup so that I can record to two differnt files with two > instances of "arecord", at the same time. (I run "arecord -d 10" in > two terminals, and both output gibberish when I whistle to my mic). > > The Problem: > > If I run a oss recorder (such as "rec"), then arecord will be blocked > until rec has finished...this also happens if I run "aoss rec > out.wav". What do I have to do to make the oss application behave > none-blocking ? It seems to me oss applications are not using my > carfuly crafted "asymed" pcm that does the dmixing and dsnooping for > me... I have added a few entries to .asoundrc (with no success) to try > and force the oss application to use the asymed pcm): > > pcm.dsp0 { > type plug > slave.pcm "asymed" > } > > ctl.mixer0 { > type hw > card 0 > } > > pcm.!default { > type plug > slave.pcm "asymed" > } > > Can anybody tell me what Im doing wrong ? Or what I might try ? > > Thanks in advance > Peter my .asoundrc: -----.asoundrc start #asym fun start here. we define one pcm device called "dmixed" pcm.dmixed { ipc_key 1025 type dmix slave.pcm "hw:0,0" } #one called "dsnooped" for capturing pcm.dsnooped { ipc_key 1026 type dsnoop slave.pcm "hw:0,0" } #and this is the real magic pcm.asymed { type asym playback.pcm "dmixed" capture.pcm "dsnooped" } #a quick plug plugin for above device to do the converting magic. saves #typing when settng the pcm name in an alsa app pcm.pasymed { type plug slave.pcm "asymed" } #a ctl device to keep xmms happy ctl.pasymed { type hw card 0 } #done #here we try to point the aoss script to our asymed device pcm.dsp0 { type plug slave.pcm "asymed" } ctl.mixer0 { type hw card 0 } ----.asoundrc end -- signature :) ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Alsa-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-user