* Opening a device 2 times, loopback interface.... @ 2003-05-13 9:47 Stéphane Boulanger 2003-05-13 10:11 ` Jaroslav Kysela 0 siblings, 1 reply; 4+ messages in thread From: Stéphane Boulanger @ 2003-05-13 9:47 UTC (permalink / raw) To: alsa-devel Dear List, we´re currently developing an end-to-end delay measurement tool, that should not only measure the network delay, but also the time the application (audiostreaming (rat, for example)) needs to calculate the used algorithms (GSM, PCM, whatever). To realize the choosen program design, we need to access the soundcard device form two different applications (streaming application and the measurement tool) at the same time. More exactly: - When audiodata is inputted, not only the streaming application should be able to access it, but also our measurement tool (at the same time obviously). - When audiodata is send to the sounddriver (repectively the soundcard), the measurement tool should be able to read it (maybe in the form of a copied datastream send to the measurement tool). While browing the ALSA documentation, I found some interesting parts about the loopback interface, that might help us. But is it still contained in the 0.9 version of ALSA? Moreover, would the loopback interface satisfy our needs? I also found some interesting information about JACK, but using JACK would require to adopt the streaming application to the JACK interfaces. In your opinion, what would be the best way to realise the system? Thanks a lot! Stéphane Boulanger ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Opening a device 2 times, loopback interface.... 2003-05-13 9:47 Opening a device 2 times, loopback interface Stéphane Boulanger @ 2003-05-13 10:11 ` Jaroslav Kysela 2003-05-26 15:10 ` Stéphane Boulanger 0 siblings, 1 reply; 4+ messages in thread From: Jaroslav Kysela @ 2003-05-13 10:11 UTC (permalink / raw) To: Stéphane Boulanger; +Cc: alsa-devel@lists.sourceforge.net On Tue, 13 May 2003, [iso-8859-1] Stéphane Boulanger wrote: > Dear List, > > we´re currently developing an end-to-end delay measurement tool, that should > not only measure the network delay, but also the time the application > (audiostreaming (rat, for example)) needs to calculate the used algorithms > (GSM, PCM, whatever). To realize the choosen program design, we need to > access the soundcard device form two different applications (streaming > application and the measurement tool) at the same time. More exactly: > > - When audiodata is inputted, not only the streaming application should be > able to access it, but also our measurement tool (at the same time > obviously). > > - When audiodata is send to the sounddriver (repectively the soundcard), the > measurement tool should be able to read it (maybe in the form of a copied > datastream send to the measurement tool). > > > While browing the ALSA documentation, I found some interesting parts about > the loopback interface, that might help us. But is it still contained in the > 0.9 version of ALSA? Moreover, would the loopback interface satisfy our > needs? The loopback interface is dead. We have alsa-lib which can do all requested things. See the dsnoop plugin and file plugin. You may also modify them to satisfy your requirements. The only "negative" item is that it will work with ALSA native applications only or with the alsa-oss library. Jaroslav ----- Jaroslav Kysela <perex@suse.cz> Linux Kernel Sound Maintainer ALSA Project, SuSE Labs ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Opening a device 2 times, loopback interface.... 2003-05-13 10:11 ` Jaroslav Kysela @ 2003-05-26 15:10 ` Stéphane Boulanger 2003-05-27 6:54 ` Jaroslav Kysela 0 siblings, 1 reply; 4+ messages in thread From: Stéphane Boulanger @ 2003-05-26 15:10 UTC (permalink / raw) To: Jaroslav Kysela; +Cc: alsa-devel Hello, Thanks for the response. I had a look at the ALSA plugins. The dsnoop seems to be the right way, but I can´t get it working for my purpose. The following works already: .asoundrc contains: pcm.my_devicename { type dsnoop ipc_key 47114711 ipc_key_add_uid yes slave { pcm "hw:0,0" } } I can open this with the snd_pcm_open function. The important thing is, that 2 applications can access the data at the same time. When I start my application (just a simple capturing tool) twice, both applications receive data. It works preatty well. But when I want to start my application after I started an other application (in my case RAT), my application blocks. That´s exactly I wanted to prevent! I think the most other applications will open "hw" or "plughw" (what about the OSS emulation? How does the kernel oss emulation module opens the alsa devices?). I tried the following hack: renaming the "hw" to "hw_real" an adding a "hw" wich is my dsnoop. Looks like: pcm.hw { type dsnoop ipc_key 47114711 ipc_key_add_uid yes slave { pcm "hw_real:0,0" } } pcm.hw_real { ... # changed nothing } Okay, both applications run, but not at the same time. Still the same problem: My applications receives data only if the first application was terminated. By the way... playing around this way with "plughw" let my application crash. So again the same problem: Access the input (and output (have a look at my earlier description in my old mail)) data at the same time, without modifying the original programm. I hope this is not too basic, but I just can´t figure out a universal way to do it. Probably someone has an idea or a tip? Thanks! Stephane ----- Original Message ----- From: "Jaroslav Kysela" <perex@suse.cz> To: "Stéphane Boulanger" <stephane.boulanger@fh-bonn-rhein-sieg.de> Cc: <alsa-devel@lists.sourceforge.net> Sent: Tuesday, May 13, 2003 12:11 PM Subject: Re: [Alsa-devel] Opening a device 2 times, loopback interface.... > On Tue, 13 May 2003, [iso-8859-1] Stéphane Boulanger wrote: > > > Dear List, > > > > we´re currently developing an end-to-end delay measurement tool, that should > > not only measure the network delay, but also the time the application > > (audiostreaming (rat, for example)) needs to calculate the used algorithms > > (GSM, PCM, whatever). To realize the choosen program design, we need to > > access the soundcard device form two different applications (streaming > > application and the measurement tool) at the same time. More exactly: > > > > - When audiodata is inputted, not only the streaming application should be > > able to access it, but also our measurement tool (at the same time > > obviously). > > > > - When audiodata is send to the sounddriver (repectively the soundcard), the > > measurement tool should be able to read it (maybe in the form of a copied > > datastream send to the measurement tool). > > > > > > While browing the ALSA documentation, I found some interesting parts about > > the loopback interface, that might help us. But is it still contained in the > > 0.9 version of ALSA? Moreover, would the loopback interface satisfy our > > needs? > > The loopback interface is dead. We have alsa-lib which can do all > requested things. See the dsnoop plugin and file plugin. You may also > modify them to satisfy your requirements. > > The only "negative" item is that it will work with ALSA native > applications only or with the alsa-oss library. > > Jaroslav > > ----- > Jaroslav Kysela <perex@suse.cz> > Linux Kernel Sound Maintainer > ALSA Project, SuSE Labs > > > > ------------------------------------------------------- > Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara > The only event dedicated to issues related to Linux enterprise solutions > www.enterpriselinuxforum.com > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/alsa-devel > > > ------------------------------------------------------- This SF.net email is sponsored by: ObjectStore. If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Opening a device 2 times, loopback interface.... 2003-05-26 15:10 ` Stéphane Boulanger @ 2003-05-27 6:54 ` Jaroslav Kysela 0 siblings, 0 replies; 4+ messages in thread From: Jaroslav Kysela @ 2003-05-27 6:54 UTC (permalink / raw) To: Stéphane Boulanger; +Cc: alsa-devel@lists.sourceforge.net On Mon, 26 May 2003, [iso-8859-2] Stéphane Boulanger wrote: > I think the most other applications will open "hw" or "plughw" (what about > the OSS emulation? How does the kernel oss emulation module opens the alsa > devices?). OSS emulation uses direct devices (hw). The only way to reroute OSS applications to alsa-lib (thus dsnoop plugin) is alsa-oss library (libaoss). Jaroslav ----- Jaroslav Kysela <perex@suse.cz> Linux Kernel Sound Maintainer ALSA Project, SuSE Labs ------------------------------------------------------- This SF.net email is sponsored by: ObjectStore. If flattening out C++ or Java code to make your application fit in a relational database is painful, don't do it! Check out ObjectStore. Now part of Progress Software. http://www.objectstore.net/sourceforge ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-05-27 6:54 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-05-13 9:47 Opening a device 2 times, loopback interface Stéphane Boulanger 2003-05-13 10:11 ` Jaroslav Kysela 2003-05-26 15:10 ` Stéphane Boulanger 2003-05-27 6:54 ` Jaroslav Kysela
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.