Date: Wed, 13 Mar 2013 09:34:41 +0100 From: =?ISO-8859-1?Q?Bernhard_Fr=F6hlich?= <decke@FreeBSD.org> To: Adrian Chadd <adrian@freebsd.org> Cc: freebsd-multimedia@freebsd.org Subject: Re: FreeBSD OSS + Alsa - what's the right behaviour for non-blocking IO? Message-ID: <CAE-m3X1KL1DmWnqGZqM2p4o7zbaY_XHQVBhoDyGtqCSV1_rqBQ@mail.gmail.com> In-Reply-To: <CAJ-VmomnOyaSM47EcehePG6MR8UU9K4fAm6Sba=1RE4cBhTtyA@mail.gmail.com> References: <CAJ-Vmomf3GW0M_8b-W59dSh1rSn5ypHZN_eKQEpJVKJaeA_9ww@mail.gmail.com> <CAJ-VmokVUc44SO6mMP6fY-T1BPD8qoe4qyqoH5B1wNA5giNTPA@mail.gmail.com> <CAJ-VmomoudG_zPLjgn53C_xLe7tJEBpnotxNS0pkLFpC62skfQ@mail.gmail.com> <CAJ-VmomnOyaSM47EcehePG6MR8UU9K4fAm6Sba=1RE4cBhTtyA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 13, 2013 at 12:15 AM, Adrian Chadd <adrian@freebsd.org> wrote: > On 12 March 2013 16:12, Adrian Chadd <adrian@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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-m3X1KL1DmWnqGZqM2p4o7zbaY_XHQVBhoDyGtqCSV1_rqBQ>