From ilya@juil.domain  Thu Feb  8 09:18:17 2001
Return-Path: <ilya@juil.domain>
Received: from relay2.agava.net.ru (2.oivt.mipt.ru [193.125.142.2])
	by hub.freebsd.org (Postfix) with ESMTP id 27CAA37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  8 Feb 2001 09:18:16 -0800 (PST)
Received: from gw.office.agava.ru (2.oivt.mipt.ru [193.125.142.2])
	by relay2.agava.net.ru (Postfix) with ESMTP id D56364380E
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  8 Feb 2001 20:18:09 +0300 (MSK)
Received: from juil.domain (juil.domain [192.168.1.50])
	by gw.office.agava.ru (Postfix) with ESMTP id 85B185EA6
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  8 Feb 2001 20:18:09 +0300 (MSK)
Received: by juil.domain (Postfix, from userid 1001)
	id 0783724A; Thu,  8 Feb 2001 20:18:09 +0300 (MSK)
Message-Id: <20010208171809.0783724A@juil.domain>
Date: Thu,  8 Feb 2001 20:18:09 +0300 (MSK)
From: m_ilya@agava.com
Reply-To: m_ilya@agava.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Old driver /src/sys/dev/sound/isa/sb.c should be removed in STABLE4?
X-Send-Pr-Version: 3.2

>Number:         24954
>Category:       kern
>Synopsis:       Old driver /src/sys/dev/sound/isa/sb.c should be removed in STABLE4?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 08 09:20:02 PST 2001
>Closed-Date:    Fri Sep 7 12:21:09 PDT 2001
>Last-Modified:  Fri Sep 07 12:22:54 PDT 2001
>Originator:     Ilya Martynov
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
AGAVA Software
>Environment:

N/A

>Description:

I've tried to compile port audio/aureal-kmod. I've found that I can't load
produced kernel module. In log I can see message 'link_elf: symbol
chn_allocbuf undefined'. After greping sources of aureal-kmod and kernel I
found that the only place where 'chn_allocbuf' function is used is in
/src/sys/dev/sound/isa/sb.c. I've discovered that it seems to use some old
API that doesn't exists anymore. After comparing sources of other drivers
I've came up with following patch:

--- sb.c~	Thu Oct  5 09:07:49 2000
+++ sb.c	Thu Feb  8 19:55:48 2001
@@ -672,8 +672,8 @@
 	ch->parent = sb;
 	ch->channel = c;
 	ch->buffer = b;
-	ch->buffer->bufsize = DSP_BUFFSIZE;
-	if (chn_allocbuf(ch->buffer, sb->parent_dmat) == -1)
+
+	if (sndbuf_alloc(ch->buffer, sb->parent_dmat, DSP_BUFFSIZE) == -1)
 		return NULL;
 	dch = (dir == PCMDIR_PLAY)? 1 : 0;
 	if (sb->bd_flags & BD_F_SB16X)

But later I've looked in FreeBSD cvs and found that this file is actually
deleted from CURRENT becouse it is outdated. So I have suspicion that this
file should be just deleted from STABLE also instead patching.

>How-To-Repeat:

See Description.

>Fix:

See Description.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: bmah 
State-Changed-When: Fri Sep 7 12:21:09 PDT 2001 
State-Changed-Why:  
cg nuked this file from the RELENG_4 branch at Sat Feb 24 01:29:46 2001 UTC. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=24954 
>Unformatted:
