Creative SB0350 Hardware Programming Guide - Page 44
Creative SB0350 Manual
View all Creative SB0350 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 44 highlights
Digitized Sound I/O Programming 3-15 8-bit Mono Auto-initialize Transfer The following are the steps needed to perform 8-bit mono PCM and ADPCM auto-initialize DMA mode transfer: 1. Allocate a DMA buffer in contiguous memory without straddling a 64KB physical page boundary. Use an 8KB buffer as an example. Set up the DSP interrupt service routine. Enable the interrupt used. Turn on the DAC speaker for digitized output. Otherwise, turn it off. to turn off the DAC speaker outp(wSBCBaseAddx+0xC, 0xD3) to turn on the DAC speaker outp(wSBCBaseAddx+0xC, 0xD1) Program the DMA controller for 8-bit auto-initialize DMA mode transfer. Set the DSP transfer Time Constant. outp(wSBCBaseAddx+0xC, 0x40) outp(wSBCBaseAddx+0xC, bTimeConstant) 2. 3. 4. 5. 6. 7. Set the DSP block transfer size. outp(wSBCBaseAddx+0xC, 0x48) outp(wSBCBaseAddx+0xC, wBlkSize.LowByte) outp(wSBCBaseAddx+0xC, wBlkSize.HighByte) If an 8KB DMA buffer is used, the DSP block transfer size should be set to 4KB. At the end of every 4KB transfer, the DSP will generate an interrupt to the application until the exit auto-initialize DMA mode command is received. Again, wBlkSize is one less than the actual transfer size. 8. Send an I/O command to start auto-initialize DMA mode transfer. outp(wSBCBaseAddx+0xC, bCommand) bCommand is one of the following: bCommand 2Ch 1Ch 7Dh 7Fh 1Fh Description 8-bit PCM input 8-bit PCM output 8-bit to 4-bit ADPCM output with reference byte 8-bit to 3-bit ADPCM output with reference byte 8-bit to 2-bit ADPCM output with reference byte