From nobody@FreeBSD.org  Wed Jul 17 14:49:42 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0891E37B400
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 Jul 2002 14:49:42 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8E24D43E5E
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 Jul 2002 14:49:41 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g6HLnfOT077202
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 Jul 2002 14:49:41 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g6HLnfwv077201;
	Wed, 17 Jul 2002 14:49:41 -0700 (PDT)
Message-Id: <200207172149.g6HLnfwv077201@www.freebsd.org>
Date: Wed, 17 Jul 2002 14:49:41 -0700 (PDT)
From: "Erwin J. van Eijk" <kojak@oakhill.demon.nl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: CT5880-C sometimes fails to output sound
X-Send-Pr-Version: www-1.0

>Number:         40711
>Category:       kern
>Synopsis:       [sound] CT5880-C sometimes fails to output sound
>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:   Wed Jul 17 14:50:01 PDT 2002
>Closed-Date:    Sun Sep 11 13:36:25 GMT 2005
>Last-Modified:  Sun Sep 11 13:36:25 GMT 2005
>Originator:     Erwin J. van Eijk
>Release:        4.6-RELEASE-p2
>Organization:
>Environment:
FreeBSD dwarf.oakhill.demon.nl 4.6-RELEASE-p2 FreeBSD 4.6-RELEASE-p2 #1: Wed Jul 17 21:43:23 CEST 2002     root@:/usr/obj/usr/src/sys/DWARF  i386
>Description:
cat /dev/sndstat
pcm0: <Creative CT5880-C> at io 0xd800 irq 9 (1p/1r/0v channels duplex)
cat file.au >/dev/audio -> sound
cat file.wav > /dev/dsp -> sound sometimes
mpg123 myfile.mp3 -> no sound ever.
aumix shows full audio on all channels.
other pattern: wavfile 11025Hz,mono,8bit fails -> converted to 11000Hz works on /dev/audio. When the wav is catted to /dev/dsp it comes out very slowly.
>How-To-Repeat:
      
>Fix:
      
>Release-Note:
>Audit-Trail:

From: Dan Naumov <dan.naumov@ofw.fi>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: RE: kern/40711: CT5880-C sometimes fails to output sound
Date: Sat, 19 Apr 2003 04:56:57 +0300

 I am experiencing very similar issues on my system as well:
 
 ========================================
 FreeBSD localhost.localdomain 5.0-RELEASE-p7 FreeBSD 5.0-RELEASE-p7 #0:
 Mon Apr  7 05:17:14 EEST 2003
 root@localhost.localdomain:/usr/obj/usr/src/sys/JAGO  i386
 
 pcm0: <Creative CT5880-C> port 0xe400-0xe43f irq 11 at device 14.0 on
 pci0
 ========================================
 
 While sound seems to work most of the time, sometimes, it just seems to
 "vanish" for no (visible) reason whatsoever. When trying to play a sound
 in XMMS, I get the "Couldn't Open Audio" error box that suggests that I
 check that nothing else is blocking sound, my output plugin is
 configured correctly, etc. If I start XMMS from console, the following
 error is printed into the console:
 
 ========================================
 ** WARNING **: oss_open(): Failed to open audio device (/dev/dsp): No
 such file or directory
 ========================================
 
 When I use vchans and force XMMS OSS plugin to use /dev/dsp0.X (where X
 is a number) I get a "Device is busy" error, yet, fstat and lsof show
 nothing that would be using the devices. What's even more bizarre is
 that SOMETIMES, simply clicking the play button again will remedy the
 problem (ie. sound will magically start working), unfortunately most
 often I have to reboot in order to get sound working again. This is also
 not an XMMS-only problem (obviously) as it happens with any sound-using
 app I use (mplayer, games, etc).
 
 Please, let me know if somebody has a proper test case to help isolate
 the problem and if more information is required. I'll be glad to help.
 
 Sincerely,
 -- 
 Dan Naumov <dan.naumov [at] ofw.fi>

