diff options
author | marius <marius@FreeBSD.org> | 2005-06-10 21:33:14 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2005-06-10 21:33:14 +0000 |
commit | 6e152da64058118385a7a5a4c3ea1b8cc9c97c3d (patch) | |
tree | 8402a94d63220ff3dfa07f30a572a06b3232d770 | |
parent | 105387b318e82139dfe4e2f4a5e7add925f16df0 (diff) | |
download | FreeBSD-src-6e152da64058118385a7a5a4c3ea1b8cc9c97c3d.zip FreeBSD-src-6e152da64058118385a7a5a4c3ea1b8cc9c97c3d.tar.gz |
Wrap the calls to the ISA DMA specific sndbuf_dma*() functions of
sys/dev/sound/isa/sndbuf_dma.c (compilation depending on device isa)
in #ifdef DEV_ISA so sound(4) can be compiled without isa(4).
MFC after: 1 month
-rw-r--r-- | sys/dev/sound/pcm/channel.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 2948e41..b43680c 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -25,6 +25,8 @@ * SUCH DAMAGE. */ +#include "opt_isa.h" + #include <dev/sound/pcm/sound.h> #include "feeder_if.h" @@ -864,14 +866,18 @@ chn_kill(struct pcm_channel *c) int chn_setdir(struct pcm_channel *c, int dir) { +#ifdef DEV_ISA struct snd_dbuf *b = c->bufhard; +#endif int r; CHN_LOCKASSERT(c); c->direction = dir; r = CHANNEL_SETDIR(c->methods, c->devinfo, c->direction); +#ifdef DEV_ISA if (!r && SND_DMA(b)) sndbuf_dmasetdir(b, c->direction); +#endif return r; } @@ -1119,12 +1125,16 @@ out: int chn_trigger(struct pcm_channel *c, int go) { +#ifdef DEV_ISA struct snd_dbuf *b = c->bufhard; +#endif int ret; CHN_LOCKASSERT(c); +#ifdef DEV_ISA if (SND_DMA(b) && (go == PCMTRIG_EMLDMAWR || go == PCMTRIG_EMLDMARD)) sndbuf_dmabounce(b); +#endif ret = CHANNEL_TRIGGER(c->methods, c->devinfo, go); return ret; |