blob: 7ebaacb6df3df8eef704d87ca28411ba0ae34f85 [file] [log] [blame]
Takashi Iwai72e69162016-11-10 16:25:42 +01001=============================================
2Sound Blaster Audigy mixer / default DSP code
3=============================================
4
5This is based on sb-live-mixer.rst.
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
16Digital mixer controls
17======================
18
19These controls are built using the DSP instructions. They offer extended
Randy Dunlapba35c3a2023-01-26 22:39:56 -080020functionality. Only the default built-in code in the ALSA driver is described
Takashi Iwai72e69162016-11-10 16:25:42 +010021here. Note that the controls work as attenuators: the maximum value is the
Oswald Buddenhagend3330cb2023-04-05 22:12:20 +020022neutral position leaving the signal unchanged. Note that if the same destination
23is mentioned in multiple controls, the signal is accumulated and can be clipped
24(set to maximal or minimal value without checking for overflow).
Takashi Iwai72e69162016-11-10 16:25:42 +010025
26
27Explanation of used abbreviations:
28
29DAC
30 digital to analog converter
31ADC
32 analog to digital converter
33I2S
34 one-way three wire serial bus for digital sound by Philips Semiconductors
Oswald Buddenhagend3330cb2023-04-05 22:12:20 +020035 (this standard is used for connecting standalone D/A and A/D converters)
Takashi Iwai72e69162016-11-10 16:25:42 +010036LFE
Oswald Buddenhagend3330cb2023-04-05 22:12:20 +020037 low frequency effects (used as subwoofer signal)
Takashi Iwai72e69162016-11-10 16:25:42 +010038AC97
Oswald Buddenhagend3330cb2023-04-05 22:12:20 +020039 a chip containing an analog mixer, D/A and A/D converters
Takashi Iwai72e69162016-11-10 16:25:42 +010040IEC958
41 S/PDIF
42FX-bus
43 the EMU10K2 chip has an effect bus containing 64 accumulators.
Oswald Buddenhagend3330cb2023-04-05 22:12:20 +020044 Each of the synthesizer voices can feed its output to these accumulators
45 and the DSP microcontroller can operate with the resulting sum.
Takashi Iwai72e69162016-11-10 16:25:42 +010046
47name='PCM Front Playback Volume',index=0
48----------------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020049This control is used to attenuate samples from left and right front PCM FX-bus
Takashi Iwai72e69162016-11-10 16:25:42 +010050accumulators. ALSA uses accumulators 8 and 9 for left and right front PCM
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020051samples for 5.1 playback. The result samples are forwarded to the front speakers.
Takashi Iwai72e69162016-11-10 16:25:42 +010052
53name='PCM Surround Playback Volume',index=0
54-------------------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020055This control is used to attenuate samples from left and right surround PCM FX-bus
Takashi Iwai72e69162016-11-10 16:25:42 +010056accumulators. ALSA uses accumulators 2 and 3 for left and right surround PCM
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020057samples for 5.1 playback. The result samples are forwarded to the surround (rear)
58speakers.
59
60name='PCM Side Playback Volume',index=0
61---------------------------------------
62This control is used to attenuate samples from left and right side PCM FX-bus
63accumulators. ALSA uses accumulators 14 and 15 for left and right side PCM
64samples for 7.1 playback. The result samples are forwarded to the side speakers.
Takashi Iwai72e69162016-11-10 16:25:42 +010065
66name='PCM Center Playback Volume',index=0
67-----------------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020068This control is used to attenuate samples from center PCM FX-bus accumulator.
69ALSA uses accumulator 6 for center PCM samples for 5.1 playback. The result
70samples are forwarded to the center speaker.
Takashi Iwai72e69162016-11-10 16:25:42 +010071
72name='PCM LFE Playback Volume',index=0
73--------------------------------------
74This control is used to attenuate sample for LFE PCM FX-bus accumulator.
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020075ALSA uses accumulator 7 for LFE PCM samples for 5.1 playback. The result
76samples are forwarded to the subwoofer.
Takashi Iwai72e69162016-11-10 16:25:42 +010077
78name='PCM Playback Volume',index=0
79----------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020080This control is used to attenuate samples from left and right PCM FX-bus
Takashi Iwai72e69162016-11-10 16:25:42 +010081accumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples for
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020082stereo playback. The result samples are forwarded to the front speakers.
Takashi Iwai72e69162016-11-10 16:25:42 +010083
84name='PCM Capture Volume',index=0
85---------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020086This control is used to attenuate samples from left and right PCM FX-bus
87accumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples for
88stereo playback. The result is forwarded to the standard capture PCM device.
Takashi Iwai72e69162016-11-10 16:25:42 +010089
90name='Music Playback Volume',index=0
91------------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020092This control is used to attenuate samples from left and right MIDI FX-bus
Takashi Iwai72e69162016-11-10 16:25:42 +010093accumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples.
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020094The result samples are forwarded to the virtual stereo mixer.
Takashi Iwai72e69162016-11-10 16:25:42 +010095
96name='Music Capture Volume',index=0
97-----------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +020098These controls are used to attenuate samples from left and right MIDI FX-bus
99accumulator. ALSA uses accumulators 4 and 5 for left and right MIDI samples.
100The result is forwarded to the standard capture PCM device.
Takashi Iwai72e69162016-11-10 16:25:42 +0100101
102name='Mic Playback Volume',index=0
103----------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200104This control is used to attenuate samples from left and right Mic input of
105the AC97 codec. The result samples are forwarded to the virtual stereo mixer.
Takashi Iwai72e69162016-11-10 16:25:42 +0100106
107name='Mic Capture Volume',index=0
108---------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200109This control is used to attenuate samples from left and right Mic input of
110the AC97 codec. The result is forwarded to the standard capture PCM device.
111
112The original samples are also forwarded to the Mic capture PCM device (device 1;
11316bit/8KHz mono) without volume control.
Takashi Iwai72e69162016-11-10 16:25:42 +0100114
115name='Audigy CD Playback Volume',index=0
116----------------------------------------
117This control is used to attenuate samples from left and right IEC958 TTL
118digital inputs (usually used by a CDROM drive). The result samples are
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200119forwarded to the virtual stereo mixer.
Takashi Iwai72e69162016-11-10 16:25:42 +0100120
121name='Audigy CD Capture Volume',index=0
122---------------------------------------
123This control is used to attenuate samples from left and right IEC958 TTL
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200124digital inputs (usually used by a CDROM drive). The result is forwarded
125to the standard capture PCM device.
Takashi Iwai72e69162016-11-10 16:25:42 +0100126
127name='IEC958 Optical Playback Volume',index=0
128---------------------------------------------
129This control is used to attenuate samples from left and right IEC958 optical
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200130digital input. The result samples are forwarded to the virtual stereo mixer.
Takashi Iwai72e69162016-11-10 16:25:42 +0100131
132name='IEC958 Optical Capture Volume',index=0
133--------------------------------------------
134This control is used to attenuate samples from left and right IEC958 optical
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200135digital inputs. The result is forwarded to the standard capture PCM device.
Takashi Iwai72e69162016-11-10 16:25:42 +0100136
137name='Line2 Playback Volume',index=0
138------------------------------------
139This control is used to attenuate samples from left and right I2S ADC
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200140inputs (on the AudigyDrive). The result samples are forwarded to the virtual
141stereo mixer.
Takashi Iwai72e69162016-11-10 16:25:42 +0100142
143name='Line2 Capture Volume',index=1
144-----------------------------------
145This control is used to attenuate samples from left and right I2S ADC
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200146inputs (on the AudigyDrive). The result is forwarded to the standard capture
147PCM device.
Takashi Iwai72e69162016-11-10 16:25:42 +0100148
149name='Analog Mix Playback Volume',index=0
150-----------------------------------------
151This control is used to attenuate samples from left and right I2S ADC
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200152inputs from Philips ADC. The result samples are forwarded to the virtual
153stereo mixer. This contains mix from analog sources like CD, Line In, Aux, ....
Takashi Iwai72e69162016-11-10 16:25:42 +0100154
155name='Analog Mix Capture Volume',index=1
156----------------------------------------
157This control is used to attenuate samples from left and right I2S ADC
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200158inputs Philips ADC. The result is forwarded to the standard capture PCM device.
Takashi Iwai72e69162016-11-10 16:25:42 +0100159
160name='Aux2 Playback Volume',index=0
161-----------------------------------
162This control is used to attenuate samples from left and right I2S ADC
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200163inputs (on the AudigyDrive). The result samples are forwarded to the virtual
164stereo mixer.
Takashi Iwai72e69162016-11-10 16:25:42 +0100165
166name='Aux2 Capture Volume',index=1
167----------------------------------
168This control is used to attenuate samples from left and right I2S ADC
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200169inputs (on the AudigyDrive). The result is forwarded to the standard capture
170PCM device.
Takashi Iwai72e69162016-11-10 16:25:42 +0100171
172name='Front Playback Volume',index=0
173------------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200174This control is used to attenuate samples from the virtual stereo mixer.
175The result samples are forwarded to the front speakers.
Takashi Iwai72e69162016-11-10 16:25:42 +0100176
177name='Surround Playback Volume',index=0
178---------------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200179This control is used to attenuate samples from the virtual stereo mixer.
180The result samples are forwarded to the surround (rear) speakers.
181
182name='Side Playback Volume',index=0
183-----------------------------------
184This control is used to attenuate samples from the virtual stereo mixer.
185The result samples are forwarded to the side speakers.
Takashi Iwai72e69162016-11-10 16:25:42 +0100186
187name='Center Playback Volume',index=0
188-------------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200189This control is used to attenuate samples from the virtual stereo mixer.
190The result samples are forwarded to the center speaker.
Takashi Iwai72e69162016-11-10 16:25:42 +0100191
192name='LFE Playback Volume',index=0
193----------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200194This control is used to attenuate samples from the virtual stereo mixer.
195The result samples are forwarded to the subwoofer.
Takashi Iwai72e69162016-11-10 16:25:42 +0100196
197name='Tone Control - Switch',index=0
198------------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200199This control turns the tone control on or off. The samples forwarded to
200the speaker outputs are affected.
Takashi Iwai72e69162016-11-10 16:25:42 +0100201
202name='Tone Control - Bass',index=0
203----------------------------------
204This control sets the bass intensity. There is no neutral value!!
205When the tone control code is activated, the samples are always modified.
206The closest value to pure signal is 20.
207
208name='Tone Control - Treble',index=0
209------------------------------------
210This control sets the treble intensity. There is no neutral value!!
211When the tone control code is activated, the samples are always modified.
212The closest value to pure signal is 20.
213
214name='Master Playback Volume',index=0
215-------------------------------------
Oswald Buddenhagen13890a62023-08-26 00:21:56 +0200216This control is used to attenuate samples forwarded to the speaker outputs.
Takashi Iwai72e69162016-11-10 16:25:42 +0100217
218name='IEC958 Optical Raw Playback Switch',index=0
219-------------------------------------------------
220If this switch is on, then the samples for the IEC958 (S/PDIF) digital
Oswald Buddenhagend3330cb2023-04-05 22:12:20 +0200221output are taken only from the raw iec958 ALSA PCM device (which uses
222accumulators 20 and 21 for left and right PCM by default).
Takashi Iwai72e69162016-11-10 16:25:42 +0100223
224
225PCM stream related controls
226===========================
227
228name='EMU10K1 PCM Volume',index 0-31
229------------------------------------
Oswald Buddenhagenbcdbd3b2023-05-14 19:03:23 +0200230Channel volume attenuation in range 0-0x1fffd. The middle value (no
Takashi Iwai72e69162016-11-10 16:25:42 +0100231attenuation) is default. The channel mapping for three values is
232as follows:
233
234* 0 - mono, default 0xffff (no attenuation)
235* 1 - left, default 0xffff (no attenuation)
236* 2 - right, default 0xffff (no attenuation)
237
238name='EMU10K1 PCM Send Routing',index 0-31
239------------------------------------------
Oswald Buddenhagend3330cb2023-04-05 22:12:20 +0200240This control specifies the destination - FX-bus accumulators. There are 24
241values in this mapping:
Takashi Iwai72e69162016-11-10 16:25:42 +0100242
Oswald Buddenhagen155e3d32023-05-16 11:36:07 +0200243* 0 - mono, A destination (FX-bus 0-63), default 0
244* 1 - mono, B destination (FX-bus 0-63), default 1
245* 2 - mono, C destination (FX-bus 0-63), default 2
246* 3 - mono, D destination (FX-bus 0-63), default 3
247* 4 - mono, E destination (FX-bus 0-63), default 4
248* 5 - mono, F destination (FX-bus 0-63), default 5
249* 6 - mono, G destination (FX-bus 0-63), default 6
250* 7 - mono, H destination (FX-bus 0-63), default 7
251* 8 - left, A destination (FX-bus 0-63), default 0
252* 9 - left, B destination (FX-bus 0-63), default 1
Takashi Iwai72e69162016-11-10 16:25:42 +0100253* 10 - left, C destination (FX-bus 0-63), default 2
254* 11 - left, D destination (FX-bus 0-63), default 3
Oswald Buddenhagen155e3d32023-05-16 11:36:07 +0200255* 12 - left, E destination (FX-bus 0-63), default 4
256* 13 - left, F destination (FX-bus 0-63), default 5
257* 14 - left, G destination (FX-bus 0-63), default 6
258* 15 - left, H destination (FX-bus 0-63), default 7
Takashi Iwai72e69162016-11-10 16:25:42 +0100259* 16 - right, A destination (FX-bus 0-63), default 0
260* 17 - right, B destination (FX-bus 0-63), default 1
261* 18 - right, C destination (FX-bus 0-63), default 2
262* 19 - right, D destination (FX-bus 0-63), default 3
Oswald Buddenhagen155e3d32023-05-16 11:36:07 +0200263* 20 - right, E destination (FX-bus 0-63), default 4
264* 21 - right, F destination (FX-bus 0-63), default 5
265* 22 - right, G destination (FX-bus 0-63), default 6
266* 23 - right, H destination (FX-bus 0-63), default 7
Takashi Iwai72e69162016-11-10 16:25:42 +0100267
268Don't forget that it's illegal to assign a channel to the same FX-bus accumulator
269more than once (it means 0=0 && 1=0 is an invalid combination).
270
271name='EMU10K1 PCM Send Volume',index 0-31
272-----------------------------------------
273It specifies the attenuation (amount) for given destination in range 0-255.
274The channel mapping is following:
275
276* 0 - mono, A destination attn, default 255 (no attenuation)
277* 1 - mono, B destination attn, default 255 (no attenuation)
278* 2 - mono, C destination attn, default 0 (mute)
279* 3 - mono, D destination attn, default 0 (mute)
280* 4 - mono, E destination attn, default 0 (mute)
281* 5 - mono, F destination attn, default 0 (mute)
282* 6 - mono, G destination attn, default 0 (mute)
283* 7 - mono, H destination attn, default 0 (mute)
284* 8 - left, A destination attn, default 255 (no attenuation)
285* 9 - left, B destination attn, default 0 (mute)
286* 10 - left, C destination attn, default 0 (mute)
287* 11 - left, D destination attn, default 0 (mute)
288* 12 - left, E destination attn, default 0 (mute)
289* 13 - left, F destination attn, default 0 (mute)
290* 14 - left, G destination attn, default 0 (mute)
291* 15 - left, H destination attn, default 0 (mute)
292* 16 - right, A destination attn, default 0 (mute)
293* 17 - right, B destination attn, default 255 (no attenuation)
294* 18 - right, C destination attn, default 0 (mute)
295* 19 - right, D destination attn, default 0 (mute)
296* 20 - right, E destination attn, default 0 (mute)
297* 21 - right, F destination attn, default 0 (mute)
298* 22 - right, G destination attn, default 0 (mute)
299* 23 - right, H destination attn, default 0 (mute)
300
301
302
303MANUALS/PATENTS
304===============
305
Oswald Buddenhagend945ef362023-08-26 00:21:55 +0200306See sb-live-mixer.rst.