Creative SB0350 Programming Manual page 51

Hardware programming guide
Table of Contents

Advertisement

3-22
Digitized Sound I/O Programming
8.
9.
Upon receiving an interrupt from the DSP, the following steps should be done in the
interrupt service routine:
1.
2.
At the end of data transfer:
1.
2.
3.
4.
5.
During high-speed DMA mode data I/O, the DSP will not accept any commands.
Hence, to stop data transfer before the end of a block, send the reset DSP command.
Set the DSP block transfer size.
outp(wSBCBaseAddx+0xC, 0x48)
outp(wSBCBaseAddx+0xC, wBlkSize.LowByte)
outp(wSBCBaseAddx+0xC, wBlkSize.HighByte)
wBlkSize is one less than the actual transfer size.
Send an I/O command to start high-speed single-cycle DMA mode
transfer.
outp(wSBCBaseAddx+0xC, bCommand)
bCommand is one of the following:
bCommand
Description
99h
8-bit PCM high-speed input
91h
8-bit PCM high-speed output
Program the DMA controller for subsequent block.
Set the DSP block size and program the DSP for the next block.
Restore the filter status.
a.
For stereo input:
outp(wSBCBaseAddx+0x4, 0xC)
outp(wSBCBaseAddx+0x5, bInputFilter)
b.
For stereo output:
outp(wSBCBaseAddx+0x4, 0xE)
outp(wSBCBaseAddx+0x5, bOutputFilter)
Set the hardware to mono mode.
a.
For stereo input:
outp(wSBCBaseAddx+0xC, 0xA0)
b.
For stereo output:
outp(wSBCBaseAddx+0x4, 0xE)
bTmp = inp(wSBCBaseAddx+0x5)
outp(wSBCBaseAddx+0x5, (bTmp & 0xFD))
Turn off the DAC speaker.
outp(wSBCBaseAddx+0xC, 0xD3)
Disable the interrupt used.
Restore the original interrupt service routine.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents