cvs commit: src/sys/dev/sound/pcm dsp.c

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Mon Oct 8 11:35:43 PDT 2007


Matthew Dillon wrote:
> :  Dragonfly always passes a flag for every IO operation depending whether
> :  the mode of the operation or of the fd is set to NBIO, but it doesn't
> :  pass down fcntl() changes to the drivers. So, if you open /dev/dsp with
> :  NONBLOCK and later fcntl it to blocking, the sound driver won't be aware
> :  of this fact.
> :  
> :  Fix: don't maintain this setting in the sound driver.
> :  
> :  Requested and tested by corecode at .
> 
>     Nice catch.  I changed the NBIO stuff a while back so the threading code 
>     could issue NBIO reads and writes without actually setting the descriptor
>     to non-blocking.  This removed interference with stdio tty descriptors 
>     (which are all shared) when running threaded programs.  So drivers
>     should definitely not be trying to track that ioctl themselves any more.

Yah.  scummvm couldn't play sound, so I had to fix it.  The reason I
used scummvm in the first place was because I don't have network
connection at home right now :)

Original problematic sequence:

open(..., O_NONBLOCK)	<- sound driver records
fcntl(SETFL, not O_NONBLOCK)	<- not passed up to sound driver
write(...) <- returns EAGAIN.  user unhappy, stops playing.

cheers
  simon





More information about the Commits mailing list