From yoshiaki@kt.rim.or.jp  Sun Apr 19 09:45:02 1998
Received: from mail.kt.rim.or.jp (root@mail.kt.rim.or.jp [202.247.130.53])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA24595
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 19 Apr 1998 09:45:01 GMT
          (envelope-from yoshiaki@kt.rim.or.jp)
Received: from singer.kt.rim.or.jp (ppp373.kt.rim.or.jp [202.247.140.73]) by mail.kt.rim.or.jp (8.8.5/3.4W3-rim1.1) with ESMTP id SAA28654; Sun, 19 Apr 1998 18:44:55 +0900 (JST)
Received: (from yoshiaki@localhost) by singer.kt.rim.or.jp (8.8.8/3.4Wbeta3-96070610) id SAA00705; Sun, 19 Apr 1998 18:14:59 +0900 (JST)
Message-Id: <199804190914.SAA00705@singer.kt.rim.or.jp>
Date: Sun, 19 Apr 1998 18:14:59 +0900 (JST)
From: yoshiaki@kt.rim.or.jp
Reply-To: yoshiaki@kt.rim.or.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: Luigi's sound driver problem
X-Send-Pr-Version: 3.2

>Number:         6349
>Category:       kern
>Synopsis:       Luigi's sound driver stall wihen it output small sound-file.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    luigi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 19 02:50:02 PDT 1998
>Closed-Date:    Sun Dec 27 03:05:18 PST 1998
>Last-Modified:  Sun Dec 27 03:06:21 PST 1998
>Originator:     Yoshiaki Uchikawa
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
RIMNET
>Environment:

FreeBSD 3.0-CURRENT #1: Sat Apr 18 18:41:05 JST 1998

CPU: Pentium Pro (232.67-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x619  Stepping=9
  Features=0xf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV>
real memory  = 100663296 (98304K bytes)
avail memory = 95510528 (93272K bytes)

chip0: <Intel 82440FX (Natoma) PCI and memory controller> rev 0x02 on pci0.0.0
chip1: <Intel 82371SB PCI to ISA bridge> rev 0x01 on pci0.1.0
ide_pci0: <Intel PIIX3 Bus-master IDE controller> rev 0x00 on pci0.1.1
vga0: <S3 968 graphics accelerator> rev 0x00 int a irq 255 on pci0.10.0
ncr0: <ncr 53c875 fast20 wide scsi> rev 0x03 int a irq 9 on pci0.11.0

sd0: <IBM DCAS-34330 S61A> type 0 fixed SCSI 2
sd1: <IBM DORS-32160 S82C> type 0 fixed SCSI 2
cd0: <NEC CD-ROM DRIVE:502 2.0r> type 5 removable SCSI 2
st0: <ARCHIVE 4326XX 27871-XXX 4.BG> type 1 removable SCSI 2
bktr0: <BrookTree 848> rev 0x12 int a irq 15 on pci0.13.0
Miro TV, Temic NTSC tuner.
CSN 1 Vendor ID: YMH0800 [0x0008a865] Serial 0xffffffff
mss_attach <Yamaha YMF719 OPL-SA3>1 at 0x530 irq 11 dma 0:1 flags 0x11
pcm1 (CS423x/Yamaha <Yamaha YMF719 OPL-SA3> sn 0xffffffff) at 0x530-0x537 irq 1

>Description:

When Luigi's sound drvier (pcm0), some application
(ex. /ports/x11/emiclock) stall. I terminate application by signal,
error message in console is:

   tsleep return -1

I try some sound cards, SB16PnP(Vibra), OPTi931, Yamaha SA3. Same
problem happen. 

And 

 % cp SMALLSOUNDFILE.au /dev/audio   : SMALLSOUDFILE.au < about 2048 bytes

This operation sound is not output by soundcard.

But

 % cp Soundfile.au /dev/audio   : Soundfile.au > about 2048 bytes

It is no problem.

# I think it is DMA problem. If sound-file is smaller than internal
# sound buffer(defalult 2048 byte), DMA transfer is not start.

Emiclock use small sound-file.
-rw-r--r--  1 yoshiaki  wheel  1666 Jan 12  1997 myu.au

I try that I make sound driver's internal buffer is smaller.

--- in emiclock's source code --
     int               block_size = 1024;
     ioctl(sdev, AIOSSIZE, &block_size);
--------------------------------

It is smaller than emiclock's sound-file. It is work file.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: steve 
Responsible-Changed-When: Sun Apr 19 10:24:11 PDT 1998 
Responsible-Changed-Why:  
Misfiled PR. 
Responsible-Changed-From-To: freebsd-bugs->luigi 
Responsible-Changed-By: phk 
Responsible-Changed-When: Fri Jul 3 01:48:38 PDT 1998 
Responsible-Changed-Why:  
Mr sound himself :-) 
State-Changed-From-To: open->closed 
State-Changed-By: luigi 
State-Changed-When: Sun Dec 27 03:05:18 PST 1998 
State-Changed-Why:  
Fixed in recent versions of the pcm driver (both -current and -stable) 
-- luigi 
>Unformatted:
