NetBSD Problem Report #15260

Received: (qmail 11577 invoked from network); 16 Jan 2002 00:57:52 -0000
Message-Id: <E16QeOg-00022b-00@mail.squirrel-net.co.uk>
Date: Wed, 16 Jan 2002 00:57:46 +0000
From: glenn@squirrel-net.co.uk
Reply-To: glenn@squirrel-net.co.uk
To: gnats-bugs@gnats.netbsd.org
Subject: emuxki change-request
X-Send-Pr-Version: 3.95

>Number:         15260
>Category:       port-i386
>Synopsis:       emuxki driver non-existent on NetBSD-1.5.x - patch included
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 16 00:58:00 +0000 2002
>Closed-Date:    Thu Jul 25 21:19:40 +0000 2002
>Last-Modified:  Thu Jul 25 21:19:40 +0000 2002
>Originator:     Glenn Richards
>Release:        NetBSD 1.5.1	<NetBSD-current source date>
>Organization:
Squirrel Solutions

>Environment:

NetBSD hannah 1.5.1 NetBSD 1.5.1 (HANNAH) #3: Wed Jan 16 00:24:44 GMT 2002     glenn@hannah:/usr/src/sys/arch/i386/compile/HANNAH i386

>Description:

emuxki driver (for Creative SB Live etc) is not present in 1.5.x (driver from netbsd-current).
>How-To-Repeat:

Not applicable
>Fix:

This patch will enable the driver from today's NetBSD-current (15 Jan 2002) to work under NetBSD 1.5.1.

--- emuxki.c.orig	Tue Jan 15 22:32:35 2002
+++ emuxki.c	Wed Jan 16 00:13:00 2002
@@ -38,7 +38,7 @@

 /*
  * Driver for Creative Labs SBLive! series and probably PCI512.
- * 
+ *
  * Known bugs:
  * - inversed stereo at ac97 codec level
  *   (XXX jdolecek - don't see the problem? maybe because auvia(4) has
@@ -210,7 +210,7 @@
 	emuxki_get_props,
 	emuxki_trigger_output,
 	emuxki_trigger_input,
-	NULL,			/* dev_ioctl */
+	// NULL,			/* dev_ioctl */
 };

 /*
@@ -269,7 +269,7 @@
 		return (NULL);
 	}

-	if (bus_dmamap_load(dmat, mem->map, mem->kaddr, 
+	if (bus_dmamap_load(dmat, mem->map, mem->kaddr,
 			    mem->size, NULL, bus_dma_flags)) {
 		bus_dmamap_destroy(dmat, mem->map);
 		bus_dmamem_unmap(dmat, mem->kaddr, mem->size);
@@ -381,7 +381,9 @@
 		pci_conf_read(pa->pa_pc, pa->pa_tag,
 		(PCI_COMMAND_STATUS_REG) | PCI_COMMAND_MASTER_ENABLE));

-	if (pci_intr_map(pa, &ih)) {
+	// if (pci_intr_map(pa, &ih))
+	if (pci_intr_map(pa->pa_pc, pa->pa_intrtag, pa->pa_intrpin,
+	    pa->pa_intrline, &ih))	{
 		printf("%s: couldn't map interrupt\n",
 			sc->sc_dev.dv_xname);
 		bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios);
@@ -1320,7 +1322,7 @@
 			fxsend.b.level = fxsend.d.level = 0xc0;
 			emuxki_channel_set_fxsend(voice->dataloc.chan[1],
 						   &fxsend);
-		} /* No else : default is good for mono */	
+		} /* No else : default is good for mono */
 	}
 	return (0);
 }
@@ -1373,7 +1375,7 @@
 	       (voice->use & EMU_VOICE_USE_PLAY) ? "play" : "record",
 	       stereo ? "stereo" : "mono", (b16 + 1) * 8, srate);
 #endif
-	
+
 	if (voice->stereo != stereo) {
 		if ((error = emuxki_voice_set_stereo(voice, stereo)))
 			return (error);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: he 
State-Changed-When: Sat Jan 19 14:04:02 PST 2002 
State-Changed-Why:  
Driver has been pulled up to the netbsd-1-5 branch. 
I have tested it with playback at 44.1kHz, and it seems to work fine. 
Thanks for the patch. 
I assume this fixes the problem for you as well? 
State-Changed-From-To: feedback->closed 
State-Changed-By: jdolecek 
State-Changed-When: Thu Jul 25 14:19:03 PDT 2002 
State-Changed-Why:  
Driver pulled up to 1.5 branch, and available in 1.5.3. 
Thanks for report. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.