From hselasky@c2i.net  Fri May 13 12:50:08 2005
Return-Path: <hselasky@c2i.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9A2E316A4D1
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 13 May 2005 12:50:08 +0000 (GMT)
Received: from swip.net (mailfe02.swip.net [212.247.154.33])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 91A5D43D76
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 13 May 2005 12:50:07 +0000 (GMT)
	(envelope-from hselasky@c2i.net)
Received: from mp-217-199-190.daxnet.no ([193.217.199.190] verified)
  by mailfe02.swip.net (CommuniGate Pro SMTP 4.3c5)
  with ESMTP id 365507001 for FreeBSD-gnats-submit@freebsd.org; Fri, 13 May 2005 14:50:06 +0200
Message-Id: <200505131450.52312.hselasky@c2i.net>
Date: Fri, 13 May 2005 14:50:51 +0200
From: Hans Petter Selasky <hselasky@c2i.net>
Reply-To: hselasky@c2i.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: panic with the vibra16x when trying to record

>Number:         80977
>Category:       kern
>Synopsis:       [patch] [sound] panic with the vibra16x when trying to record
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 13 13:00:12 GMT 2005
>Closed-Date:    Sun Sep 11 09:05:18 GMT 2005
>Last-Modified:  Sun Sep 11 09:05:18 GMT 2005
>Originator:     HPS
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD 6.0-CURRENT FreeBSD 6.0-CURRENT #45: Mon Mar 21 15:40:17 CET 
2005 root@:/usr/obj/usr/src/sys/custom i386

>Description:
panic with the vibra16x when trying to record

>How-To-Repeat:

>Fix:

*** sys/dev/sound/isa/sb16.c.ref        Wed Oct 20 22:10:18 2004
--- sys/dev/sound/isa/sb16.c    Mon Nov 22 17:56:05 2004
***************
*** 478,484 ****
  sb_intr(void *arg)
  {
        struct sb_info *sb = (struct sb_info *)arg;
!       int reason = 3, c;
  
        /*
         * The Vibra16X has separate flags for 8 and 16 bit transfers, but
--- 478,484 ----
  sb_intr(void *arg)
  {
        struct sb_info *sb = (struct sb_info *)arg;
!       int reason, c;
  
        /*
         * The Vibra16X has separate flags for 8 and 16 bit transfers, but
***************
*** 554,561 ****
        sb_reset_dsp(sb);
  
        if (sb->bd_flags & BD_F_SB16X) {
                pprio = sb->pch.run? 1 : 0;
!               sndbuf_dmasetup(sb->pch.buffer, pprio? sb->drq1 : NULL);
                sb->pch.dch = pprio? 1 : 0;
                sndbuf_dmasetup(sb->rch.buffer, pprio? sb->drq2 : sb->drq1);
                sb->rch.dch = pprio? 2 : 1;
--- 554,562 ----
        sb_reset_dsp(sb);
  
        if (sb->bd_flags & BD_F_SB16X) {
+               /* full-duplex doesn't work! */
                pprio = sb->pch.run? 1 : 0;
!               sndbuf_dmasetup(sb->pch.buffer, pprio? sb->drq1 : sb->drq2);
                sb->pch.dch = pprio? 1 : 0;
                sndbuf_dmasetup(sb->rch.buffer, pprio? sb->drq2 : sb->drq1);
                sb->rch.dch = pprio? 2 : 1;


The vibra16X supports full duplex. I traced the Windows driver, and what is 
does is that it programs one DMA channel 8-bit, and the other 16-bit. There 
might be some kind of auto detection logic here, because it always uses 8-bit 
for playback, even if I play 16-bit sound ...
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sound 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri May 13 19:45:31 GMT 2005 
Responsible-Changed-Why:  
Reassign to appropriate mailing list. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=80977 
State-Changed-From-To: open->closed 
State-Changed-By: netchild 
State-Changed-When: Sun Sep 11 09:04:56 GMT 2005 
State-Changed-Why:  
Committed, thanks. 

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