Date: Tue, 12 Mar 2013 15:58:34 -0700 From: Adrian Chadd <adrian@freebsd.org> To: freebsd-multimedia@freebsd.org Subject: Re: FreeBSD OSS + Alsa - what's the right behaviour for non-blocking IO? Message-ID: <CAJ-VmokVUc44SO6mMP6fY-T1BPD8qoe4qyqoH5B1wNA5giNTPA@mail.gmail.com> In-Reply-To: <CAJ-Vmomf3GW0M_8b-W59dSh1rSn5ypHZN_eKQEpJVKJaeA_9ww@mail.gmail.com> References: <CAJ-Vmomf3GW0M_8b-W59dSh1rSn5ypHZN_eKQEpJVKJaeA_9ww@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12 March 2013 15:31, Adrian Chadd <adrian@freebsd.org> wrote: > So I'll go and tinker with the ALSA setup side in order to see what > the story is (it's almost certain I'm setting things up incorrectly > for non-blocking IO here and I need to to wave the right magic wand to > get the low watermark reset right. > > However, there's definitely a behavioural difference here - FreeBSD > shouldn't be returning POLLOUT on the dsp device, only to find that > there's no space in the playback FIFO. As a follow-up, I hacked the alsa oss plugin to see what was going on, and here's what is happening inside oss_pointer(): oss_pointer: bi.bytes=3764, bi.fragments=0, bi.fragstotal=32, bi.fragsize=4096 (and 100 more of the above..) oss_pointer: bi.bytes=5644, bi.fragments=1, bi.fragstotal=32, bi.fragsize=4096 oss_pointer: bi.bytes=5644, bi.fragments=1, bi.fragstotal=32, bi.fragsize=4096 each one of those is from a trip through poll() -> alsa get navail. So I think the kernel sound code is returning that the FD is ready even though there's no space in the write FIFO. Is this enough for a PR? Thanks, Adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokVUc44SO6mMP6fY-T1BPD8qoe4qyqoH5B1wNA5giNTPA>