Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/isa Calling halt_{input,output} is done by the MI au...



details:   https://anonhg.NetBSD.org/src/rev/df9bf6e062a3
branches:  trunk
changeset: 951552:df9bf6e062a3
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Feb 06 07:16:18 2021 +0000

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

diffstat:

 sys/arch/arm/xscale/pxa2x0_ac97.c |   4 +---
 sys/arch/macppc/dev/awacs.c       |  24 ++++--------------------
 sys/dev/isa/gus.c                 |  16 ++++++----------
 3 files changed, 11 insertions(+), 33 deletions(-)

diffs (128 lines):

diff -r a6baa5f1a347 -r df9bf6e062a3 sys/arch/arm/xscale/pxa2x0_ac97.c
--- a/sys/arch/arm/xscale/pxa2x0_ac97.c Sat Feb 06 06:58:59 2021 +0000
+++ b/sys/arch/arm/xscale/pxa2x0_ac97.c Sat Feb 06 07:16:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pxa2x0_ac97.c,v 1.18 2020/04/19 08:18:19 isaki Exp $   */
+/*     $NetBSD: pxa2x0_ac97.c,v 1.19 2021/02/06 07:16:54 isaki Exp $   */
 
 /*
  * Copyright (c) 2003, 2005 Wasabi Systems, Inc.
@@ -545,8 +545,6 @@
        /*
         * Make sure the hardware is quiescent
         */
-       acu_halt_output(sc);
-       acu_halt_input(sc);
        delay(100);
 
        /* Assert Cold Reset */
diff -r a6baa5f1a347 -r df9bf6e062a3 sys/arch/macppc/dev/awacs.c
--- a/sys/arch/macppc/dev/awacs.c       Sat Feb 06 06:58:59 2021 +0000
+++ b/sys/arch/macppc/dev/awacs.c       Sat Feb 06 07:16:18 2021 +0000
@@ -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 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 @@
     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 @@
        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 @@
        sc = h;
        dbdma_stop(sc->sc_odma);
        dbdma_reset(sc->sc_odma);
+       sc->sc_ointr = NULL;
        return 0;
 }
 
@@ -689,6 +672,7 @@
        sc = h;
        dbdma_stop(sc->sc_idma);
        dbdma_reset(sc->sc_idma);
+       sc->sc_iintr = NULL;
        return 0;
 }
 
diff -r a6baa5f1a347 -r df9bf6e062a3 sys/dev/isa/gus.c
--- a/sys/dev/isa/gus.c Sat Feb 06 06:58:59 2021 +0000
+++ b/sys/dev/isa/gus.c Sat Feb 06 07:16:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gus.c,v 1.118 2020/02/29 05:51:11 isaki Exp $  */
+/*     $NetBSD: gus.c,v 1.119 2021/02/06 07:16:18 isaki Exp $  */
 
 /*-
  * Copyright (c) 1996, 1999, 2008 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.118 2020/02/29 05:51:11 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.119 2021/02/06 07:16:18 isaki Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1359,14 +1359,10 @@
        sc = addr;
        DPRINTF(("gus_close: sc=%p\n", sc));
 
-
-/*     if (sc->sc_flags & GUS_DMAOUT_ACTIVE) */ {
-               gus_halt_out_dma(sc);
-       }
-/*     if (sc->sc_flags & GUS_DMAIN_ACTIVE) */ {
-               gus_halt_in_dma(sc);
-       }
-       sc->sc_flags &= ~(GUS_OPEN|GUS_LOCKED|GUS_DMAOUT_ACTIVE|GUS_DMAIN_ACTIVE);
+       KASSERT((sc->sc_flags & (GUS_DMAOUT_ACTIVE | GUS_LOCKED)) == 0);
+       KASSERT((sc->sc_flags & GUS_DMAIN_ACTIVE) == 0);
+
+       sc->sc_flags &= ~GUS_OPEN;
 
        /* turn off speaker, etc. */
 



Home | Main Index | Thread Index | Old Index