From: Daniel Yek <dyek@real.com>
To: Alsa Developement <alsa-devel@lists.sourceforge.net>
Subject: 5.1 surround sound playback XRUN / snd_pcm_writei() didn't unblock immediately / small 114 msec buffer
Date: Fri, 06 Oct 2006 01:52:41 -0700 [thread overview]
Message-ID: <6.2.1.2.2.20061006012016.30ac5ee8@mailone.real.com> (raw)
In-Reply-To: <s5hhcyq52do.wl%tiwai@suse.de>
Hi,
I opened "surround51" PCM device and set the sampling rate to 48000, S16_LE
format. I requested 500000 usec (0.5 sec) of buffer time, but I got back
only 113770 usec. (equals to 65532 bytes.) Is there a way I can get a
bigger buffer size? Does it depend on the driver or ALSA can typically
provide more?
I used snd_pcm_writei() in blocking mode, transferring 28800 bytes (2400
frames) at a time. After two writes (buffer about full), the third write
blocked for 95 msec. Soon after, the function blocked for 128 msec, caused
XRUN. Is snd_pcm_writei() in blocking mode suitable for 5.1 channels
playback without XRUNs? Why snd_pcm_writei() didn't unblock immediately
when snd_pcm_avail_update() returned 5044 frames (105 msec.) available?
I'm going to try a non-blocking snd_pcm_writei() solution. Do you think it
is the answer to the XRUN problem?
Thank you very much.
--
Daniel Yek
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
next prev parent reply other threads:[~2006-10-06 8:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-28 8:54 _test_channels() / plug:surround51 / Hardware Mixing And dmix / SW or HW Resampling / Volume Control Daniel Yek
2006-09-28 13:17 ` Takashi Iwai
2006-09-28 14:40 ` Lee Revell
2006-09-28 14:46 ` Takashi Iwai
2006-09-28 14:58 ` Takashi Iwai
2006-09-28 15:06 ` Default soundcard (UDEV?) Jaroslav Kysela
2006-09-28 15:15 ` Lee Revell
2006-09-28 15:27 ` Takashi Iwai
2006-09-28 16:00 ` Jaroslav Kysela
2006-09-28 16:30 ` Takashi Iwai
2006-09-28 23:44 ` _test_channels() / plug:surround51 / Hardware Mixing And dmix / SW or HW Resampling / Volume Control Daniel Yek
2006-09-29 11:38 ` Takashi Iwai
2006-10-06 8:52 ` Daniel Yek [this message]
2006-10-06 13:09 ` 5.1 surround sound playback XRUN / snd_pcm_writei() didn't unblock immediately / small 114 msec buffer Clemens Ladisch
2006-10-06 20:34 ` Daniel Yek
2006-10-09 15:21 ` Clemens Ladisch
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=6.2.1.2.2.20061006012016.30ac5ee8@mailone.real.com \
--to=dyek@real.com \
--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