3-14
Digitized Sound I/O Programming
When the DSP sends an interrupt, the following steps should be done in the interrupt
service routine:
1.
Program the DMA controller for the next block.
2.
Program the DSP for the next block.
outp(wSBCB0xC, bCommand)
outp(wSBCB0xC, wLength.LowByte)
outp(wSBCB0xC, wLength.HighByte)
bCommand
is one of the following:
bCommand
Description
24h
8-bit PCM input
14h
8-bit PCM output
74h
8 bit to 4 bit ADPCM output without reference byte
76h
8 bit to 3 bit ADPCM output without reference byte
16h
8 bit to 2 bit ADPCM output without reference byte
Please note that for ADPCM output, subsequent data block transfers must
be programmed using different commands; specifically those that do not
take a reference byte.
At the end of data transfer:
1.
Turn off the DAC speaker.
outp(wSBCB0xC, 0xD3)
2.
Disable the interrupt used.
3.
Restore the original interrupt service routine.