From: "J. Scott Merritt" <Scott@PragmaSoft.com>
To: "Sheng (Sean) Liu" <shengl@uci.edu>
Cc: alsa-devel@alsa-project.org
Subject: Re: When to start the capture device?
Date: Thu, 20 Sep 2007 10:11:30 -0400 [thread overview]
Message-ID: <20070920101130.39b76613.Scott@PragmaSoft.com> (raw)
In-Reply-To: <005101c7fb13$511e5040$aea4c380@dream.eng.uci.edu>
On Wed, 19 Sep 2007 16:17:55 -0700
"Sheng \(Sean\) Liu" <shengl@uci.edu> wrote:
> 1. The control point here the start threshold, which defines the number of
> frames of space/data necessary to start the device automatically. If set to
> some value other than zero for playback, it is necessary to prefill the
> playback buffer before the device will start. If set to zero, the first data
> written to the device (or first attempt to read from a capture stream) will
> start the device.
>
> My question: what does he means on " If set to zero"? Does anyone know which
> parameter of which API should be set to zero?
I believe this would be snd_pcm_sw_params_set_start_threshold.
> 2. You can also start the device explicitly using snd_pcm_start, but this
> requires buffer prefilling in the case of the playback stream. If you
> attempt to start the stream without doing this, you will get -EPIPE as a
> return code, indicating that there is no data waiting to deliver to the
> playback hardware buffer.
>
> My question: Is there anything to be done before calling snd_pcm_start in
> the case of capturing stream? If there is, what are they?
I use:
snd_pcm_open
SetUpHwParams () ... /* lots of snd_pcm_hw_params_set ... calls */
SetUpSwParams () ... /* lots of snd_pcm_sw_params_set ... calls */
snd_pcm_prepare
snd_pcm_start
Best regards, Scott.
next prev parent reply other threads:[~2007-09-20 14:06 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 [this message]
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
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=20070920101130.39b76613.Scott@PragmaSoft.com \
--to=scott@pragmasoft.com \
--cc=alsa-devel@alsa-project.org \
--cc=shengl@uci.edu \
/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.