Re: opening capture AND playback streams

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

 



Bill Unruh <unruh <at> physics.ubc.ca> writes:

> 
> On Thu, 7 Jan 2010, Preston wrote:
> 
> > For weeks now I have been struggling to make duplex audio work in my
> > software. I have exhausted my web browser looking for answers. So I
> > have decided to fall back and ask about the general idea. Is there a
> > way to open capture and playback streams at the same time?
> 
> Sure. Just run aplay and arecord at the same time, and you will get duplex.
> 
> Ie, this demonstrates that a) it is possible, and b) not only is it possible
> but it is possible for two independent programs to do this at the same time.
> 
> Now if on your system this does not work then it may indicate that for your
> card duplex does not work.
> 
> >
> > I have a dumb codec connected to an Atmel AT91SAM9260-ek board.
> > Alsa version 1.0.19 and a custom driver for the codec (initializes
> > as a card connected to SoC).  Functionality works great when single
> > stream is setup. However finding a way to setup both streams is
> > killing me.  I will eventually be passing the data captured from
> > the card to a TCP socket. Then will collect data from socket and
> > playback on card. effectively duplex audio over ethernet.
> >
> > So now I plead. Anybody have a method to open capture AND playback
> > streams Simultaneously?
> >
> >
> > ----------------------------------------------------------------------------
--
> > This SF.Net email is sponsored by the Verizon Developer Community
> > Take advantage of Verizon's best-in-class app development support
> > A streamlined, 14 day to market process makes app distribution fast and easy
> > Join now and get one step closer to millions of Verizon customers
> > http://p.sf.net/sfu/verizon-dev2dev
> > _______________________________________________
> > Alsa-user mailing list
> > Alsa-user <at> lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/alsa-user
> >
> 

Thanks for the reply, but I would like to take it a step further. I am
able to get aplay and arecord to run at same time, but my problem lies
in my software.  Specifically function calls to opening a capture 
stream and a playback stream, i.e. (snd_pcm_open(...capture) and 
snd_pcm_open(...playback).  Without it complaining about a busy device.
 I am really trying to avoid having to write two programs, one for 
opening playback and one for opening capture, but maybe thats what 
I will have to do. 

Hopefully my question makes sense, I've been starring at Alsa code for
so long that I might just be crazy.






------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
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