From: Takashi Iwai <tiwai@suse.de>
To: "J. Scott Merritt" <alsauser@pragmasoft.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: When to start the capture device?
Date: Fri, 21 Sep 2007 16:16:31 +0200 [thread overview]
Message-ID: <s5hodfwp0hs.wl%tiwai@suse.de> (raw)
In-Reply-To: <20070920114612.27b70757.alsauser@pragmasoft.com>
At Thu, 20 Sep 2007 11:46:12 -0400,
J. Scott Merritt wrote:
>
> On Thu, 20 Sep 2007 16:23:30 +0200
> Takashi Iwai <tiwai@suse.de> wrote:
>
> > snd_pcm_prepare() is required to recover the stream from XRUN or any
> > other errors. But, for the recovery purpose, we have now
> > snd_pcm_recover() as a generic solution, too.
>
> It appears that (currently) the additional benefit of snd_pcm_recover
> is simply that of resuming the stream. However, I haven't seen any
> details on when/why a stream would become suspened and require this
> type of recovery.
The audio apps (or system) usually want to know when the stream is
stopped unexpectedly. The suspend/resume is exactly as same as XRUN
from this perspective. That's why it's handled by the application.
snd_pcm_recover() is provided to handle it more easily.
> Also, in SALSA, it appears that snd_pcm_recover can -block- even if
> the stream has been configured for non-blocking behavior.
It's with ALSA-lib, too. The snd_pcm_recover() code is identical in
both libraries. This is the function that may block regardless what
mode you use.
The non-blocking mode isn't specified for ioctls but for
read/write in general. In theory, the normal snd_pcm_prepare() could
block (take some time) if the driver is implemented in such a way.
Takashi
next prev parent reply other threads:[~2007-09-21 14:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 23:17 When to start the capture device? Sheng (Sean) Liu
2007-09-20 14:11 ` J. Scott Merritt
2007-09-20 14:14 ` J. Scott Merritt
2007-09-20 14:23 ` Takashi Iwai
2007-09-20 15:46 ` J. Scott Merritt
2007-09-21 14:16 ` Takashi Iwai [this message]
2007-09-20 14:20 ` Takashi Iwai
2007-09-20 22:10 ` Sheng (Sean) Liu
2007-09-21 16:24 ` Takashi Iwai
2007-09-21 17:49 ` Sheng (Sean) Liu
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=s5hodfwp0hs.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=alsauser@pragmasoft.com \
/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.