NetBSD Problem Report #6108

Received: (qmail 11599 invoked from network); 6 Sep 1998 02:09:52 -0000
Message-Id: <199809060217.WAA00650@650urple.>
Date: Sat, 5 Sep 1998 22:17:53 -0400 (EDT)
From: Ezra Story <ezy@panix.com>
Reply-To: ezy@panix.com
To: gnats-bugs@gnats.netbsd.org
Subject: wss audio not working (fix included)
X-Send-Pr-Version: 3.95

>Number:         6108
>Category:       kern
>Synopsis:       wss audio not working (fix included)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 05 19:20:01 +0000 1998
>Closed-Date:    Sun Sep 06 11:00:28 +0000 1998
>Last-Modified:  Sun Sep 06 11:01:10 +0000 1998
>Originator:     Ezra Story
>Release:        Sat Sep  5 22:09:26 EDT 1998
>Organization:
none
>Environment:
NetBSD/i386-current	
System: NetBSD purple 1.3H NetBSD 1.3H (PURPLE) #40: Sat Sep 5 21:39:55 EDT 1998 ezy@purple:/usr/src/netbsd/sys/arch/i386/compile/PURPLE i386


>Description:
audio_if struct in wss was initialized to point to a1848_{open|close}
not ad1848_isa_{open|close} like it should have been.
>How-To-Repeat:

>Fix:
patch follows (includes some updates the the debugging messages to include
"_isa_".)
--

Index: wss.c
===================================================================
RCS file: /usr/src/cvs/netbsd/sys/dev/isa/wss.c,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 wss.c
*** wss.c	1998/08/29 15:09:04	1.1.1.4
--- wss.c	1998/09/06 01:38:52
***************
*** 82,89 ****
   */

  struct audio_hw_if wss_hw_if = {
! 	ad1848_open,
! 	ad1848_close,
  	NULL,
  	ad1848_query_encoding,
  	ad1848_set_params,
--- 82,89 ----
   */

  struct audio_hw_if wss_hw_if = {
! 	ad1848_isa_open,
! 	ad1848_isa_close,
  	NULL,
  	ad1848_query_encoding,
  	ad1848_set_params,
Index: ad1848_isa.c
===================================================================
RCS file: /usr/src/cvs/netbsd/sys/dev/isa/ad1848_isa.c,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 ad1848_isa.c
*** ad1848_isa.c	1998/08/30 21:16:56	1.1.1.2
--- ad1848_isa.c	1998/09/06 02:04:55
***************
*** 401,407 ****
  {
  	struct ad1848_isa_softc *sc = addr;

! 	DPRINTF(("ad1848_open: sc=%p\n", sc));

  	sc->sc_lastcc = -1;
  	sc->sc_intr = 0;
--- 401,407 ----
  {
  	struct ad1848_isa_softc *sc = addr;

! 	DPRINTF(("ad1848_isa_open: sc=%p\n", sc));

  	sc->sc_lastcc = -1;
  	sc->sc_intr = 0;
***************
*** 446,452 ****
  	isc->sc_dma_cnt = cc;
  	isa_dmastart(isc->sc_ic, isc->sc_recdrq, buf, cc, NULL,
  		     isc->sc_dma_flags, BUS_DMA_NOWAIT);
! 	DPRINTF(("ad1848_dma_init_input: %p %d\n", buf, cc));
  	return 0;
  }

--- 446,452 ----
  	isc->sc_dma_cnt = cc;
  	isa_dmastart(isc->sc_ic, isc->sc_recdrq, buf, cc, NULL,
  		     isc->sc_dma_flags, BUS_DMA_NOWAIT);
! 	DPRINTF(("ad1848_isa_dma_init_input: %p %d\n", buf, cc));
  	return 0;
  }

***************
*** 472,478 ****

  #ifdef AUDIO_DEBUG
  	if (ad1848debug > 1)
! 		printf("ad1848_dma_input: cc=%d %p (%p)\n", cc, intr, arg);
  #endif
  	sc->sc_locked = 1;
  	isc->sc_intr = intr;
--- 472,478 ----

  #ifdef AUDIO_DEBUG
  	if (ad1848debug > 1)
! 		printf("ad1848_isa_dma_input: cc=%d %p (%p)\n", cc, intr, arg);
  #endif
  	sc->sc_locked = 1;
  	isc->sc_intr = intr;
***************
*** 535,541 ****
  	isc->sc_dma_cnt = cc;
  	isa_dmastart(isc->sc_ic, isc->sc_drq, buf, cc, NULL,
  		     isc->sc_dma_flags, BUS_DMA_NOWAIT);
! 	DPRINTF(("ad1848_dma_init_output: %p %d\n", buf, cc));
  	return 0;
  }

--- 535,541 ----
  	isc->sc_dma_cnt = cc;
  	isa_dmastart(isc->sc_ic, isc->sc_drq, buf, cc, NULL,
  		     isc->sc_dma_flags, BUS_DMA_NOWAIT);
! 	DPRINTF(("ad1848_isa_dma_init_output: %p %d\n", buf, cc));
  	return 0;
  }

***************
*** 558,564 ****

  #ifdef AUDIO_DEBUG
  	if (ad1848debug > 0)
! 		printf("ad1848_dma_output: cc=%d at %p 0x%p (0x%p)\n",
  		       cc, p, intr, arg);
  #endif
  	sc->sc_locked = 1;
--- 558,564 ----

  #ifdef AUDIO_DEBUG
  	if (ad1848debug > 0)
! 		printf("ad1848_isa_dma_output: cc=%d at %p 0x%p (0x%p)\n",
  		       cc, p, intr, arg);
  #endif
  	sc->sc_locked = 1;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pk 
State-Changed-When: Sun Sep 6 04:00:28 PDT 1998 
State-Changed-Why:  
Patches applied. 
>Unformatted:
 wss does not have the correct fptrs in the audio_if struct. 

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.