Creative SB0350 Programming Manual page 58

Hardware programming guide
Table of Contents

Advertisement

bMode is one of the following:
bMode
00h
20h
10h
30h
wBlkSize is one less than the actual number of samples to be transferred.
If an 8KB DMA buffer is used, the DSP block transfer size should be set to
4K of 8-bit samples for 8-bit data transfer, or 2K of 16-bit samples for 16-
bit data transfer. At the end of every block transfer, the DSP will generate
an interrupt to the application.
Upon receiving an interrupt from the DSP, the following steps should be done in the
interrupt service routine:
1.
Transfer data between the DMA buffer and the storage buffer.
To stop auto-initialize DMA mode, you can either send the exit auto-initialize
DMA mode command or program the DSP for single-cycle DMA mode transfer.
2a. Send the exit auto-initialize DMA mode command.
outp(wSBCBaseAddx+0xC, 0xDA)
outp(wSBCBaseAddx+0xC, 0xD9)
Upon receiving the exit auto-initialize DMA mode command, the DSP will
exit auto-initialize DMA mode immediately at the end of the current block
transfer.
2b. Program the DSP for single-cycle DMA mode transfer.
outp(wSBCBaseAddx+0xC, bCommand)
outp(wSBCBaseAddx+0xC, bMode)
outp(wSBCBaseAddx+0xC, wBlkSize.LowByte)
outp(wSBCBaseAddx+0xC, wBlkSize.HighByte)
At the end of data transfer:
1
Disable the interrupt used.
2
Restore the original interrupt service routine.
3.
Release the allocated DMA buffer.
Digitized Sound I/O Programming
Description
8-bit mono unsigned PCM
8-bit stereo unsigned PCM
16-bit mono signed PCM
16-bit stereo signed PCM
for 8-bit transfer
for 16-bit transfer
3-29

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents