At Fri, 10 Jul 2009 10:29:55 +0200, Sindre Aamås wrote: > > Hi. > > For the attached test case snd_pcm_avail_update returns values higher > than the buffer size when run with the OSS PCM plugin. Output of > alsa-info.sh is at > http://www.alsa-project.org/db/?f=77a873e55d5d6ca50d67a035a9d6b7e10cca179d . This is obviously a bug in OSS plugin (who thought of using this plugin seriously? :) The oneliner below should fix the problem. thanks, Takashi --- >From ae9a633d98988d072307284a260e985a4c660501 Mon Sep 17 00:00:00 2001 From: Takashi Iwai <tiwai@xxxxxxx> Date: Fri, 17 Jul 2009 12:00:18 +0200 Subject: [PATCH] oss - Add missing initialization of fragments The periods calculation was missing for initializing OSS fragments. Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> --- oss/pcm_oss.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/oss/pcm_oss.c b/oss/pcm_oss.c index 8a2a672..d43b44c 100644 --- a/oss/pcm_oss.c +++ b/oss/pcm_oss.c @@ -181,6 +181,7 @@ static int oss_hw_params(snd_pcm_ioplug_t *io, fprintf(stderr, "*** OSS: invalid period size %d\n", (int)io->period_size); return -EINVAL; } + oss->periods = io->buffer_size / io->period_size; _retry: tmp = oss->period_shift | (oss->periods << 16); -- 1.6.3.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel