diff options
author | smpatel <smpatel@FreeBSD.org> | 1996-04-08 19:42:07 +0000 |
---|---|---|
committer | smpatel <smpatel@FreeBSD.org> | 1996-04-08 19:42:07 +0000 |
commit | 2511d4975112176f41cb11a9fd36866978e2a213 (patch) | |
tree | 5023936739d0d7851d1fedc4d63bec06b4d8d271 /sys/i386 | |
parent | 9739208301bc36d96e6ef8313564ffab2b3f9672 (diff) | |
download | FreeBSD-src-2511d4975112176f41cb11a9fd36866978e2a213.zip FreeBSD-src-2511d4975112176f41cb11a9fd36866978e2a213.tar.gz |
Added isa_dmadone() to fix the errors the sound driver has been complaining
about.
Update driver to use isa_dma_acquire() and isa_dma_release()
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/isa/sound/dmabuf.c | 19 | ||||
-rw-r--r-- | sys/i386/isa/sound/os.h | 4 |
2 files changed, 13 insertions, 10 deletions
diff --git a/sys/i386/isa/sound/dmabuf.c b/sys/i386/isa/sound/dmabuf.c index 6bd1d5b..b0a6d1f 100644 --- a/sys/i386/isa/sound/dmabuf.c +++ b/sys/i386/isa/sound/dmabuf.c @@ -832,6 +832,10 @@ DMAbuf_outputintr (int dev, int event_type) dmap->qhead = (dmap->qhead + 1) % dmap->nbufs; dmap->flags &= ~DMA_ACTIVE; +#ifdef __FreeBSD__ + isa_dmadone(0, 0, 0, audio_devs[dev]->dmachan); +#endif + if (dmap->qlen) { audio_devs[dev]->output_block (dev, dmap->buf_phys[dmap->qhead], @@ -872,6 +876,10 @@ DMAbuf_inputintr (int dev) #if defined(SVR42) snd_dma_intr (audio_devs[dev]->dmachan); #endif /* SVR42 */ + +#ifdef __FreeBSD__ + isa_dmadone(0, 0, 0, audio_devs[dev]->dmachan); +#endif if (dmap->qlen == (dmap->nbufs - 1)) { @@ -920,7 +928,10 @@ DMAbuf_open_dma (int dev) if (ALLOC_DMA_CHN (chan, audio_devs[dev]->name)) { +#if 0 + /* Enough already! This error is reported twice elsewhere */ printk ("Unable to grab DMA%d for the audio driver\n", chan); +#endif return RET_ERROR (EBUSY); } @@ -946,14 +957,6 @@ DMAbuf_close_dma (int dev) void DMAbuf_reset_dma (int dev) { - int chan = audio_devs[dev]->dmachan; - -#if 0 - disable_dma (chan); -#endif -#ifdef __FreeBSD__ - isa_dmadone_nobounce(chan); -#endif } #ifdef ALLOW_SELECT diff --git a/sys/i386/isa/sound/os.h b/sys/i386/isa/sound/os.h index 024ac12..1589ca8 100644 --- a/sys/i386/isa/sound/os.h +++ b/sys/i386/isa/sound/os.h @@ -307,8 +307,8 @@ extern unsigned long get_time(void); * The rest of this file is not complete yet. The functions using these * macros will not work */ -#define ALLOC_DMA_CHN(chn,deviceID) ({0; } ) -#define RELEASE_DMA_CHN(chn) ({ 0; }) +#define ALLOC_DMA_CHN(chn,deviceID) (isa_dma_acquire(chn)) +#define RELEASE_DMA_CHN(chn) (isa_dma_release(chn)) #define DMA_MODE_READ 0 #define DMA_MODE_WRITE 1 #define RELEASE_IRQ(irq_no) |