From arlankfo@141.com  Thu Jun  6 21:05:27 2002
Return-Path: <arlankfo@141.com>
Received: from 141.com (mail1.141.com [65.168.139.2])
	by hub.freebsd.org (Postfix) with ESMTP id 9B0C737B409
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  6 Jun 2002 21:05:25 -0700 (PDT)
Received: from 141.com [151.200.58.43] by 141.com with ESMTP
  (SMTPD32-7.10) id A14ACA7B00E0; Thu, 06 Jun 2002 22:06:34 -0600
Message-Id: <200206062206734.SM02244@141.com>
Date: Fri, 07 Jun 2002 00:05:21 -0400
From: arlankfo@141.com
Sender: arlankfo@141.com
Reply-To: Andrew Lankford <arlankfo@141.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: 4/22/02 pcm driver merge appears to break several audio apps.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         38967
>Category:       kern
>Synopsis:       [sound] 4/22/02 pcm driver merge appears to break several audio apps.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 06 21:10:01 PDT 2002
>Closed-Date:    Sun Sep 11 19:01:01 GMT 2005
>Last-Modified:  Sun Sep 11 19:01:01 GMT 2005
>Originator:     Andrew Lankford
>Release:        FreeBSD 4.6-RC i386
>Organization:
none
>Environment:
System: FreeBSD bogushost2 4.6-RC FreeBSD 4.6-RC #6: Thu May 30 20:53:59 EDT 2002 root@bogushost2:/usr/obj/usr/src/sys/ARL0402 i386

Excerpts from bootup:

Preloaded elf module "snd_es137x.ko" at 0xc12181dc.
Preloaded elf module "snd_pcm.ko" at 0xc1218280.
...
pcm0: <Creative CT5880-C> port 0xd000-0xd03f irq 5 at device 14.0 on pci1
...
pcm0:play:0: play interrupt timeout, channel dead

(In case it isn't obvious, my sound card is an Ensoniq AudioPCI, Model ES4815)

For the record, two of the offending audio player ports, waveplay
and wavplay, don't appear to have undergone many changes or updates
for at least 6 months.

>Description:

	Playing 8 bit mono (1 channel) .wav files using waveplay,
	wavplay, or play(1) from the sox package will produce a
	quick succession of clicking noises at 11025 hz and 22050
	hz sampling.  This can either last about a second before
	the program exits normally, or (using waveplay) it can go
	on seemingly forever.  Occasionally the kernel will produce
	the "pcm0:play:0: play interrupt timeout, channel dead".
	I've only encountered this problem so far with clean
	monophonic wav files that use those two (common) sampling
	rates, but stereo and/or 16 bit samples play ok.  Other
	audio applications that don't play normal sample files seem
	to work ok--of course, most of those apps use stereo sound.

	I first noticed the problem after I updated to STABLE on
	May 2 (shortly after new pcm code was merged from current).
	Subsequent make buildkernels appear to have reduced the number
	of "play interrupt timeout, channel dead" messages, but
	that's all.

	
>How-To-Repeat:

        waveplay monowavefile.wav
	wavplay  monowavefile.wav
	play     monowavefile.wav

	...provided that monowavefile.wav is 8 bits, mono, and
	either 11025 hz or 22050 hz.  Ones that were sampled at
	6000, 8000, 8012, 11000, 16000, 22000, or 44100 to start
	with work ok.

>Fix:
       glad you asked.

       With wavplay and play, if you specify the playback sampling
       rate explicitly (with an -s | -r command line option)
       to be something like 11000 hz instead of the (standard?)
       11025 hz or 22000 hz instead of 22050 hz, the sample will
       sound ok.  Higher/lower values will either produce the crackling noise
       or a slowed-down/sped-up sound as one might expect.  With waveplay,
       tweaking the playback rate will often give you a very loud (but
       thankfully very brief) highly sped-up playback.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sound 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Jul 12 21:52:49 PDT 2003 
Responsible-Changed-Why:  
Over to sound maintainers 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38967 
State-Changed-From-To: open->feedback 
State-Changed-By: netchild 
State-Changed-When: Sun Sep 11 13:20:50 GMT 2005 
State-Changed-Why:  
Do you still have this problem on 5.[34] or -current? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38967 
State-Changed-From-To: feedback->closed 
State-Changed-By: netchild 
State-Changed-When: Sun Sep 11 19:00:44 GMT 2005 
State-Changed-Why:  
Originator address bounces (unknown user). 

If someone has the same problem, please open a new PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38967 
>Unformatted:
