From: Aryeh Leib Taurog <vim@aryehleib.com>
To: alsa-devel@alsa-project.org
Subject: Nonblocking non-synchronized io plugin?
Date: Sun, 22 Jun 2008 06:04:54 +0300 [thread overview]
Message-ID: <20080622030454.GD14300@tishbi32.lan> (raw)
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
reply other threads:[~2008-06-22 3:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080622030454.GD14300@tishbi32.lan \
--to=vim@aryehleib.com \
--cc=alsa-devel@alsa-project.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox