[DragonFlyBSD - Submit #2804] (In Progress) Blocking IO in sound subsystem.

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Wed Mar 18 14:05:01 PDT 2015


Issue #2804 has been updated by vadaszi.

File patch-sound_fix_nonblock.diff added
Status changed from New to In Progress

This patch checks ap->a_ioflag from dsp_read() and dsp_write()'s function argument for the O_NONBLOCK flag (after passing it through several layers of function calls). The CHN_F_NBIO flag that is internally kept by the sound subsystem (and displayed when doing cat /dev/sndstat after setting the hw.snd.verbose sysctl to some value >=2) is accordingly updated on each read/write call.

I had linked to this patch in the irc channel ca. 1 Month ago, and now I'm no longer sure if checking ap->a_ioflag for the O_NONBLOCK bit is actually correct. Most other drivers seem to check ap->a_ioflag for the IO_NDELAY bit instead.

----------------------------------------
Submit #2804: Blocking IO in sound subsystem. 
http://bugs.dragonflybsd.org/issues/2804#change-12627

* Author: yellowrabbit2010
* Status: In Progress
* Priority: Normal
* Assignee: 
* Category: Driver
* Target version: 
----------------------------------------

Reapply old patch to the new sound system

>commit 3e2b80a43e8d3778b07c4680c8a2719cd4c7f621
>Author: Hasso Tepper <hasso at dragonflybsd.org>
>Date:   Mon Oct 8 17:55:00 2007 +0000
>    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 .


---Files--------------------------------
sound.patch (645 Bytes)
FIONBIO_test.tar.bz2 (6.7 KB)
fionbio_master.patch (4.54 KB)
patch-sound_fix_nonblock.diff (3.84 KB)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Submit mailing list