From owner-freebsd-multimedia@FreeBSD.ORG Wed Apr 19 03:27:57 2006 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD1D316A402 for ; Wed, 19 Apr 2006 03:27:57 +0000 (UTC) (envelope-from hartzell@alerce.com) Received: from merlin.alerce.com (w094.z064001164.sjc-ca.dsl.cnc.net [64.1.164.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EE3243D48 for ; Wed, 19 Apr 2006 03:27:57 +0000 (GMT) (envelope-from hartzell@alerce.com) Received: from merlin.alerce.com (localhost [127.0.0.1]) by merlin.alerce.com (Postfix) with ESMTP id 02C405643A for ; Tue, 18 Apr 2006 20:28:48 -0700 (PDT) Received: from satchel.alerce.com (w092.z064001164.sjc-ca.dsl.cnc.net [64.1.164.92]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "satchel.alerce.com", Issuer "alerce.com" (verified OK)) by merlin.alerce.com (Postfix) with ESMTP id D1D4456436 for ; Tue, 18 Apr 2006 20:28:48 -0700 (PDT) Received: from satchel.alerce.com (localhost [127.0.0.1]) by satchel.alerce.com (8.13.4/8.13.4) with ESMTP id k3J3STlo026211 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 Apr 2006 20:28:29 -0700 (PDT) (envelope-from hartzell@satchel.alerce.com) Received: (from hartzell@localhost) by satchel.alerce.com (8.13.4/8.13.4/Submit) id k3J3STNI026208; Tue, 18 Apr 2006 20:28:29 -0700 (PDT) (envelope-from hartzell) From: George Hartzell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17477.44637.316536.583639@satchel.alerce.com> Date: Tue, 18 Apr 2006 20:28:29 -0700 To: freebsd-multimedia@freebsd.org X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid X-Virus-Scanned: ClamAV using ClamSMTP Subject: Odd code in sound/pcm/channel.c, help with PR? X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hartzell@alerce.com List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 03:27:57 -0000 I'm trying to get some traction and get sound to work on my ASUS A8V-MX. I keep ending up with pcm0:play:0::dsp0.0: play interrupt timeout, channel dead on my console. I've filed a PR with more details: http://www.freebsd.org/cgi/query-pr.cgi?pr=95949 I've been looking around, trying to understand what might be going on. I came across the following piece of code in /usr/src/sys/device/sound/pcm/channel.com, around line 320 timeout = (hz * sndbuf_getblksz(bs)) / (sndbuf_getspd(bs) * sndbuf_getbps(bs)); if (timeout < 1) timeout = 1; timeout = 1; ret = chn_sleep(c, "pcmwr", timeout); if (ret == EWOULDBLOCK) { count -= timeout; ret = 0; } else if (ret == 0) count = hz; It's funny that it goes to the trouble to figure out a timeout value then seems to unconditionally set it to 1. Removing that line doesn't seem to fix my problem, but it still seems weird. And, while I've got your attention, can anyone suggest where I might look to understand why the buffer doesn't seem to be being emptied? Thanks, g.