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