Creative SB0350 Hardware Programming Guide - Page 51

Creative SB0350 Manual

Page 51 highlights

3-22 Digitized Sound I/O Programming 8. 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. 9. 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 99h 91h Description 8-bit PCM high-speed input 8-bit PCM high-speed output Upon receiving an interrupt from the DSP, the following steps should be done in the interrupt service routine: 1. 2. Program the DMA controller for subsequent block. Set the DSP block size and program the DSP for the next block. At the end of data transfer: 1. Restore the filter status. a. b. For stereo input: outp(wSBCBaseAddx+0x4, 0xC) outp(wSBCBaseAddx+0x5, bInputFilter) For stereo output: outp(wSBCBaseAddx+0x4, 0xE) outp(wSBCBaseAddx+0x5, bOutputFilter) 2. Set the hardware to mono mode. a. b. For stereo input: outp(wSBCBaseAddx+0xC, 0xA0) For stereo output: outp(wSBCBaseAddx+0x4, 0xE) bTmp = inp(wSBCBaseAddx+0x5) outp(wSBCBaseAddx+0x5, (bTmp & 0xFD)) 3. 4. 5. Turn off the DAC speaker. outp(wSBCBaseAddx+0xC, 0xD3) Disable the interrupt used. Restore the original interrupt service routine. 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.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141

3-22
Digitized Sound I/O Programming
8.
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.
9.
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
Upon receiving an interrupt from the DSP, the following steps should be done in the
interrupt service routine:
1.
Program the DMA controller for subsequent block.
2.
Set the DSP block size and program the DSP for the next block.
At the end of data transfer:
1.
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)
2.
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))
3.
Turn off the DAC speaker.
outp(wSBCBaseAddx+0xC, 0xD3)
4.
Disable the interrupt used.
5.
Restore the original interrupt service routine.
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.