Bug 24954

Summary: Old driver /src/sys/dev/sound/isa/sb.c should be removed in STABLE4?
Product: Base System Reporter: m_ilya <m_ilya>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-STABLE   
Hardware: Any   
OS: Any   

Description m_ilya 2001-02-08 17:20:02 UTC
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.

Fix: 

See Description.
How-To-Repeat: 
See Description.
Comment 1 Bruce A. Mah freebsd_committer freebsd_triage 2001-09-07 20:21:09 UTC
State Changed
From-To: open->closed

cg nuked this file from the RELENG_4 branch at Sat Feb 24 01:29:46 2001 UTC.