[alsa-devel] Any issues with GETOSPACE OSS ioctl?
I have a customer who reports that when his OSS application makes several write() followed by SNDCTL_DSP_GETOSPACE, the returned value is not decreasing, which implies that the write() commands are not going through.
I've looked at the OSS documentation for this ioctl (http://manuals.opensound.com/developer/SNDCTL_DSP_GETOSPACE.html), and it implies that it is not reliable. But since the customer is using ALSA (i.e. ALSA's OSS emulation), I don't know if that applies.
So I'd like to know how the 'bytes' return value is calculate in ALSA.
Timur Tabi wrote:
I have a customer who reports that when his OSS application makes several write() followed by SNDCTL_DSP_GETOSPACE, the returned value is not decreasing, which implies that the write() commands are not going through.
When write() doesn't return an error, it succeeded.
The GETOSPACE return value does not decrease as long as the written data has not yet filled an entire fragment. (This behaviour can be changed with the partial-frag option; see linux/Documentation/sound/alsa/OSS-Emulation.txt).
HTH Clemens
participants (2)
-
Clemens Ladisch
-
Timur Tabi