Module Name:    src
Committed By:   isaki
Date:           Sat Feb  6 07:20:36 UTC 2021

Modified Files:
        src/sys/arch/macppc/dev: awacs.c

Log Message:
Calling halt_{input,output} is done by the MI audio layer if necessary.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/macppc/dev/awacs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/macppc/dev/awacs.c
diff -u src/sys/arch/macppc/dev/awacs.c:1.49 src/sys/arch/macppc/dev/awacs.c:1.50
--- src/sys/arch/macppc/dev/awacs.c:1.49	Tue Jan 26 14:49:41 2021
+++ src/sys/arch/macppc/dev/awacs.c	Sat Feb  6 07:20:36 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: awacs.c,v 1.49 2021/01/26 14:49:41 thorpej Exp $	*/
+/*	$NetBSD: awacs.c,v 1.50 2021/02/06 07:20:36 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.49 2021/01/26 14:49:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.50 2021/02/06 07:20:36 isaki Exp $");
 
 #include <sys/param.h>
 #include <sys/audioio.h>
@@ -110,7 +110,6 @@ static void awacs_attach(device_t, devic
 static int awacs_intr(void *);
 static int awacs_status_intr(void *);
 
-static void awacs_close(void *);
 static int awacs_query_format(void *, audio_format_query_t *);
 static int awacs_set_format(void *, int,
 		     const audio_params_t *, const audio_params_t *,
@@ -154,7 +153,6 @@ CFATTACH_DECL_NEW(awacs, sizeof(struct a
     awacs_match, awacs_attach, NULL, NULL);
 
 const struct audio_hw_if awacs_hw_if = {
-	.close			= awacs_close,
 	.query_format		= awacs_query_format,
 	.set_format		= awacs_set_format,
 	.round_blocksize	= awacs_round_blocksize,
@@ -620,22 +618,6 @@ awacs_intr(void *v)
 	return 1;
 }
 
-/*
- * Close function is called at splaudio().
- */
-static void
-awacs_close(void *h)
-{
-	struct awacs_softc *sc;
-
-	sc = h;
-	awacs_halt_output(sc);
-	awacs_halt_input(sc);
-
-	sc->sc_ointr = 0;
-	sc->sc_iintr = 0;
-}
-
 static int
 awacs_query_format(void *h, audio_format_query_t *afp)
 {
@@ -678,6 +660,7 @@ awacs_halt_output(void *h)
 	sc = h;
 	dbdma_stop(sc->sc_odma);
 	dbdma_reset(sc->sc_odma);
+	sc->sc_ointr = NULL;
 	return 0;
 }
 
@@ -689,6 +672,7 @@ awacs_halt_input(void *h)
 	sc = h;
 	dbdma_stop(sc->sc_idma);
 	dbdma_reset(sc->sc_idma);
+	sc->sc_iintr = NULL;
 	return 0;
 }
 

Reply via email to