From f949939a181d3eef16ecccfe9b01d4c0b4e27402 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 8 Jun 2003 00:41:11 +0000 Subject: Do not hardcode the dma channel to 1, use the softc settings instead. mickey@ ok --- sys/dev/isa/ad1848.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/isa/ad1848.c b/sys/dev/isa/ad1848.c index 0adb6cd76d2..db11e21acca 100644 --- a/sys/dev/isa/ad1848.c +++ b/sys/dev/isa/ad1848.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ad1848.c,v 1.28 2003/04/27 11:22:53 ho Exp $ */ +/* $OpenBSD: ad1848.c,v 1.29 2003/06/08 00:41:10 miod Exp $ */ /* $NetBSD: ad1848.c,v 1.45 1998/01/30 02:02:38 augustss Exp $ */ /* @@ -1648,8 +1648,14 @@ ad1848_malloc(addr, direction, size, pool, flags) int flags; { struct ad1848_softc *sc = addr; + int drq; - return isa_malloc(sc->sc_isa, 1, size, pool, flags); + if (sc->sc_mode == AUMODE_RECORD) + drq = sc->sc_recdrq == -1 ? sc->sc_drq : sc->sc_recdrq; + else + drq = sc->sc_drq; + + return isa_malloc(sc->sc_isa, drq, size, pool, flags); } void -- cgit v1.2.3