diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-10-02 00:26:25 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-10-02 00:26:25 +0000 |
commit | 63ed6fbc12a1dcab2b150efc0f2a122a1bedecc2 (patch) | |
tree | 5122358d80361a09a7f0560d519c8b1397954533 /sys/arch/sparc64/dev/ce4231.c | |
parent | 22c1454340d51f204870c35335e5bd2e61c9b655 (diff) |
fix dma problems... now blaring Berlin's The Metro around the house from U30.
(like cs4231, this driver only supports playback... capture will have to
wait until post 3.0).
Diffstat (limited to 'sys/arch/sparc64/dev/ce4231.c')
-rw-r--r-- | sys/arch/sparc64/dev/ce4231.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/ce4231.c b/sys/arch/sparc64/dev/ce4231.c index 1ad2dfd3d4f..bbb242de9b2 100644 --- a/sys/arch/sparc64/dev/ce4231.c +++ b/sys/arch/sparc64/dev/ce4231.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ce4231.c,v 1.1 2001/10/01 18:10:32 jason Exp $ */ +/* $OpenBSD: ce4231.c,v 1.2 2001/10/02 00:26:24 jason Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -1334,7 +1334,7 @@ ce4231_pintr(v) nextaddr = (u_int32_t)p->dmamap->dm_segs[0].ds_addr; sc->sc_playcnt = togo = sc->sc_blksz; } else { - nextaddr = P_READ(sc, EBDMA_DADDR) + sc->sc_blksz; + nextaddr = sc->sc_lastaddr; if (togo > sc->sc_blksz) togo = sc->sc_blksz; sc->sc_playcnt += togo; @@ -1342,6 +1342,7 @@ ce4231_pintr(v) P_WRITE(sc, EBDMA_DCNT, togo); P_WRITE(sc, EBDMA_DADDR, nextaddr); + sc->sc_lastaddr = nextaddr + togo; if (sc->sc_pintr != NULL) (*sc->sc_pintr)(sc->sc_parg); @@ -1490,6 +1491,7 @@ ce4231_trigger_output(addr, start, end, blksize, intr, arg, param) ce4231_write(sc, SP_INTERFACE_CONFIG, ce4231_read(sc, SP_INTERFACE_CONFIG) | PLAYBACK_ENABLE); } + sc->sc_lastaddr = p->dmamap->dm_segs[0].ds_addr + n; return (0); } |