From nobody@FreeBSD.org  Sat Dec 13 02:41:46 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 51A70106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 13 Dec 2008 02:41:46 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 3EBD88FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 13 Dec 2008 02:41:46 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD2fjPG025365
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 13 Dec 2008 02:41:45 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id mBD2fjI7025364;
	Sat, 13 Dec 2008 02:41:45 GMT
	(envelope-from nobody)
Message-Id: <200812130241.mBD2fjI7025364@www.freebsd.org>
Date: Sat, 13 Dec 2008 02:41:45 GMT
From: RJ <rjohns44@comcast.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Sound stops with error: pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         129604
>Category:       kern
>Synopsis:       [sound] Sound stops with error: pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-multimedia
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 13 02:50:00 UTC 2008
>Closed-Date:    
>Last-Modified:  Sun Apr 15 03:00:12 UTC 2012
>Originator:     RJ
>Release:        7.1-PRERELEASE #0
>Organization:
>Environment:
FreeBSD armada.ypeast01.mi.comcast.net 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Thu Dec  4 22:17:09 EST 2008     root@armada.ypeast01.mi.comcast.net:/usr/src/sys/i386/compile/armada_Nkbdmux_Ypreemption  i386

>Description:
Sound stops playing using totem, mplayer, or flash9 (youtube). Using system OSS. 
Tried the following without success:
* Installed audio/oss
* hint.acpi.0.disabled=1
* hint.apic.0.disabled=1

Occassionally had this issue in 6.2. Upgraded from source to 7.1-PRERELEASE. Link to tarball with output of key commands and files will be attached.
>How-To-Repeat:
Play any audio or video file.
>Fix:
Sometimes, kldload snd_via82c686.ko after login helps, but is not consistent. I have not tried compiling the driver into the kernel.

>Release-Note:
>Audit-Trail:

From: rjohns44@comcast.net
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/129604: Sound stops with error: pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead
Date: Sat, 13 Dec 2008 07:56:32 +0000

 http://home.comcast.net/~rjohns44/freebsd/pr129604.tar
 Contents:
 dmesg.txt
 kernelconf
 loader.conf
 pciconf.txt
 sndstat
 vmstat
Responsible-Changed-From-To: freebsd-bugs->freebsd-multimedia 
Responsible-Changed-By: remko 
Responsible-Changed-When: Sat Dec 13 17:59:53 UTC 2008 
Responsible-Changed-Why:  
Reassign to multimedia team 

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

From: Yuri <yuri@rawbw.com>
To: bug-followup@FreeBSD.org
Cc: rjohns44@comcast.net
Subject: RE: kern/129604: [sound] Sound stops with error: pcm0:virtual:dsp0.vp0:
 play interrupt timeout, channel dead
Date: Sat, 31 Mar 2012 23:21:55 -0700

 I just got this on 9.0 after reboot. Sound doesn't work at all.
 $ dmesg | grep pcm
 pcm0: <AudioPCI ES1370> irq 16 at device 0.0 on pci8
 pcm0: es1370_wrcodec: timed out
 pcm0: es1370_wrcodec: timed out
 pcm0: es1370_wrcodec: timed out
 pcm0: es1370_wrcodec: timed out
 pcm0: <Playback: DAC1,DAC2 / Record: ADC>
 pcm0: chn_write(): pcm0:play:dsp0.p1: play interrupt timeout, channel dead
 pcm0: es1370_wrcodec: timed out
 pcm0: es1370_wrcodec: timed out
 pcm0: es1370_wrcodec: timed out
 pcm0: es1370_wrcodec: timed out
 pcm0: es1370_wrcodec: timed out

From: Yuri <yuri@rawbw.com>
To: "Conrad J. Sabatier" <conrads@cox.net>
Cc: freebsd-multimedia@freebsd.org, bug-followup@freebsd.org
Subject: Re: kern/129604: [sound] Sound stops with error: pcm0:virtual:dsp0.vp0:
 play interrupt timeout, channel dead
