From owner-freebsd-multimedia Tue Jun 4 23:51:48 2002 Delivered-To: freebsd-multimedia@freebsd.org Received: from richard.eu.org (adsl-213-190-39-32.takas.lt [213.190.39.32]) by hub.freebsd.org (Postfix) with ESMTP id B3B6D37B40A for ; Tue, 4 Jun 2002 23:51:25 -0700 (PDT) Received: from richard.eu.org (localhost [127.0.0.1]) by richard.eu.org (8.12.3/8.12.3) with ESMTP id g556pLc5052277 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 5 Jun 2002 08:51:22 +0200 (EET) (envelope-from rch@richard.eu.org) Received: (from rch@localhost) by richard.eu.org (8.12.3/8.12.3/Submit) id g556pKFK052272 for freebsd-multimedia@FreeBSD.ORG; Wed, 5 Jun 2002 08:51:20 +0200 (EET) Date: Wed, 5 Jun 2002 08:51:19 +0200 From: Richard =?utf-8?B?xIxlcGFz?= To: freebsd-multimedia@FreeBSD.ORG Subject: Re: A way to reset audio driver without reboot? Message-ID: <20020605065119.GA52174@richard.eu.org> References: <20020604214219.GI53811@richard.eu.org> <20020604153656.B40853@lns.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20020604153656.B40853@lns.com> User-Agent: Mutt/1.5.0i X-OS: FreeBSD 4.6-RC i386 Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue Jun 4 15:36:56 2002 -0700 Tim Pozar wrote: >On Tue, Jun 04, 2002 at 11:42:20PM +0200, Richard Cepas wrote: >> Is there any way to reset audio device? I often end up in the situation when output to /dev/audio gives until reboot: >> /dev/audio: Device busy >> Neither lsof, fstat or ps show any programs left having using audio except /dev/mixer0. >> >> cat /dev/sndstat >> FreeBSD Audio Driver (newpcm) >> Installed devices: >> pcm0: at io 0x220 irq 5 drq 1:5 bufsz 4096d (1p/1r/0v channels duplex) >> >> card is AWE64 > >I use lsof to see what may be attached to /dev/dsp... > ># lsof /dev/dsp >COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME >mpg123 41043 pozar 4w VCHR 30,19 0t11124736 8484 /dev/dsp1 > >Then just kill the PID. > The problem is that there is apparently nothing to kill but device is still busy: $ lsof /dev/mixer /dev/sequencer /dev/dsp /dev/audio /dev/dspW /dev/music /dev/pss lsof: WARNING: compiled for FreeBSD release 4.4-STABLE; this is 4.6-RC. $ echo >/dev/audio bash: /dev/audio: Device busy Thanks, Richard. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message