From: Dan Naumov <dan.naumov@ofw.fi>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: RE: kern/40711: CT5880-C sometimes fails to output sound
Date: Sat, 19 Apr 2003 05:21:28 +0300

 I just noticed a very strange thing:
 
 After my sound dissapeared again a few hours ago, I started looking for
 ways to get it back without a reboot and this is what I ran into:
 
 ==========================
 localhost# sysctl hw.snd
 hw.snd.targetirqrate: 32
 hw.snd.report_soft_formats: 1
 hw.snd.verbose: 1
 hw.snd.unit: 0
 hw.snd.maxautovchans: 4
 hw.snd.pcm0.buffersize: 4096
 hw.snd.pcm0.vchans: 1
 ==========================
 
 After doing this:
 
 ==========================
 localhost# sysctl hw.snd.pcm0.vchans=4
 hw.snd.pcm0.vchans: 1 -> 4
 ==========================
 
 The sound seems to work in all apps again. Is it possible that something
 "bumps down" the value of hw.snd.pcm0.vchans causing problems at the
 same time ?
 
 -- 
 Dan Naumov <dan.naumov [at] ofw.fi>

From: Dan Naumov <dan.naumov@ofw.fi>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: RE: kern/40711: CT5880-C sometimes fails to output sound
Date: Wed, 23 Apr 2003 17:07:31 +0300

 OK, so far, I've figured out that the dissapearing sound isn't caused by
 "dropping amount of vchans". I am not entirely sure how did
 hw.snd.pcm0.vchans get dropped to 1 "by itself" as I mentioned in
 my previous mail, but this doesn't seem to be happening now. However
 whenever the sound dissapears, I can consistently get it back in 1-2
 tries by bumping vchans down to 0 or 1, waiting a few seconds and
 changing their amount back to 4 using sysctl. It's nice to have a
 workaround for this problem, but I'd also like to know the real cause
 and have a permanent fix for the problem.
 
 Sincerely,
 -- 
 Dan Naumov <dan.naumov [at] ofw.fi>
Responsible-Changed-From-To: freebsd-bugs->sound 
Responsible-Changed-By: orion 
Responsible-Changed-When: Thu Apr 24 14:25:27 PDT 2003 
Responsible-Changed-Why:  
sound problem. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=40711 

From: Dan Naumov <dan.naumov@ofw.fi>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: RE: kern/40711: CT5880-C sometimes fails to output sound
Date: Tue, 29 Apr 2003 09:15:56 +0300

 I noticed that Cliff L. Biffle from the freebsd-current mailing list is
 also experiencing this problem on a -CURRENT system. He built the kernel
 with the debugging options and managed to capture some messages that
 seem to coincide with the dsp breakage:
 
 =============================================
 lock order reversal
  1st 0xc1dea840 pcm0:play:0 (pcm channel) @ 
 /usr/src/sys/dev/sound/pcm/sound.c:191
  2nd 0xc1dea9c0 pcm0 (sound cdev) @
 /usr/src/sys/dev/sound/pcm/sound.c:163 Stack backtrace:
 
 lock order reversal
  1st 0xc1cbb9c0 pcm0:play:0 (pcm channel) @ 
 /usr/src/sys/dev/sound/pcm/sound.c:191
  2nd 0xc21aab40 pcm0 (sound cdev) @
 /usr/src/sys/dev/sound/pcm/sound.c:163 Stack backtrace:
 =============================================
 
 This can no longer be considered CT5880-C-specific as apparently, this
 can also happen with CS4281- and VIA VT8235-based chips and even SB
 Live! cards.
 
 http://docs.freebsd.org/cgi/getmsg.cgi?fetch=318461+0+current/freebsd-current
 http://docs.freebsd.org/cgi/getmsg.cgi?fetch=79498+0+current/freebsd-current
 http://docs.freebsd.org/cgi/getmsg.cgi?fetch=150256+0+current/freebsd-current
 http://docs.freebsd.org/cgi/getmsg.cgi?fetch=318461+0+current/freebsd-current
 
 Sincerely,
 -- 
 Dan Naumov <dan.naumov [at] ofw.fi>
State-Changed-From-To: open->closed 
State-Changed-By: netchild 
State-Changed-When: Sun Sep 11 13:36:01 GMT 2005 
State-Changed-Why:  
This is supposed to be fixed in -current. 

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