Date: Sun, 16 Feb 2003 19:51:17 +0100 (CET) From: Jean-Yves Lefort <jylefort@brutele.be> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/48338: pcm audio driver hogs /dev/dsp?.? Message-ID: <20030216185117.47EE922E35@jsite.lefort.net>
next in thread | raw e-mail | index | archive | help
>Number: 48338 >Category: kern >Synopsis: pcm audio driver hogs /dev/dsp?.? >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Feb 16 11:00:03 PST 2003 >Closed-Date: >Last-Modified: >Originator: Jean-Yves Lefort >Release: FreeBSD 4.7-RELEASE-p3 i386 >Organization: >Environment: The problem has been experienced on: $ uname -a FreeBSD jsite.lefort.net 4.7-RELEASE-p3 FreeBSD 4.7-RELEASE-p3 #0: Tue Jan 7 23:46:56 CET 2003 jylefort@jsite.lefort.net:/usr/obj/usr/src/sys/JSITE i386 $ cat /dev/sndstat FreeBSD Audio Driver (newpcm) Installed devices: pcm0: <AudioPCI ES1373-8> at io 0x9000 irq 11 (1p/1r/4v channels duplex) $ and: $ uname -a FreeBSD noname 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Sat Feb 1 00:57:38 EST 2003 refugee@noname:/usr/obj/usr/src/sys/NONAME i386 $ cat /dev/sndstat FreeBSD Audio Driver (newpcm) Installed devices: pcm0: <CMedia CMI8738> at io 0xd800 irq 10 (1p/1r/0v channels duplex default) $ >Description: Under certain conditions, the pcm audio device driver hogs /dev/dsp?.? ("Device Busy"). It seems that the problem happens when a process tries to open a dsp device shortly after the same device has been opened by another process. This might be related to the vchan code, as the hw.snd.pcm0.vchans sysctl knob was set to 4 during my tests. "fstat | grep dsp" gives nothing. >How-To-Repeat: $ while :; do play somesoundfile & done This will quickly lock /dev/dsp0.0. Of course, be prepared to hit ^C, since the & is not a typo. :) >Fix: If multiple virtual channels are in use when the problem first appears, setting sysctl hw.snd.pcm0.vchans to locked_dsp_# - 1 and then back to the original number unlocks the dsp device. However, after locking the dsp device a second time, reducing hw.snd.pcm0.vchans gives "Invalid argument" and the device is locked for good: then, only a reboot helps. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030216185117.47EE922E35>