From nobody@FreeBSD.org  Fri Jan 11 20:05:03 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 7CACD76
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jan 2013 20:05:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 63B37E1B
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jan 2013 20:05:03 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r0BK529R027865
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jan 2013 20:05:02 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r0BK527e027864;
	Fri, 11 Jan 2013 20:05:02 GMT
	(envelope-from nobody)
Message-Id: <201301112005.r0BK527e027864@red.freebsd.org>
Date: Fri, 11 Jan 2013 20:05:02 GMT
From: Stephan Schindel <sts@tp1.rub.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: sound stopping: play interrupt timeout, channel dead
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         175220
>Category:       kern
>Synopsis:       [sound] sound stopping: 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:   Fri Jan 11 20:10:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Mon Jan 14 22:10:00 UTC 2013
>Originator:     Stephan Schindel
>Release:        9.1
>Organization:
>Environment:
FreeBSD freebsd 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
In 9.1 there is an issue with the snd_hda driver. My sound card is an onboard chip:

hdac0: <NVIDIA MCP61 HDA Controller> mem 0xfce78000-0xfce7bfff irq 23 at device 5.0 on pci0
hdac1: <NVIDIA GT108 HDA Controller> mem 0xfcf7c000-0xfcf7ffff irq 17 at device 0.1 on pci2

Sometimes (today for example it happened the second time) the sound crashes and I have to reboot my machine to get sound back. I found this in the logs:

pcm0: chn_write(): pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead

I cannot reproduce it, it happens during watching Youtube, playing Minecraft, VLC,...

This bug is pretty annoying, because I have to reboot the machine, every single time :) I had not have this problem with 9.0 and it is a fresh install.
>How-To-Repeat:

>Fix:
Reboot the machine.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-multimedia 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Jan 12 08:03:05 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer(s). 

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

From: Stephan Schindel <sts@tp1.rub.de>
To: bug-followup@FreeBSD.org, sts@tp1.rub.de, mav@FreeBSD.org
Cc:  
Subject: Re: kern/175220: [sound] sound stopping: play interrupt timeout,
 channel dead
