From: "Stéphane Boulanger" <stephane.boulanger@fh-bonn-rhein-sieg.de>
To: Jaroslav Kysela <perex@suse.cz>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Opening a device 2 times, loopback interface....
Date: Mon, 26 May 2003 17:10:48 +0200 [thread overview]
Message-ID: <00ea01c32398$fcffa780$490a140a@pc2m73> (raw)
In-Reply-To: Pine.LNX.4.44.0305131207020.1179-100000@pnote.perex-int.cz
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
next prev parent reply other threads:[~2003-05-26 15:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2003-05-27 6:54 ` Jaroslav Kysela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00ea01c32398$fcffa780$490a140a@pc2m73' \
--to=stephane.boulanger@fh-bonn-rhein-sieg.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=perex@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.