Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Nonblocking non-synchronized io plugin?
@ 2008-06-22  3:04 Aryeh Leib Taurog
  0 siblings, 0 replies; only message in thread
From: Aryeh Leib Taurog @ 2008-06-22  3:04 UTC (permalink / raw)
  To: alsa-devel

Hello,

    I am trying to develop an io plugin to route audio input/output to/from 
a network application I'm developing.  I'm working on openSUSE 10.2, which 
I think means I'm using ALSA 1.0.13rc2

I am running into two problems:

1. ALSA calls my transfer function with io->nonblock = 0 and seems to be 
   quite picky about the timing of the function.  I'm having trouble 
getting the timing correct, and it seems to be causing ALSA to stop/crash.  
Is there any way that I can get ALSA to handle the timing for me and call 
my transfer function with io->nonblock = 1 instead?

2. ALSA seems to require that the capture and playback transfers be 
   synchronized.  That seems like a simple enough expectation, but for some 
reason, I am having a hard time providing this.  I tried splitting the 
capture and playback up in .asoundrc as below, but it doesn't seem to help.  
(Actually I can't be sure, since it could just be a timing issue).  Is 
there a way to separate the capture from the playback so it won't require 
them to be synchronized?

Basically, I want the ioplug to have as much latitude as possible to just 
transfer the data and return as soon as it can.  I guess if the calls are 
non-blocking, then they also won't need to be syncronized.  Please correct 
me if I'm wrong.

.asoundrc:
-----------------------------
pcm.read {
    type myplug
}

pcm.write {
    type myplug
}

ctl.myapp {
    type myplug
}

pcm.myapp {
    type asym
    playback.pcm "write"
    capture.pcm "read"
}

pcm.!default myapp
------------------------------


Thanks very much
Please let me know if I need to clarify anything.

Aryeh Leib Taurog

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-22  3:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-22  3:04 Nonblocking non-synchronized io plugin? Aryeh Leib Taurog

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox