http://bugs.winehq.org/show_bug.cgi?id=29585
--- Comment #16 from Andrew Eikum aeikum@codeweavers.com 2012-02-02 13:55:09 CST --- Well, after spending the better part of a day on this, I'm no further to understanding why that call breaks the OSS device.
While it seems like this ought to be a read-only call (i.e. no modifications to the device), diving into the OSS source reveals that it isn't:
static int get_ospace (adev_p adev, dmap_p dmap, ioctl_arg arg) { ... if (!(dmap->flags & DMAP_PREPARED)) { setup_fragments (adev, dmap, OPEN_WRITE); prepare_output (adev, dmap); } ...
Notice setup_fragments() and prepare_output(), both of which make changes to dmap's and adev's members.
I was also wrong in the last comment. The call order is: (open, engineinfo, setfmt, channels, speed, [getospace,] getodelay, getospace, write), the one in brackets is our problematic call. Looking through the source for GETODELAY, I see no modifications to the device (there is a driver call in there that I didn't investigate).
Going to see if I can figure out how to build OSS and get it to output stuff.