Date: Wed, 04 Apr 2012 14:43:59 -0700

 On 04/04/2012 14:25, Conrad J. Sabatier wrote:
 > I've been seeing this intermittently for a very long time.  I've
 > reported it and have received a patch from the sound maintainer, but it
 > still occurs every so often nonetheless.
 >
 > This is a long-standing bugaboo that has yet to be fully resolved.
 
 Maybe it's a good idea if you posted this patch into the bug comments 
 (bug-followup@FreeBSD.org) so that whoever looks into it can at least 
 see the direction the patch was going.
 
 Yuri

From: "Conrad J. Sabatier" <conrads@cox.net>
To: Yuri <yuri@rawbw.com>
Cc: freebsd-multimedia@freebsd.org, bug-followup@freebsd.org
Subject: Re: kern/129604: [sound] Sound stops with error:
 pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead
Date: Wed, 4 Apr 2012 17:43:21 -0500

 On Wed, 04 Apr 2012 14:43:59 -0700
 Yuri <yuri@rawbw.com> wrote:
 
 > On 04/04/2012 14:25, Conrad J. Sabatier wrote:
 > > I've been seeing this intermittently for a very long time.  I've
 > > reported it and have received a patch from the sound maintainer,
 > > but it still occurs every so often nonetheless.
 > >
 > > This is a long-standing bugaboo that has yet to be fully resolved.
 > 
 > Maybe it's a good idea if you posted this patch into the bug comments 
 > (bug-followup@FreeBSD.org) so that whoever looks into it can at least 
 > see the direction the patch was going.
 > 
 > Yuri
 
 Here's the patch I got from (I forget who sent it to me!):
 
 --- hdac.c      (revision 230571)
 +++ hdac.c      (working copy)
 @@ -1921,6 +1921,8 @@
 	ctl |= 1 << ss;
 	HDAC_WRITE_4(&sc->mem, HDAC_INTCTL, ctl);
 
 +	HDAC_WRITE_1(&sc->mem, off + HDAC_SDSTS,
 +		HDAC_SDSTS_DESE | HDAC_SDSTS_FIFOE | HDAC_SDSTS_BCIS);
 	ctl = HDAC_READ_1(&sc->mem, off + HDAC_SDCTL0);
 	ctl |= HDAC_SDCTL_IOCE | HDAC_SDCTL_FEIE | HDAC_SDCTL_DEIE |
 		HDAC_SDCTL_RUN;
 
 
 -- 
 Conrad J. Sabatier
 conrads@cox.net

From: Olivier Smedts <olivier@gid0.org>
To: "Conrad J. Sabatier" <conrads@cox.net>
Cc: Yuri <yuri@rawbw.com>, freebsd-multimedia@freebsd.org, 
	bug-followup@freebsd.org
Subject: Re: kern/129604: [sound] Sound stops with error: pcm0:virtual:dsp0.vp0:
 play interrupt timeout, channel dead
Date: Thu, 5 Apr 2012 10:06:05 +0200

 2012/4/5 Conrad J. Sabatier <conrads@cox.net>:
 > On Wed, 04 Apr 2012 14:43:59 -0700
 > Yuri <yuri@rawbw.com> wrote:
 >
 >> On 04/04/2012 14:25, Conrad J. Sabatier wrote:
 >> > I've been seeing this intermittently for a very long time. =A0I've
 >> > reported it and have received a patch from the sound maintainer,
 >> > but it still occurs every so often nonetheless.
 >> >
 >> > This is a long-standing bugaboo that has yet to be fully resolved.
 >>
 >> Maybe it's a good idea if you posted this patch into the bug comments
 >> (bug-followup@FreeBSD.org) so that whoever looks into it can at least
 >> see the direction the patch was going.
 >>
 >> Yuri
 >
 > Here's the patch I got from (I forget who sent it to me!):
 >
 > --- hdac.c =A0 =A0 =A0(revision 230571)
 > +++ hdac.c =A0 =A0 =A0(working copy)
 > @@ -1921,6 +1921,8 @@
 > =A0 =A0 =A0 =A0ctl |=3D 1 << ss;
 > =A0 =A0 =A0 =A0HDAC_WRITE_4(&sc->mem, HDAC_INTCTL, ctl);
 >
 > + =A0 =A0 =A0 HDAC_WRITE_1(&sc->mem, off + HDAC_SDSTS,
 > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 HDAC_SDSTS_DESE | HDAC_SDSTS_FIFOE | HDAC_S=
 DSTS_BCIS);
 > =A0 =A0 =A0 =A0ctl =3D HDAC_READ_1(&sc->mem, off + HDAC_SDCTL0);
 > =A0 =A0 =A0 =A0ctl |=3D HDAC_SDCTL_IOCE | HDAC_SDCTL_FEIE | HDAC_SDCTL_DE=
 IE |
 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0HDAC_SDCTL_RUN;
 >
 >
 > --
 > Conrad J. Sabatier
 > conrads@cox.net
 > _______________________________________________
 > freebsd-multimedia@freebsd.org mailing list
 > http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
 > To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe@freebsd.=
 org"
 
 This patch has already been committed to 10-CURRENT and 9-STABLE :
 
 # svn log -r232798 sys/dev/sound/pci/hda/hdac.c
 ------------------------------------------------------------------------
 r232798 | mav | 2012-03-10 22:58:08 +0100 (sam 10 mar 2012) | 13 lignes
 
 MFC r230130, r230181, r230312, r230326, r230331, r230451, r230465, r230488,
 r230507, r230511, r230513, r230532, r230537, r230551, r230554, r230571,
 r230574, r230585, r230641, r230768, r230807, r231024:
 Sync snd_hda(4) driver with HEAD.
 
 This includes major code refactoring, HDMI support, new volume control,
 automatic recording source selection, runtime reconfigureation, support
 for more then 4 PCM devices on controller, multichannel recording,
 additional playback/record streams, higher bandwidths support, more
 informative device names and many other things.
 
 Sponsored by:   iXsystems, Inc.
 
 
 --=20
 Olivier Smedts=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 _
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
  =A0 ASCII ribbon campaign ( )
 e-mail: olivier@gid0.org=A0 =A0 =A0 =A0 - against HTML email & vCards=A0 X
 www: http://www.gid0.org=A0 =A0 - against proprietary attachments / \
 
 =A0 "Il y a seulement 10 sortes de gens dans le monde :
 =A0 ceux qui comprennent le binaire,
 =A0 et ceux qui ne le comprennent pas."

From: Zhang Weiwu <zhangweiwu@realss.com>
To: bug-followup@FreeBSD.org, rjohns%34%34@comcast.net
Cc:  
Subject: Re: kern/129604: [sound] Sound stops with error: pcm0:virtual:dsp0.vp0:
 play interrupt timeout, channel dead
Date: Sun, 15 Apr 2012 10:52:21 +0800 (CST)

 My problem have exactly the same behavior but with a very different sound 
 device.
 
 pcm0: chn_write(): pcm0:play:dsp0.p1: play interrupt timeout, channel dead
 
 The device is SiS 7018, using snd_t4dwave driver. I also tried to turn off 
 ACPI without luck. Perhaps my problem is related?
 
 Following is the playback output. Tried "dd if=/dev/random of=/dev/dsp" 
 too, getting same behavior. Do you think it helpful if I post more info 
 like dmesg and various hardware data?
 
 $ mpg123 Downloads/In\ The\ Shadow\ Of\ The\ Valley.mp3
 High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
          version 1.13.4; written and copyright by Michael Hipp and others
          free software (LGPL/GPL) without any warranty but with best wishes
 
 Directory: Downloads/
 Playing MPEG stream 1 of 1: In The Shadow Of The Valley.mp3 ...
 Title:   In The Shadow Of The Valley     Artist: American Music Club
 Comment: WWW.TOP100.CN                   Album:  San Francisco
 Year:    3/1/2003 12:00:00 AM            Genre:  Pop
 MPEG 1.0 layer III, 128 kbit/s, 44100 Hz stereo
 [audio.c:598] error: Error in writing audio (Invalid argument?)!
 [mpg123.c:651] error: Deep trouble! Cannot flush to my output anymore!
>Unformatted:
