From fa6da0bf1fcd5c3d3055f4ea6d3a2eae6a4df47c Mon Sep 17 00:00:00 2001 From: isaki Date: Sat, 6 Feb 2021 07:16:18 +0000 Subject: Calling halt_{input,output} is done by the MI audio layer if necessary. --- sys/dev/isa/gus.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/isa/gus.c b/sys/dev/isa/gus.c index 2ea56229b3a..86f753b1e99 100644 --- a/sys/dev/isa/gus.c +++ b/sys/dev/isa/gus.c @@ -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 -__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 #include @@ -1359,14 +1359,10 @@ gusclose(void *addr) sc = addr; DPRINTF(("gus_close: sc=%p\n", sc)); + KASSERT((sc->sc_flags & (GUS_DMAOUT_ACTIVE | GUS_LOCKED)) == 0); + KASSERT((sc->sc_flags & GUS_DMAIN_ACTIVE) == 0); -/* 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); + sc->sc_flags &= ~GUS_OPEN; /* turn off speaker, etc. */ -- cgit