Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Bilien <jobi@via.ecp.fr>
To: alsa-devel@lists.sourceforge.net
Subject: start_threshold having no effect
Date: Mon, 20 Oct 2003 19:30:30 +0200	[thread overview]
Message-ID: <20031020173030.GC28408@via.ecp.fr> (raw)

Hi,

I am trying to build an application using ALSA, and which requires low
playback delays.

My first idea was to have a small hardware buffer to limit the playout
delays. But then if for some reason the buffer gets full, the card stops,
and the next writei will block for about one second.

My second idea was to have a rather big hw buffer (500ms), and then set
the start_threshold to a low value (32 frames for instance). But whatever
my parameters were, I always got a playout delay of about the hw buffer
size.

I think the best way is the second one, but I can't figure out what I
did wrong. Here are the parameters I'm using:

20/10 18:56 /proc/asound/card0/pcm0p/sub0% cat hw_params 
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 1
rate: 8000 (8000/1)
period_size: 32
buffer_size: 4000
tick_time: 1000

20/10 19:12 /proc/asound/card0/pcm0p/sub0% cat sw_params 
tstamp_mode: NONE
period_step: 1
sleep_min: 0
avail_min: 16
xfer_align: 32
start_threshold: 32
stop_threshold: 4000
silence_threshold: 0
silence_size: 0
boundary: 2097152000

I am using a 2.6.0-test3 kernel (preemptive) with the 0.9.6 libasound.
My soundcard is a USB Plantronics Headset. The card is open both in
PLAYBACK and CAPTURE mode.

Thanks,
-- 
Jobi


-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54

             reply	other threads:[~2003-10-20 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-20 17:30 Johan Bilien [this message]
2003-10-20 22:23 ` start_threshold having no effect Paul Davis
2003-10-21  9:50   ` Johan Bilien
2003-10-21 11:32     ` Jaroslav Kysela
2003-10-21 12:26       ` Takashi Iwai
2003-10-21 12:28       ` Johan Bilien
2003-10-21 12:39     ` Paul Davis

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=20031020173030.GC28408@via.ecp.fr \
    --to=jobi@via.ecp.fr \
    --cc=alsa-devel@lists.sourceforge.net \
    /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