Specifications
Digitized Sound I/O Programming 3-21
8-bit Stereo High-speed Single-cycle Transfer
The following are the steps needed to perform 8-bit stereo PCM high-speed single-
cycle DMA mode transfer:
1. Set up the DSP interrupt service routine.
2. Enable the interrupt used.
3. Turn on the DAC speaker for digitized output. Otherwise, turn it off.
outp(wSBCBaseAddx+0xC, 0xD3)
to turn off the DAC speaker
outp(wSBCBaseAddx+0xC, 0xD1)
to turn on the DAC speaker
4. Set the hardware to stereo mode.
a. For stereo input:
outp(wSBCBaseAddx+0xC, 0xA8)
b. For stereo output:
i. Set stereo mode.
outp(wSBCBaseAddx+0x4, 0xE)
bTmp = inp(wSBCBaseAddx+0x5)
outp(wSBCBaseAddx+0x5, (bTmp | 0x2))
ii. Program the DMA controller for one byte single-cycle output.
iii. Program the DSP to output one silent byte (value 0x80).
outp(wSBCBaseAddx+0xC, 0x14)
outp(wSBCBaseAddx+0xC, 0)
outp(wSBCBaseAddx+0xC, 0)
iv Upon receiving a DSP interrupt, acknowledge the DSP then exit
the ISR.
5. Program the DMA controller for 8-bit single-cycle DMA mode transfer.
6. Set the DSP transfer Time Constant.
outp(wSBCBaseAddx+0xC, 0x40)
outp(wSBCBaseAddx+0xC, bTimeConstant)
7. Preserve the current input and output filter status, then turn it off.
a. For stereo input:
outp(wSBCBaseAddx+0x4, 0xC)
bInputFilter = inp(wSBCBaseAddx+0x5)
outp(wSBCBaseAddx+0x5, (bInputFilter | 0x20))
b. For stereo output:
outp(wSBCBaseAddx+0x4, 0xE)
bOutputFilter = inp(wSBCBaseAddx+0x5)
outp(wSBCBaseAddx+0x5, (bOutputFilter | 0x20))