Date: Sun, 13 Jan 2013 13:58:45 +0100

 Here are some additional informations, maybe this is useful:
 
 
 
 # cat /dev/sndstat
 FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
 Installed devices:
 pcm0: <VIA VT1708S_4 (Analog 2.0+HP/2.0)> (play/rec) default
 pcm1: <VIA VT1708S_4 (Rear-panel Digital)> (play)
 pcm2: <NVIDIA (0x0014) (HDMI/DP 8ch)> (play)
 pcm3: <NVIDIA (0x0014) (HDMI/DP 8ch)> (play)
 pcm4: <NVIDIA (0x0014) (HDMI/DP 8ch)> (play)
 pcm5: <NVIDIA (0x0014) (HDMI/DP 8ch)> (play)
 
 
 
 # mixer
 Mixer vol      is currently set to   0:0
 Mixer pcm      is currently set to 100:100
 Mixer line     is currently set to  58:58
 Mixer mic      is currently set to  65:65
 Mixer cd       is currently set to  58:58
 Mixer rec      is currently set to  35:35
 Mixer igain    is currently set to   0:0
 Mixer ogain    is currently set to 100:100
 Mixer monitor  is currently set to  65:65
 Recording source: cd
 
 
 
 # sysctl hw.snd
 hw.snd.vpc_reset: 0
 hw.snd.vpc_0db: 45
 hw.snd.vpc_autoreset: 1
 hw.snd.latency_profile: 1
 hw.snd.latency: 5
 hw.snd.report_soft_matrix: 1
 hw.snd.report_soft_formats: 1
 hw.snd.compat_linux_mmap: 0
 hw.snd.feeder_eq_exact_rate: 0
 hw.snd.feeder_eq_presets:
 PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
 hw.snd.feeder_rate_quality: 1
 hw.snd.feeder_rate_round: 25
 hw.snd.feeder_rate_max: 2016000
 hw.snd.feeder_rate_min: 1
 hw.snd.feeder_rate_polyphase_max: 183040
 hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
 hw.snd.vpc_mixer_bypass: 1
 hw.snd.verbose: 0
 hw.snd.maxautovchans: 16
 hw.snd.default_unit: 0
 hw.snd.version: 2009061500/amd64
 hw.snd.default_auto: 1
 
 
 
 # sysctl dev.pcm
 dev.pcm.0.%desc: VIA VT1708S_4 (Analog 2.0+HP/2.0)
 dev.pcm.0.%driver: pcm
 dev.pcm.0.%location: nid=28,29,26,31,30,27
 dev.pcm.0.%parent: hdaa0
 dev.pcm.0.play.vchans: 2
 dev.pcm.0.play.vchanmode: fixed
 dev.pcm.0.play.vchanrate: 48000
 dev.pcm.0.play.vchanformat: s16le:2.0
 dev.pcm.0.play.32bit: 24
 dev.pcm.0.rec.vchans: 3
 dev.pcm.0.rec.vchanmode: fixed
 dev.pcm.0.rec.vchanrate: 48000
 dev.pcm.0.rec.vchanformat: s16le:2.0
 dev.pcm.0.rec.32bit: 24
 dev.pcm.0.rec.autosrc: 2
 dev.pcm.0.buffersize: 65536
 dev.pcm.0.bitperfect: 0
 dev.pcm.1.%desc: VIA VT1708S_4 (Rear-panel Digital)
 dev.pcm.1.%driver: pcm
 dev.pcm.1.%location: nid=32
 dev.pcm.1.%parent: hdaa0
 dev.pcm.1.play.vchans: 2
 dev.pcm.1.play.vchanmode: passthrough
 dev.pcm.1.play.vchanrate: 48000
 dev.pcm.1.play.vchanformat: s16le:2.0
 dev.pcm.1.play.32bit: 24
 dev.pcm.1.buffersize: 65536
 dev.pcm.1.bitperfect: 0
 dev.pcm.2.%desc: NVIDIA (0x0014) (HDMI/DP 8ch)
 dev.pcm.2.%driver: pcm
 dev.pcm.2.%location: nid=5
 dev.pcm.2.%parent: hdaa1
 dev.pcm.2.play.vchans: 2
 dev.pcm.2.play.vchanmode: passthrough
 dev.pcm.2.play.vchanrate: 48000
 dev.pcm.2.play.vchanformat: s16le:2.0
 dev.pcm.2.play.32bit: 24
 dev.pcm.2.buffersize: 65536
 dev.pcm.2.bitperfect: 0
 dev.pcm.3.%desc: NVIDIA (0x0014) (HDMI/DP 8ch)
 dev.pcm.3.%driver: pcm
 dev.pcm.3.%location: nid=5
 dev.pcm.3.%parent: hdaa2
 dev.pcm.3.play.vchans: 2
 dev.pcm.3.play.vchanmode: passthrough
 dev.pcm.3.play.vchanrate: 48000
 dev.pcm.3.play.vchanformat: s16le:2.0
 dev.pcm.3.play.32bit: 24
 dev.pcm.3.buffersize: 65536
 dev.pcm.3.bitperfect: 0
 dev.pcm.4.%desc: NVIDIA (0x0014) (HDMI/DP 8ch)
 dev.pcm.4.%driver: pcm
 dev.pcm.4.%location: nid=5
 dev.pcm.4.%parent: hdaa3
 dev.pcm.4.play.vchans: 2
 dev.pcm.4.play.vchanmode: passthrough
 dev.pcm.4.play.vchanrate: 48000
 dev.pcm.4.play.vchanformat: s16le:2.0
 dev.pcm.4.play.32bit: 24
 dev.pcm.4.buffersize: 65536
 dev.pcm.4.bitperfect: 0
 dev.pcm.5.%desc: NVIDIA (0x0014) (HDMI/DP 8ch)
 dev.pcm.5.%driver: pcm
 dev.pcm.5.%location: nid=5
 dev.pcm.5.%parent: hdaa4
 dev.pcm.5.play.vchans: 2
 dev.pcm.5.play.vchanmode: passthrough
 dev.pcm.5.play.vchanrate: 48000
 dev.pcm.5.play.vchanformat: s16le:2.0
 dev.pcm.5.play.32bit: 24
 dev.pcm.5.buffersize: 65536
 dev.pcm.5.bitperfect: 0
 
 
 
 # dmesg | grep 'pcm[0-9]'
 pcm0: <VIA VT1708S_4 (Analog 2.0+HP/2.0)> at nid 28,29 and 26,31,30,27
 on hdaa0
 pcm1: <VIA VT1708S_4 (Rear-panel Digital)> at nid 32 on hdaa0
 pcm2: <NVIDIA (0x0014) (HDMI/DP 8ch)> at nid 5 on hdaa1
 pcm3: <NVIDIA (0x0014) (HDMI/DP 8ch)> at nid 5 on hdaa2
 pcm4: <NVIDIA (0x0014) (HDMI/DP 8ch)> at nid 5 on hdaa3
 pcm5: <NVIDIA (0x0014) (HDMI/DP 8ch)> at nid 5 on hdaa4
 pcm0: chn_write(): pcm0:virtual:dsp0.vp0: play interrupt timeout,
 channel dead

From: Stephan Schindel <sts@tp1.rub.de>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/175220: [sound] sound stopping: play interrupt timeout,
 channel dead
Date: Mon, 14 Jan 2013 23:01:09 +0100

 OK I think I've got it. At this time I am not sure which of these two
 settings has fixed the issue, but I've changed the following:
 
 # /boot/device.hints
 hint.hdac.0.msi="0"
 
 # /etc/sysctl.conf
 dev.hdac.0.polling=1
 
 So far so good, no driver crashing until now =). I will do further
 testing to find out which of these did the trick :).
>Unformatted:
