Date: Mon, 18 Aug 1997 11:05:37 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: hackers@freebsd.org Subject: isa_dmastop... (fwd) Message-ID: <199708180135.LAA08486@genesis.atrad.adelaide.edu.au>
next in thread | raw e-mail | index | archive | help
Ok, to avoid any further agony about ISA DMA, here's a request I've had just recently from Luigi. This looks OK to me, but again it contains the sanity checking that Amancio was unhappy about; folks, how do you feel? ----- Forwarded message from Luigi Rizzo ----- >From luigi@labinfo.iet.unipi.it Sat Aug 9 23:27:10 1997 From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> Message-Id: <199708091246.OAA01564@labinfo.iet.unipi.it> Subject: isa_dmastop... To: msmith@gsoft.com.au Date: Sat, 9 Aug 1997 14:46:19 +0200 (MET DST) X-Mailer: ELM [version 2.4 PL23] Content-Type: text For the sound driver to implement pause/abort, the following function is useful (one can do things without it if tolerates some "channel busy" messages from the kernel...) If you like it, can you commit to isa.c ? Thanks Luigi /* * this stops the dma channel and returns the residual count * derived calling isa_dmastatus */ int isa_dmastop(int chan) { if (dma_inuse & (1 << chan) == 0) printf("isa_dmastop: channel %d not acquired\n", chan); if (dma_busy & (1 << chan) == 0) printf("isa_dmastop: channel %d not acquired\n", chan); if ((chan & 4) == 0) outb(DMA1_SMSK, (chan & 3) | 4 /* disable mask */); else outb(DMA2_SMSK, (chan & 3) | 4 /* disable mask */); return isa_dmastatus(chan); } ----- End of forwarded message from Luigi Rizzo ----- -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708180135.LAA08486>