xref: /openbmc/linux/Documentation/sound/cards/audigy-mixer.rst (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
172e69166STakashi Iwai=============================================
272e69166STakashi IwaiSound Blaster Audigy mixer / default DSP code
372e69166STakashi Iwai=============================================
472e69166STakashi Iwai
572e69166STakashi IwaiThis is based on sb-live-mixer.rst.
672e69166STakashi Iwai
772e69166STakashi IwaiThe EMU10K2 chips have a DSP part which can be programmed to support
872e69166STakashi Iwaivarious ways of sample processing, which is described here.
972e69166STakashi Iwai(This article does not deal with the overall functionality of the
1072e69166STakashi IwaiEMU10K2 chips. See the manuals section for further details.)
1172e69166STakashi Iwai
1272e69166STakashi IwaiThe ALSA driver programs this portion of chip by default code
1372e69166STakashi Iwai(can be altered later) which offers the following functionality:
1472e69166STakashi Iwai
1572e69166STakashi Iwai
1672e69166STakashi IwaiDigital mixer controls
1772e69166STakashi Iwai======================
1872e69166STakashi Iwai
1972e69166STakashi IwaiThese controls are built using the DSP instructions. They offer extended
20ba35c3a5SRandy Dunlapfunctionality. Only the default built-in code in the ALSA driver is described
2172e69166STakashi Iwaihere. Note that the controls work as attenuators: the maximum value is the
2272e69166STakashi Iwaineutral position leaving the signal unchanged. Note that if the same destination
23d3330cb8SOswald Buddenhagenis mentioned in multiple controls, the signal is accumulated and can be clipped
24d3330cb8SOswald Buddenhagen(set to maximal or minimal value without checking for overflow).
2572e69166STakashi Iwai
2672e69166STakashi Iwai
2772e69166STakashi IwaiExplanation of used abbreviations:
2872e69166STakashi Iwai
2972e69166STakashi IwaiDAC
3072e69166STakashi Iwai	digital to analog converter
3172e69166STakashi IwaiADC
3272e69166STakashi Iwai	analog to digital converter
3372e69166STakashi IwaiI2S
3472e69166STakashi Iwai	one-way three wire serial bus for digital sound by Philips Semiconductors
35d3330cb8SOswald Buddenhagen	(this standard is used for connecting standalone D/A and A/D converters)
3672e69166STakashi IwaiLFE
37d3330cb8SOswald Buddenhagen	low frequency effects (used as subwoofer signal)
3872e69166STakashi IwaiAC97
39d3330cb8SOswald Buddenhagen	a chip containing an analog mixer, D/A and A/D converters
4072e69166STakashi IwaiIEC958
4172e69166STakashi Iwai	S/PDIF
4272e69166STakashi IwaiFX-bus
4372e69166STakashi Iwai	the EMU10K2 chip has an effect bus containing 64 accumulators.
4472e69166STakashi Iwai	Each of the synthesizer voices can feed its output to these accumulators
4572e69166STakashi Iwai	and the DSP microcontroller can operate with the resulting sum.
4672e69166STakashi Iwai
4772e69166STakashi Iwainame='PCM Front Playback Volume',index=0
4872e69166STakashi Iwai----------------------------------------
49*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from left and right front PCM FX-bus
5072e69166STakashi Iwaiaccumulators. ALSA uses accumulators 8 and 9 for left and right front PCM
51*13890a6aSOswald Buddenhagensamples for 5.1 playback. The result samples are forwarded to the front speakers.
5272e69166STakashi Iwai
5372e69166STakashi Iwainame='PCM Surround Playback Volume',index=0
5472e69166STakashi Iwai-------------------------------------------
55*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from left and right surround PCM FX-bus
5672e69166STakashi Iwaiaccumulators. ALSA uses accumulators 2 and 3 for left and right surround PCM
57*13890a6aSOswald Buddenhagensamples for 5.1 playback. The result samples are forwarded to the surround (rear)
58*13890a6aSOswald Buddenhagenspeakers.
59*13890a6aSOswald Buddenhagen
60*13890a6aSOswald Buddenhagenname='PCM Side Playback Volume',index=0
61*13890a6aSOswald Buddenhagen---------------------------------------
62*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from left and right side PCM FX-bus
63*13890a6aSOswald Buddenhagenaccumulators. ALSA uses accumulators 14 and 15 for left and right side PCM
64*13890a6aSOswald Buddenhagensamples for 7.1 playback. The result samples are forwarded to the side speakers.
6572e69166STakashi Iwai
6672e69166STakashi Iwainame='PCM Center Playback Volume',index=0
6772e69166STakashi Iwai-----------------------------------------
68*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from center PCM FX-bus accumulator.
69*13890a6aSOswald BuddenhagenALSA uses accumulator 6 for center PCM samples for 5.1 playback. The result
70*13890a6aSOswald Buddenhagensamples are forwarded to the center speaker.
7172e69166STakashi Iwai
7272e69166STakashi Iwainame='PCM LFE Playback Volume',index=0
7372e69166STakashi Iwai--------------------------------------
7472e69166STakashi IwaiThis control is used to attenuate sample for LFE PCM FX-bus accumulator.
75*13890a6aSOswald BuddenhagenALSA uses accumulator 7 for LFE PCM samples for 5.1 playback. The result
76*13890a6aSOswald Buddenhagensamples are forwarded to the subwoofer.
7772e69166STakashi Iwai
7872e69166STakashi Iwainame='PCM Playback Volume',index=0
7972e69166STakashi Iwai----------------------------------
80*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from left and right PCM FX-bus
8172e69166STakashi Iwaiaccumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples for
82*13890a6aSOswald Buddenhagenstereo playback. The result samples are forwarded to the front speakers.
8372e69166STakashi Iwai
8472e69166STakashi Iwainame='PCM Capture Volume',index=0
8572e69166STakashi Iwai---------------------------------
86*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from left and right PCM FX-bus
87*13890a6aSOswald Buddenhagenaccumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples for
88*13890a6aSOswald Buddenhagenstereo playback. The result is forwarded to the standard capture PCM device.
8972e69166STakashi Iwai
9072e69166STakashi Iwainame='Music Playback Volume',index=0
9172e69166STakashi Iwai------------------------------------
92*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from left and right MIDI FX-bus
9372e69166STakashi Iwaiaccumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples.
94*13890a6aSOswald BuddenhagenThe result samples are forwarded to the virtual stereo mixer.
9572e69166STakashi Iwai
9672e69166STakashi Iwainame='Music Capture Volume',index=0
9772e69166STakashi Iwai-----------------------------------
98*13890a6aSOswald BuddenhagenThese controls are used to attenuate samples from left and right MIDI FX-bus
99*13890a6aSOswald Buddenhagenaccumulator. ALSA uses accumulators 4 and 5 for left and right MIDI samples.
100*13890a6aSOswald BuddenhagenThe result is forwarded to the standard capture PCM device.
10172e69166STakashi Iwai
10272e69166STakashi Iwainame='Mic Playback Volume',index=0
10372e69166STakashi Iwai----------------------------------
104*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from left and right Mic input of
105*13890a6aSOswald Buddenhagenthe AC97 codec. The result samples are forwarded to the virtual stereo mixer.
10672e69166STakashi Iwai
10772e69166STakashi Iwainame='Mic Capture Volume',index=0
10872e69166STakashi Iwai---------------------------------
109*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from left and right Mic input of
110*13890a6aSOswald Buddenhagenthe AC97 codec. The result is forwarded to the standard capture PCM device.
111*13890a6aSOswald Buddenhagen
112*13890a6aSOswald BuddenhagenThe original samples are also forwarded to the Mic capture PCM device (device 1;
113*13890a6aSOswald Buddenhagen16bit/8KHz mono) without volume control.
11472e69166STakashi Iwai
11572e69166STakashi Iwainame='Audigy CD Playback Volume',index=0
11672e69166STakashi Iwai----------------------------------------
11772e69166STakashi IwaiThis control is used to attenuate samples from left and right IEC958 TTL
11872e69166STakashi Iwaidigital inputs (usually used by a CDROM drive). The result samples are
119*13890a6aSOswald Buddenhagenforwarded to the virtual stereo mixer.
12072e69166STakashi Iwai
12172e69166STakashi Iwainame='Audigy CD Capture Volume',index=0
12272e69166STakashi Iwai---------------------------------------
12372e69166STakashi IwaiThis control is used to attenuate samples from left and right IEC958 TTL
124*13890a6aSOswald Buddenhagendigital inputs (usually used by a CDROM drive). The result is forwarded
125*13890a6aSOswald Buddenhagento the standard capture PCM device.
12672e69166STakashi Iwai
12772e69166STakashi Iwainame='IEC958 Optical Playback Volume',index=0
12872e69166STakashi Iwai---------------------------------------------
12972e69166STakashi IwaiThis control is used to attenuate samples from left and right IEC958 optical
130*13890a6aSOswald Buddenhagendigital input. The result samples are forwarded to the virtual stereo mixer.
13172e69166STakashi Iwai
13272e69166STakashi Iwainame='IEC958 Optical Capture Volume',index=0
13372e69166STakashi Iwai--------------------------------------------
13472e69166STakashi IwaiThis control is used to attenuate samples from left and right IEC958 optical
135*13890a6aSOswald Buddenhagendigital inputs. The result is forwarded to the standard capture PCM device.
13672e69166STakashi Iwai
13772e69166STakashi Iwainame='Line2 Playback Volume',index=0
13872e69166STakashi Iwai------------------------------------
13972e69166STakashi IwaiThis control is used to attenuate samples from left and right I2S ADC
140*13890a6aSOswald Buddenhageninputs (on the AudigyDrive). The result samples are forwarded to the virtual
141*13890a6aSOswald Buddenhagenstereo mixer.
14272e69166STakashi Iwai
14372e69166STakashi Iwainame='Line2 Capture Volume',index=1
14472e69166STakashi Iwai-----------------------------------
14572e69166STakashi IwaiThis control is used to attenuate samples from left and right I2S ADC
146*13890a6aSOswald Buddenhageninputs (on the AudigyDrive). The result is forwarded to the standard capture
147*13890a6aSOswald BuddenhagenPCM device.
14872e69166STakashi Iwai
14972e69166STakashi Iwainame='Analog Mix Playback Volume',index=0
15072e69166STakashi Iwai-----------------------------------------
15172e69166STakashi IwaiThis control is used to attenuate samples from left and right I2S ADC
152*13890a6aSOswald Buddenhageninputs from Philips ADC. The result samples are forwarded to the virtual
153*13890a6aSOswald Buddenhagenstereo mixer. This contains mix from analog sources like CD, Line In, Aux, ....
15472e69166STakashi Iwai
15572e69166STakashi Iwainame='Analog Mix Capture Volume',index=1
15672e69166STakashi Iwai----------------------------------------
15772e69166STakashi IwaiThis control is used to attenuate samples from left and right I2S ADC
158*13890a6aSOswald Buddenhageninputs Philips ADC. The result is forwarded to the standard capture PCM device.
15972e69166STakashi Iwai
16072e69166STakashi Iwainame='Aux2 Playback Volume',index=0
16172e69166STakashi Iwai-----------------------------------
16272e69166STakashi IwaiThis control is used to attenuate samples from left and right I2S ADC
163*13890a6aSOswald Buddenhageninputs (on the AudigyDrive). The result samples are forwarded to the virtual
164*13890a6aSOswald Buddenhagenstereo mixer.
16572e69166STakashi Iwai
16672e69166STakashi Iwainame='Aux2 Capture Volume',index=1
16772e69166STakashi Iwai----------------------------------
16872e69166STakashi IwaiThis control is used to attenuate samples from left and right I2S ADC
169*13890a6aSOswald Buddenhageninputs (on the AudigyDrive). The result is forwarded to the standard capture
170*13890a6aSOswald BuddenhagenPCM device.
17172e69166STakashi Iwai
17272e69166STakashi Iwainame='Front Playback Volume',index=0
17372e69166STakashi Iwai------------------------------------
174*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from the virtual stereo mixer.
175*13890a6aSOswald BuddenhagenThe result samples are forwarded to the front speakers.
17672e69166STakashi Iwai
17772e69166STakashi Iwainame='Surround Playback Volume',index=0
17872e69166STakashi Iwai---------------------------------------
179*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from the virtual stereo mixer.
180*13890a6aSOswald BuddenhagenThe result samples are forwarded to the surround (rear) speakers.
181*13890a6aSOswald Buddenhagen
182*13890a6aSOswald Buddenhagenname='Side Playback Volume',index=0
183*13890a6aSOswald Buddenhagen-----------------------------------
184*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from the virtual stereo mixer.
185*13890a6aSOswald BuddenhagenThe result samples are forwarded to the side speakers.
18672e69166STakashi Iwai
18772e69166STakashi Iwainame='Center Playback Volume',index=0
18872e69166STakashi Iwai-------------------------------------
189*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from the virtual stereo mixer.
190*13890a6aSOswald BuddenhagenThe result samples are forwarded to the center speaker.
19172e69166STakashi Iwai
19272e69166STakashi Iwainame='LFE Playback Volume',index=0
19372e69166STakashi Iwai----------------------------------
194*13890a6aSOswald BuddenhagenThis control is used to attenuate samples from the virtual stereo mixer.
195*13890a6aSOswald BuddenhagenThe result samples are forwarded to the subwoofer.
19672e69166STakashi Iwai
19772e69166STakashi Iwainame='Tone Control - Switch',index=0
19872e69166STakashi Iwai------------------------------------
199*13890a6aSOswald BuddenhagenThis control turns the tone control on or off. The samples forwarded to
200*13890a6aSOswald Buddenhagenthe speaker outputs are affected.
20172e69166STakashi Iwai
20272e69166STakashi Iwainame='Tone Control - Bass',index=0
20372e69166STakashi Iwai----------------------------------
20472e69166STakashi IwaiThis control sets the bass intensity. There is no neutral value!!
20572e69166STakashi IwaiWhen the tone control code is activated, the samples are always modified.
20672e69166STakashi IwaiThe closest value to pure signal is 20.
20772e69166STakashi Iwai
20872e69166STakashi Iwainame='Tone Control - Treble',index=0
20972e69166STakashi Iwai------------------------------------
21072e69166STakashi IwaiThis control sets the treble intensity. There is no neutral value!!
21172e69166STakashi IwaiWhen the tone control code is activated, the samples are always modified.
21272e69166STakashi IwaiThe closest value to pure signal is 20.
21372e69166STakashi Iwai
21472e69166STakashi Iwainame='Master Playback Volume',index=0
21572e69166STakashi Iwai-------------------------------------
216*13890a6aSOswald BuddenhagenThis control is used to attenuate samples forwarded to the speaker outputs.
21772e69166STakashi Iwai
21872e69166STakashi Iwainame='IEC958 Optical Raw Playback Switch',index=0
21972e69166STakashi Iwai-------------------------------------------------
22072e69166STakashi IwaiIf this switch is on, then the samples for the IEC958 (S/PDIF) digital
221d3330cb8SOswald Buddenhagenoutput are taken only from the raw iec958 ALSA PCM device (which uses
222d3330cb8SOswald Buddenhagenaccumulators 20 and 21 for left and right PCM by default).
22372e69166STakashi Iwai
22472e69166STakashi Iwai
22572e69166STakashi IwaiPCM stream related controls
22672e69166STakashi Iwai===========================
22772e69166STakashi Iwai
22872e69166STakashi Iwainame='EMU10K1 PCM Volume',index 0-31
22972e69166STakashi Iwai------------------------------------
230bcdbd3b7SOswald BuddenhagenChannel volume attenuation in range 0-0x1fffd. The middle value (no
23172e69166STakashi Iwaiattenuation) is default. The channel mapping for three values is
23272e69166STakashi Iwaias follows:
23372e69166STakashi Iwai
23472e69166STakashi Iwai* 0 - mono, default 0xffff (no attenuation)
23572e69166STakashi Iwai* 1 - left, default 0xffff (no attenuation)
23672e69166STakashi Iwai* 2 - right, default 0xffff (no attenuation)
23772e69166STakashi Iwai
23872e69166STakashi Iwainame='EMU10K1 PCM Send Routing',index 0-31
23972e69166STakashi Iwai------------------------------------------
240d3330cb8SOswald BuddenhagenThis control specifies the destination - FX-bus accumulators. There are 24
241d3330cb8SOswald Buddenhagenvalues in this mapping:
24272e69166STakashi Iwai
24372e69166STakashi Iwai*  0 -  mono, A destination (FX-bus 0-63), default 0
24472e69166STakashi Iwai*  1 -  mono, B destination (FX-bus 0-63), default 1
24572e69166STakashi Iwai*  2 -  mono, C destination (FX-bus 0-63), default 2
24672e69166STakashi Iwai*  3 -  mono, D destination (FX-bus 0-63), default 3
247155e3d3bSOswald Buddenhagen*  4 -  mono, E destination (FX-bus 0-63), default 4
248155e3d3bSOswald Buddenhagen*  5 -  mono, F destination (FX-bus 0-63), default 5
249155e3d3bSOswald Buddenhagen*  6 -  mono, G destination (FX-bus 0-63), default 6
250155e3d3bSOswald Buddenhagen*  7 -  mono, H destination (FX-bus 0-63), default 7
25172e69166STakashi Iwai*  8 -  left, A destination (FX-bus 0-63), default 0
25272e69166STakashi Iwai*  9 -  left, B destination (FX-bus 0-63), default 1
25372e69166STakashi Iwai* 10 -  left, C destination (FX-bus 0-63), default 2
25472e69166STakashi Iwai* 11 -  left, D destination (FX-bus 0-63), default 3
255155e3d3bSOswald Buddenhagen* 12 -  left, E destination (FX-bus 0-63), default 4
256155e3d3bSOswald Buddenhagen* 13 -  left, F destination (FX-bus 0-63), default 5
257155e3d3bSOswald Buddenhagen* 14 -  left, G destination (FX-bus 0-63), default 6
258155e3d3bSOswald Buddenhagen* 15 -  left, H destination (FX-bus 0-63), default 7
25972e69166STakashi Iwai* 16 - right, A destination (FX-bus 0-63), default 0
26072e69166STakashi Iwai* 17 - right, B destination (FX-bus 0-63), default 1
26172e69166STakashi Iwai* 18 - right, C destination (FX-bus 0-63), default 2
26272e69166STakashi Iwai* 19 - right, D destination (FX-bus 0-63), default 3
263155e3d3bSOswald Buddenhagen* 20 - right, E destination (FX-bus 0-63), default 4
264155e3d3bSOswald Buddenhagen* 21 - right, F destination (FX-bus 0-63), default 5
265155e3d3bSOswald Buddenhagen* 22 - right, G destination (FX-bus 0-63), default 6
266155e3d3bSOswald Buddenhagen* 23 - right, H destination (FX-bus 0-63), default 7
26772e69166STakashi Iwai
26872e69166STakashi IwaiDon't forget that it's illegal to assign a channel to the same FX-bus accumulator
26972e69166STakashi Iwaimore than once (it means 0=0 && 1=0 is an invalid combination).
27072e69166STakashi Iwai
27172e69166STakashi Iwainame='EMU10K1 PCM Send Volume',index 0-31
27272e69166STakashi Iwai-----------------------------------------
27372e69166STakashi IwaiIt specifies the attenuation (amount) for given destination in range 0-255.
27472e69166STakashi IwaiThe channel mapping is following:
27572e69166STakashi Iwai
27672e69166STakashi Iwai*  0 -  mono, A destination attn, default 255 (no attenuation)
27772e69166STakashi Iwai*  1 -  mono, B destination attn, default 255 (no attenuation)
27872e69166STakashi Iwai*  2 -  mono, C destination attn, default 0 (mute)
27972e69166STakashi Iwai*  3 -  mono, D destination attn, default 0 (mute)
28072e69166STakashi Iwai*  4 -  mono, E destination attn, default 0 (mute)
28172e69166STakashi Iwai*  5 -  mono, F destination attn, default 0 (mute)
28272e69166STakashi Iwai*  6 -  mono, G destination attn, default 0 (mute)
28372e69166STakashi Iwai*  7 -  mono, H destination attn, default 0 (mute)
28472e69166STakashi Iwai*  8 -  left, A destination attn, default 255 (no attenuation)
28572e69166STakashi Iwai*  9 -  left, B destination attn, default 0 (mute)
28672e69166STakashi Iwai* 10 -  left, C destination attn, default 0 (mute)
28772e69166STakashi Iwai* 11 -  left, D destination attn, default 0 (mute)
28872e69166STakashi Iwai* 12 -  left, E destination attn, default 0 (mute)
28972e69166STakashi Iwai* 13 -  left, F destination attn, default 0 (mute)
29072e69166STakashi Iwai* 14 -  left, G destination attn, default 0 (mute)
29172e69166STakashi Iwai* 15 -  left, H destination attn, default 0 (mute)
29272e69166STakashi Iwai* 16 - right, A destination attn, default 0 (mute)
29372e69166STakashi Iwai* 17 - right, B destination attn, default 255 (no attenuation)
29472e69166STakashi Iwai* 18 - right, C destination attn, default 0 (mute)
29572e69166STakashi Iwai* 19 - right, D destination attn, default 0 (mute)
29672e69166STakashi Iwai* 20 - right, E destination attn, default 0 (mute)
29772e69166STakashi Iwai* 21 - right, F destination attn, default 0 (mute)
29872e69166STakashi Iwai* 22 - right, G destination attn, default 0 (mute)
29972e69166STakashi Iwai* 23 - right, H destination attn, default 0 (mute)
30072e69166STakashi Iwai
30172e69166STakashi Iwai
30272e69166STakashi Iwai
30372e69166STakashi IwaiMANUALS/PATENTS
30472e69166STakashi Iwai===============
30572e69166STakashi Iwai
306d945ef36SOswald BuddenhagenSee sb-live-mixer.rst.
307