FreeBSD OSS + Alsa - what's the right behaviour for non-blocking IO?

Bernhard Fröhlich decke at FreeBSD.org
Wed Mar 13 08:34:41 UTC 2013


On Wed, Mar 13, 2013 at 12:15 AM, Adrian Chadd <adrian at freebsd.org> wrote:
> On 12 March 2013 16:12, Adrian Chadd <adrian at freebsd.org> wrote:
>> .. and a further update:
>>
>> Here's what the setup code ends up doing inside alsa:
>>
>>
>> snd_pcm_sw_params_set_avail_min: val=4096, period_size=1024
>> snd_pcm_sw_params_set_avail_min: avail_min is now 4096
>>
>> So the avail min value is being setup fine.
>>
>> Next, what's going on at the sound driver layer:
>
> grr.
>
> Mar 12 16:10:55 lucy kernel: [100418] pcm0: chn_resizebuf():
> PCMDIR_PLAY (virtual) timeout=21 b[0/0/0] bs[131072/4096/32] limit=170
> Mar 12 16:10:55 lucy kernel: [100418] pcm0: chn_resizebuf():
> PCMDIR_PLAY (virtual) timeout=21 b[0/0/0] bs[131072/4096/32] limit=341
> Mar 12 16:10:55 lucy kernel: [100418] pcm0: chn_resizebuf():
> PCMDIR_PLAY (virtual) timeout=21 b[0/0/0] bs[131072/4096/32] limit=682
> Mar 12 16:10:55 lucy kernel: [100418] pcm0: chn_resizebuf():
> PCMDIR_PLAY (virtual) timeout=21 b[0/0/0] bs[131072/4096/32]
> limit=3763
>
> -- I've set the playback buffer size to be 32768 frames,
>
> But there doesn't seem to be any subsequent adjustments of the low
> watermark based on what I've setup the ALSA avail_min parameter to be.

I think a very similar bug was reported and analyzed for multimedia/xbmc some
time ago. If I remember correctly there was also another problems connected
to sample rate differences. I've CC'd the xbmc maintainer Mickael
Maillot because
he probably remembers better than I do.

-- 
Bernhard Froehlich
http://www.bluelife.at/


More information about the freebsd-multimedia mailing list