1
2		Sound Blaster Audigy mixer / default DSP code
3		===========================================
4
5This is based on SB-Live-mixer.txt.
6
7The EMU10K2 chips have a DSP part which can be programmed to support 
8various ways of sample processing, which is described here.
9(This article does not deal with the overall functionality of the 
10EMU10K2 chips. See the manuals section for further details.)
11
12The ALSA driver programs this portion of chip by default code
13(can be altered later) which offers the following functionality:
14
15
161) Digital mixer controls
17-------------------------
18
19These controls are built using the DSP instructions. They offer extended
20functionality. Only the default build-in code in the ALSA driver is described
21here. Note that the controls work as attenuators: the maximum value is the 
22neutral position leaving the signal unchanged. Note that if the  same destination 
23is mentioned in multiple controls, the signal is accumulated and can be wrapped 
24(set to maximal or minimal value without checking of overflow).
25
26
27Explanation of used abbreviations:
28
29DAC    - digital to analog converter
30ADC    - analog to digital converter
31I2S    - one-way three wire serial bus for digital sound by Philips Semiconductors
32         (this standard is used for connecting standalone DAC and ADC converters)
33LFE    - low frequency effects (subwoofer signal)
34AC97   - a chip containing an analog mixer, DAC and ADC converters
35IEC958 - S/PDIF
36FX-bus - the EMU10K2 chip has an effect bus containing 64 accumulators.
37         Each of the synthesizer voices can feed its output to these accumulators
38         and the DSP microcontroller can operate with the resulting sum.
39
40name='PCM Front Playback Volume',index=0
41
42This control is used to attenuate samples for left and right front PCM FX-bus
43accumulators. ALSA uses accumulators 8 and 9 for left and right front PCM 
44samples for 5.1 playback. The result samples are forwarded to the front DAC PCM 
45slots of the Philips DAC.
46
47name='PCM Surround Playback Volume',index=0
48
49This control is used to attenuate samples for left and right surround PCM FX-bus
50accumulators. ALSA uses accumulators 2 and 3 for left and right surround PCM 
51samples for 5.1 playback. The result samples are forwarded to the surround DAC PCM 
52slots of the Philips DAC.
53
54name='PCM Center Playback Volume',index=0
55
56This control is used to attenuate samples for center PCM FX-bus accumulator.
57ALSA uses accumulator 6 for center PCM sample for 5.1 playback. The result sample
58is forwarded to the center DAC PCM slot of the Philips DAC.
59
60name='PCM LFE Playback Volume',index=0
61
62This control is used to attenuate sample for LFE PCM FX-bus accumulator. 
63ALSA uses accumulator 7 for LFE PCM sample for 5.1 playback. The result sample 
64is forwarded to the LFE DAC PCM slot of the Philips DAC.
65
66name='PCM Playback Volume',index=0
67
68This control is used to attenuate samples for left and right PCM FX-bus
69accumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples for
70stereo playback. The result samples are forwarded to the front DAC PCM slots 
71of the Philips DAC.
72
73name='PCM Capture Volume',index=0
74
75This control is used to attenuate samples for left and right PCM FX-bus
76accumulator. ALSA uses accumulators 0 and 1 for left and right PCM.
77The result is forwarded to the ADC capture FIFO (thus to the standard capture
78PCM device).
79
80name='Music Playback Volume',index=0
81
82This control is used to attenuate samples for left and right MIDI FX-bus
83accumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples.
84The result samples are forwarded to the front DAC PCM slots of the AC97 codec.
85
86name='Music Capture Volume',index=0
87
88These controls are used to attenuate samples for left and right MIDI FX-bus
89accumulator. ALSA uses accumulators 4 and 5 for left and right PCM.
90The result is forwarded to the ADC capture FIFO (thus to the standard capture
91PCM device).
92
93name='Mic Playback Volume',index=0
94
95This control is used to attenuate samples for left and right Mic input.
96For Mic input is used AC97 codec. The result samples are forwarded to 
97the front DAC PCM slots of the Philips DAC. Samples are forwarded to Mic
98capture FIFO (device 1 - 16bit/8KHz mono) too without volume control.
99
100name='Mic Capture Volume',index=0
101
102This control is used to attenuate samples for left and right Mic input.
103The result is forwarded to the ADC capture FIFO (thus to the standard capture
104PCM device).
105
106name='Audigy CD Playback Volume',index=0
107
108This control is used to attenuate samples from left and right IEC958 TTL
109digital inputs (usually used by a CDROM drive). The result samples are
110forwarded to the front DAC PCM slots of the Philips DAC.
111
112name='Audigy CD Capture Volume',index=0
113
114This control is used to attenuate samples from left and right IEC958 TTL
115digital inputs (usually used by a CDROM drive). The result samples are
116forwarded to the ADC capture FIFO (thus to the standard capture PCM device).
117
118name='IEC958 Optical Playback Volume',index=0
119
120This control is used to attenuate samples from left and right IEC958 optical
121digital input. The result samples are forwarded to the front DAC PCM slots
122of the Philips DAC.
123
124name='IEC958 Optical Capture Volume',index=0
125
126This control is used to attenuate samples from left and right IEC958 optical
127digital inputs. The result samples are forwarded to the ADC capture FIFO
128(thus to the standard capture PCM device).
129
130name='Line2 Playback Volume',index=0
131
132This control is used to attenuate samples from left and right I2S ADC
133inputs (on the AudigyDrive). The result samples are forwarded to the front
134DAC PCM slots of the Philips DAC.
135
136name='Line2 Capture Volume',index=1
137
138This control is used to attenuate samples from left and right I2S ADC
139inputs (on the AudigyDrive). The result samples are forwarded to the ADC
140capture FIFO (thus to the standard capture PCM device).
141
142name='Analog Mix Playback Volume',index=0
143
144This control is used to attenuate samples from left and right I2S ADC
145inputs from Philips ADC. The result samples are forwarded to the front
146DAC PCM slots of the Philips DAC. This contains mix from analog sources
147like CD, Line In, Aux, ....
148
149name='Analog Mix Capture Volume',index=1
150
151This control is used to attenuate samples from left and right I2S ADC
152inputs Philips ADC. The result samples are forwarded to the ADC
153capture FIFO (thus to the standard capture PCM device).
154
155name='Aux2 Playback Volume',index=0
156
157This control is used to attenuate samples from left and right I2S ADC
158inputs (on the AudigyDrive). The result samples are forwarded to the front
159DAC PCM slots of the Philips DAC.
160
161name='Aux2 Capture Volume',index=1
162
163This control is used to attenuate samples from left and right I2S ADC
164inputs (on the AudigyDrive). The result samples are forwarded to the ADC
165capture FIFO (thus to the standard capture PCM device).
166
167name='Front Playback Volume',index=0
168
169All stereo signals are mixed together and mirrored to surround, center and LFE.
170This control is used to attenuate samples for left and right front speakers of
171this mix.
172
173name='Surround Playback Volume',index=0
174
175All stereo signals are mixed together and mirrored to surround, center and LFE.
176This control is used to attenuate samples for left and right surround speakers of
177this mix.
178
179name='Center Playback Volume',index=0
180
181All stereo signals are mixed together and mirrored to surround, center and LFE.
182This control is used to attenuate sample for center speaker of this mix.
183
184name='LFE Playback Volume',index=0
185
186All stereo signals are mixed together and mirrored to surround, center and LFE.
187This control is used to attenuate sample for LFE speaker of this mix.
188
189name='Tone Control - Switch',index=0
190
191This control turns the tone control on or off. The samples for front, rear
192and center / LFE outputs are affected.
193
194name='Tone Control - Bass',index=0
195
196This control sets the bass intensity. There is no neutral value!!
197When the tone control code is activated, the samples are always modified.
198The closest value to pure signal is 20.
199
200name='Tone Control - Treble',index=0
201
202This control sets the treble intensity. There is no neutral value!!
203When the tone control code is activated, the samples are always modified.
204The closest value to pure signal is 20.
205
206name='Master Playback Volume',index=0
207
208This control is used to attenuate samples for front, surround, center and 
209LFE outputs.
210
211name='IEC958 Optical Raw Playback Switch',index=0
212
213If this switch is on, then the samples for the IEC958 (S/PDIF) digital
214output are taken only from the raw FX8010 PCM, otherwise standard front
215PCM samples are taken.
216
217
2182) PCM stream related controls
219------------------------------
220
221name='EMU10K1 PCM Volume',index 0-31
222
223Channel volume attenuation in range 0-0xffff. The maximum value (no
224attenuation) is default. The channel mapping for three values is
225as follows:
226
227	0 - mono, default 0xffff (no attenuation)
228	1 - left, default 0xffff (no attenuation)
229	2 - right, default 0xffff (no attenuation)
230
231name='EMU10K1 PCM Send Routing',index 0-31
232
233This control specifies the destination - FX-bus accumulators. There 24
234values with this mapping:
235
236	 0 -  mono, A destination (FX-bus 0-63), default 0
237	 1 -  mono, B destination (FX-bus 0-63), default 1
238	 2 -  mono, C destination (FX-bus 0-63), default 2
239	 3 -  mono, D destination (FX-bus 0-63), default 3
240	 4 -  mono, E destination (FX-bus 0-63), default 0
241	 5 -  mono, F destination (FX-bus 0-63), default 0
242	 6 -  mono, G destination (FX-bus 0-63), default 0
243	 7 -  mono, H destination (FX-bus 0-63), default 0
244	 8 -  left, A destination (FX-bus 0-63), default 0
245	 9 -  left, B destination (FX-bus 0-63), default 1
246	10 -  left, C destination (FX-bus 0-63), default 2
247	11 -  left, D destination (FX-bus 0-63), default 3
248	12 -  left, E destination (FX-bus 0-63), default 0
249	13 -  left, F destination (FX-bus 0-63), default 0
250	14 -  left, G destination (FX-bus 0-63), default 0
251	15 -  left, H destination (FX-bus 0-63), default 0
252	16 - right, A destination (FX-bus 0-63), default 0
253	17 - right, B destination (FX-bus 0-63), default 1
254	18 - right, C destination (FX-bus 0-63), default 2
255	19 - right, D destination (FX-bus 0-63), default 3
256	20 - right, E destination (FX-bus 0-63), default 0
257	21 - right, F destination (FX-bus 0-63), default 0
258	22 - right, G destination (FX-bus 0-63), default 0
259	23 - right, H destination (FX-bus 0-63), default 0
260
261Don't forget that it's illegal to assign a channel to the same FX-bus accumulator 
262more than once (it means 0=0 && 1=0 is an invalid combination).
263 
264name='EMU10K1 PCM Send Volume',index 0-31
265
266It specifies the attenuation (amount) for given destination in range 0-255.
267The channel mapping is following:
268
269	 0 -  mono, A destination attn, default 255 (no attenuation)
270	 1 -  mono, B destination attn, default 255 (no attenuation)
271	 2 -  mono, C destination attn, default 0 (mute)
272	 3 -  mono, D destination attn, default 0 (mute)
273	 4 -  mono, E destination attn, default 0 (mute)
274	 5 -  mono, F destination attn, default 0 (mute)
275	 6 -  mono, G destination attn, default 0 (mute)
276	 7 -  mono, H destination attn, default 0 (mute)
277	 8 -  left, A destination attn, default 255 (no attenuation)
278	 9 -  left, B destination attn, default 0 (mute)
279	10 -  left, C destination attn, default 0 (mute)
280	11 -  left, D destination attn, default 0 (mute)
281	12 -  left, E destination attn, default 0 (mute)
282	13 -  left, F destination attn, default 0 (mute)
283	14 -  left, G destination attn, default 0 (mute)
284	15 -  left, H destination attn, default 0 (mute)
285	16 - right, A destination attn, default 0 (mute)
286	17 - right, B destination attn, default 255 (no attenuation)
287	18 - right, C destination attn, default 0 (mute)
288	19 - right, D destination attn, default 0 (mute)
289	20 - right, E destination attn, default 0 (mute)
290	21 - right, F destination attn, default 0 (mute)
291	22 - right, G destination attn, default 0 (mute)
292	23 - right, H destination attn, default 0 (mute)
293
294
295
2964) MANUALS/PATENTS:
297-------------------
298
299ftp://opensource.creative.com/pub/doc
300-------------------------------------
301
302        Files:
303        LM4545.pdf      AC97 Codec
304
305        m2049.pdf       The EMU10K1 Digital Audio Processor
306
307        hog63.ps        FX8010 - A DSP Chip Architecture for Audio Effects
308
309
310WIPO Patents
311------------
312        Patent numbers:
313        WO 9901813 (A1) Audio Effects Processor with multiple asynchronous (Jan. 14, 1999)
314                        streams
315
316        WO 9901814 (A1) Processor with Instruction Set for Audio Effects (Jan. 14, 1999)
317
318        WO 9901953 (A1) Audio Effects Processor having Decoupled Instruction
319                        Execution and Audio Data Sequencing (Jan. 14, 1999)
320
321
322US Patents (http://www.uspto.gov/)
323----------------------------------
324
325        US 5925841      Digital Sampling Instrument employing cache memory (Jul. 20, 1999)
326
327        US 5928342      Audio Effects Processor integrated on a single chip (Jul. 27, 1999)
328                        with a multiport memory onto which multiple asynchronous
329                        digital sound samples can be concurrently loaded
330
331        US 5930158      Processor with Instruction Set for Audio Effects (Jul. 27, 1999)
332
333        US 6032235      Memory initialization circuit (Tram) (Feb. 29, 2000)
334
335        US 6138207      Interpolation looping of audio samples in cache connected to    (Oct. 24, 2000)
336                        system bus with prioritization and modification of bus transfers
337                        in accordance with loop ends and minimum block sizes
338
339        US 6151670      Method for conserving memory storage using a (Nov. 21, 2000)
340                        pool of  short term memory registers
341
342        US 6195715      Interrupt control for multiple programs communicating with      (Feb. 27, 2001)
343                        a common interrupt by associating programs to GP registers,
344                        defining interrupt register, polling GP registers, and invoking
345                        callback routine associated with defined interrupt register
346