From owner-freebsd-multimedia Thu Mar 20 20:58:27 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id UAA25794 for multimedia-outgoing; Thu, 20 Mar 1997 20:58:27 -0800 (PST) Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA25788 for ; Thu, 20 Mar 1997 20:58:22 -0800 (PST) Received: from localhost.transsys.com (localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.8.5/8.7.3) with SMTP id XAA00760; Thu, 20 Mar 1997 23:58:07 -0500 (EST) Message-Id: <199703210458.XAA00760@whizzo.transsys.com> X-Mailer: exmh version 2.0gamma 1/27/96 To: Steve Passe cc: multimedia@freebsd.org From: "Louis A. Mamakos" Subject: Re: Where do I get the Win/TV code? References: <199703210231.TAA12679@Ilsa.StevesCafe.com> In-reply-to: Your message of "Thu, 20 Mar 1997 19:31:15 MST." <199703210231.TAA12679@Ilsa.StevesCafe.com> Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_2276042640" Date: Thu, 20 Mar 1997 23:58:07 -0500 Sender: owner-multimedia@freebsd.org X-Loop: FreeBSD.org Precedence: bulk This is a multipart MIME message. --==_Exmh_2276042640 Content-Type: text/plain; charset=us-ascii I built a new kernel with this version of the Bt848 driver code, and interestingly enough, got the mysterious system hang once. Further, I also bot the mysterious 60 interrupts per second on the shared IRQ used by the Hauppauge board. The good news is that the audio on my WinCast/TV dbx board is working great! I added this code to the interrupt service function, which seems to have improved things. This was in my local version of the driver, and I guess didn't get submitted. The interesting thing is that it appears that under some circumstances, interrupts can get unmasked depending on what the current state of affairs is, regardless of any process having the device open or not. I'm not quite certain about the return inside the if statement or not; perhaps someone could sanity check that for me. louie --==_Exmh_2276042640 Content-Type: application/octet-stream ; name="diff" Content-Description: diff Content-Disposition: attachment; filename="diff" --- brooktree848.c.orig Thu Mar 20 20:48:16 1997 +++ brooktree848.c Thu Mar 20 23:18:40 1997 @@ -364,11 +364,22 @@ s_status = *bt_reg; *bt_reg = 0; + /* + * check to see if any interrupts are unmasked on this device. If + * none are, then we likely got here by way of being on a PCI shared + * interrupt dispatch list. + */ + btl_reg = (u_long *) &bt848[BKTR_INT_MASK]; + if (*btl_reg == 0) + return; /* bail out now, before we do something we + shouldn't */ + if (!(bktr->flags & METEOR_OPEN)) { bts_reg = (u_short *) &bt848[BKTR_GPIO_DMA_CTL]; *bts_reg = 0; btl_reg = (u_long *) &bt848[BKTR_INT_MASK]; *btl_reg = 0; + return; /* no reason to continue, right? */ } btl_reg = (u_long *) &bt848[BKTR_INT_STAT]; --==_Exmh_2276042640--