From alsa-devel-owner@alsa.jcu.cz  Thu Mar 11 19:39:58 1999
Received: from aix1.inet.tele.dk (aix1.inet.tele.dk [193.162.146.9])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id TAA24430
	for <alsa-devel@alsa.jcu.cz>; Thu, 11 Mar 1999 19:39:37 +0100
Received: from renehl.ournet.dk (root@ip220.ronnxr1.ras.tele.dk [195.249.54.220])
	by aix1.inet.tele.dk (8.9.2/8.9.2) with ESMTP id TAA19158
	for <alsa-devel@alsa.jcu.cz>; Thu, 11 Mar 1999 19:39:28 +0100
Received: (from news@localhost)
	by renehl.ournet.dk (8.9.3/8.9.3/Debian/GNU) id SAA07001
	for alsa-devel@alsa.jcu.cz; Thu, 11 Mar 1999 18:17:15 +0100
From: renehl@post1.tele.dk (Rene Hojbjerg Larsen)
Subject: mmap'ed access to /dev/dsp kills ALSA CVS
Date: 11 Mar 1999 17:17:14 GMT
Message-ID: <7c8tqq$6qm$1@renehl.ournet.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
To: alsa-devel@alsa.jcu.cz
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

It would seem that the latest ALSA CVS version has trouble handling OSS
compatible mmap'ed access to /dev/dsp.  Specifically, when I exit Quake II
(which uses mmap'ed sound) the primary PCM channel on my sound card
(SB PCI128) locks up.  The status of the PCM channel when in this state is

# cat /proc/asound/card1/pcm0
ES1370 DAC2/ADC

Playback
  Mode           : OSS compatible [mmap]
  Format         : Signed 16-bit Little Endian
  Rate           : 22050Hz [requested 22050Hz]
  Channels       : 2
  Buffer size    : 131072
  Buffer used    : 131072
  Fragments      : 8
  Fragment size  : 16384
  Underruns      : 0
  Total underruns: 0
Record
  Mode           : OSS compatible [mmap]
  Format         : Signed 16-bit Little Endian
  Rate           : 22050Hz [requested 22050Hz]
  Channels       : 2
  Buffer size    : 131072
  Buffer used    : 0
  Fragments      : 0
  Fragment size  : 0
  Overruns       : 0
  Total overruns : 0

At this point, the PCM channel is completely locked.  Other programs get
"EBUSY" when trying to access it and the ALSA modules can't be unloaded.
The only way to get the channel back is to reboot :-(  The other PCM
channel, the mixer, etc. seem to run fine, though.

I have checked with both fuser and lsof that no program uses /dev/dsp*.
The problem started when I upgraded from 0.3.0pre4 to the current CVS
version.  Some system info:

# uname -a         
Linux renehl 2.2.3 #1 Wed Mar 10 00:21:00 CET 1999 i686 unknown
# cat /proc/asound/cards   
0 [card1          ]: AudioPCI - Ensoniq AudioPCI
                     Ensoniq AudioPCI ES1370 at 0xe400, irq 11

HTH.
-- 
       /'"`\  zzzZ  | My PGP Public Key is available at:
      ( - - )       | <http://home1.inet.tele.dk/renehl/>
--oooO--(_)--Oooo------------------------------------------ 
 Don't ya just hate it when there's not enough room to fin 


