From: Ben Gras Date: Tue, 31 Mar 2009 14:23:33 +0000 (+0000) Subject: change DmaMode checks from DEV_WRITE to DEV_WRITE_S X-Git-Tag: v3.1.4~85 X-Git-Url: http://zhaoyanbai.com/repos/html/index.html?a=commitdiff_plain;h=45d54cf1b07679b1bac47e2e1d6cde5f468df817;p=minix.git change DmaMode checks from DEV_WRITE to DEV_WRITE_S --- diff --git a/drivers/audio/sb16/sb16.c b/drivers/audio/sb16/sb16.c index 0e2a0c6f3..c4b924153 100755 --- a/drivers/audio/sb16/sb16.c +++ b/drivers/audio/sb16/sb16.c @@ -139,7 +139,7 @@ PUBLIC int drv_start(int channel, int DmaMode) { dsp_set_speed(DspSpeed); /* Put the speaker on */ - if(DmaMode == DEV_WRITE) { + if(DmaMode == DEV_WRITE_S) { dsp_command (DSP_CMD_SPKON); /* put speaker on */ /* Program DSP with dma mode */ @@ -291,7 +291,7 @@ PRIVATE void dsp_dma_setup(phys_bytes address, int count, int DmaMode) { pv_set(pvb[1], DMA8_CLEAR, 0x00); /* Clear flip flop */ /* set DMA mode */ - pv_set(pvb[2], DMA8_MODE, (DmaMode == DEV_WRITE ? DMA8_AUTO_PLAY : DMA8_AUTO_REC)); + pv_set(pvb[2], DMA8_MODE, (DmaMode == DEV_WRITE_S ? DMA8_AUTO_PLAY : DMA8_AUTO_REC)); pv_set(pvb[3], DMA8_ADDR, address >> 0); /* Low_byte of address */ pv_set(pvb[4], DMA8_ADDR, address >> 8); /* High byte of address */ @@ -309,7 +309,7 @@ PRIVATE void dsp_dma_setup(phys_bytes address, int count, int DmaMode) { pv_set(pvb[1], DMA16_CLEAR, 0x00); /* Clear flip flop */ /* Set dma mode */ - pv_set(pvb[2], DMA16_MODE, (DmaMode == DEV_WRITE ? DMA16_AUTO_PLAY : DMA16_AUTO_REC)); + pv_set(pvb[2], DMA16_MODE, (DmaMode == DEV_WRITE_S ? DMA16_AUTO_PLAY : DMA16_AUTO_REC)); pv_set(pvb[3], DMA16_ADDR, (address >> 1) & 0xFF); /* Low_byte of address */ pv_set(pvb[4], DMA16_ADDR, (address >> 9) & 0xFF); /* High byte of address */ @@ -442,4 +442,4 @@ PUBLIC void sb16_outb(int port, int value) { if ((s=sys_outb(port, value)) != OK) panic("SB16DSP","sys_outb() failed", s); -} \ No newline at end of file +}