Date: Fri, 13 May 2005 14:50:12 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/80974: SIMPLEX flag is not set properly in sound drivers Message-ID: <200505131450.13427.hselasky@c2i.net> Resent-Message-ID: <200505131250.j4DCo7GN009862@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 80974 >Category: kern >Synopsis: SIMPLEX flag is not set properly in sound drivers >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri May 13 12:50:07 GMT 2005 >Closed-Date: >Last-Modified: >Originator: HPS >Release: FreeBSD 6.0-CURRENT i386 >Organization: >Environment: System: FreeBSD 6.0-CURRENT FreeBSD 6.0-CURRENT #45: Mon Mar 21 15:40:17 CET 2005 root@:/usr/obj/usr/src/sys/custom i386 >Description: SIMPLEX flag is not set properly in sound drivers Several device drivers call "pcm_setflags" before "pcm_register". The problem is that "pcm_register" clears these flags. Maybe the device drivers should be changed, or maybe "pcm_register" should be changed. >How-To-Repeat: >Fix: Here is my solution: In the file "/sys/dev/sound/pcm/sound.c" in the function "pcm_register()" "d->flags = 0;" should be changed into: /* d->flags = 0; should be cleared by allocator of softc; * cannot clear this field here, because several devices set * this flag before calling pcm_register() */ For example see /sys/dev/sound/isa/sb8.c: pcm_setflags(dev, pcm_getflags(dev) | SD_F_SIMPLEX); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505131450.13427.hselasky>