Unlike ALSA with dmix, the OSS driver allows only a single opener of
the sound device at any given time. With para_audiod it may happen
that the writer of the buffer tree for the next audio file tries to
open the device while the old writer is still active. If this happens,
the second writer fails to open the device which causes the whole
buffer tree to be aborted.

This patch serializes access to the OSS sound device by adding
a locking mechanism to oss_write.c. Since audiod is single threaded
this is rather simple: The lock is taken in oss_post_select() when
the device is opened. It is released in oss_close() after the file
descriptor has been closed.