From owner-freebsd-bugs@FreeBSD.ORG Fri May 13 12:50:08 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 917F716A4CE for ; Fri, 13 May 2005 12:50:08 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D949643D1F for ; Fri, 13 May 2005 12:50:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4DCo7AR009863 for ; Fri, 13 May 2005 12:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4DCo7GN009862; Fri, 13 May 2005 12:50:07 GMT (envelope-from gnats) Resent-Date: Fri, 13 May 2005 12:50:07 GMT Resent-Message-Id: <200505131250.j4DCo7GN009862@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, hselasky@c2i.net Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD68A16A4CE for ; Fri, 13 May 2005 12:49:31 +0000 (GMT) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCE4443D70 for ; Fri, 13 May 2005 12:49:30 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from mp-217-199-190.daxnet.no ([193.217.199.190] verified) by mailfe07.swip.net (CommuniGate Pro SMTP 4.3c5) with ESMTP id 168057259 for FreeBSD-gnats-submit@freebsd.org; Fri, 13 May 2005 14:49:28 +0200 Message-Id: <200505131450.13427.hselasky@c2i.net> Date: Fri, 13 May 2005 14:50:12 +0200 From: Hans Petter Selasky To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/80974: SIMPLEX flag is not set properly in sound drivers X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hselasky@c2i.net List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2005 12:50:08 -0000 >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: