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---------------------------------------- 4972e69166STakashi IwaiThis control is used to attenuate samples for left and right front PCM FX-bus 5072e69166STakashi Iwaiaccumulators. ALSA uses accumulators 8 and 9 for left and right front PCM 5172e69166STakashi Iwaisamples for 5.1 playback. The result samples are forwarded to the front DAC PCM 5272e69166STakashi Iwaislots of the Philips DAC. 5372e69166STakashi Iwai 5472e69166STakashi Iwainame='PCM Surround Playback Volume',index=0 5572e69166STakashi Iwai------------------------------------------- 5672e69166STakashi IwaiThis control is used to attenuate samples for left and right surround PCM FX-bus 5772e69166STakashi Iwaiaccumulators. ALSA uses accumulators 2 and 3 for left and right surround PCM 5872e69166STakashi Iwaisamples for 5.1 playback. The result samples are forwarded to the surround DAC PCM 5972e69166STakashi Iwaislots of the Philips DAC. 6072e69166STakashi Iwai 6172e69166STakashi Iwainame='PCM Center Playback Volume',index=0 6272e69166STakashi Iwai----------------------------------------- 6372e69166STakashi IwaiThis control is used to attenuate samples for center PCM FX-bus accumulator. 6472e69166STakashi IwaiALSA uses accumulator 6 for center PCM sample for 5.1 playback. The result sample 6572e69166STakashi Iwaiis forwarded to the center DAC PCM slot of the Philips DAC. 6672e69166STakashi Iwai 6772e69166STakashi Iwainame='PCM LFE Playback Volume',index=0 6872e69166STakashi Iwai-------------------------------------- 6972e69166STakashi IwaiThis control is used to attenuate sample for LFE PCM FX-bus accumulator. 7072e69166STakashi IwaiALSA uses accumulator 7 for LFE PCM sample for 5.1 playback. The result sample 7172e69166STakashi Iwaiis forwarded to the LFE DAC PCM slot of the Philips DAC. 7272e69166STakashi Iwai 7372e69166STakashi Iwainame='PCM Playback Volume',index=0 7472e69166STakashi Iwai---------------------------------- 7572e69166STakashi IwaiThis control is used to attenuate samples for left and right PCM FX-bus 7672e69166STakashi Iwaiaccumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples for 7772e69166STakashi Iwaistereo playback. The result samples are forwarded to the front DAC PCM slots 7872e69166STakashi Iwaiof the Philips DAC. 7972e69166STakashi Iwai 8072e69166STakashi Iwainame='PCM Capture Volume',index=0 8172e69166STakashi Iwai--------------------------------- 8272e69166STakashi IwaiThis control is used to attenuate samples for left and right PCM FX-bus 8372e69166STakashi Iwaiaccumulator. ALSA uses accumulators 0 and 1 for left and right PCM. 8472e69166STakashi IwaiThe result is forwarded to the ADC capture FIFO (thus to the standard capture 8572e69166STakashi IwaiPCM device). 8672e69166STakashi Iwai 8772e69166STakashi Iwainame='Music Playback Volume',index=0 8872e69166STakashi Iwai------------------------------------ 8972e69166STakashi IwaiThis control is used to attenuate samples for left and right MIDI FX-bus 9072e69166STakashi Iwaiaccumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples. 9172e69166STakashi IwaiThe result samples are forwarded to the front DAC PCM slots of the AC97 codec. 9272e69166STakashi Iwai 9372e69166STakashi Iwainame='Music Capture Volume',index=0 9472e69166STakashi Iwai----------------------------------- 9572e69166STakashi IwaiThese controls are used to attenuate samples for left and right MIDI FX-bus 9672e69166STakashi Iwaiaccumulator. ALSA uses accumulators 4 and 5 for left and right PCM. 9772e69166STakashi IwaiThe result is forwarded to the ADC capture FIFO (thus to the standard capture 9872e69166STakashi IwaiPCM device). 9972e69166STakashi Iwai 10072e69166STakashi Iwainame='Mic Playback Volume',index=0 10172e69166STakashi Iwai---------------------------------- 10272e69166STakashi IwaiThis control is used to attenuate samples for left and right Mic input. 10372e69166STakashi IwaiFor Mic input is used AC97 codec. The result samples are forwarded to 10472e69166STakashi Iwaithe front DAC PCM slots of the Philips DAC. Samples are forwarded to Mic 10572e69166STakashi Iwaicapture FIFO (device 1 - 16bit/8KHz mono) too without volume control. 10672e69166STakashi Iwai 10772e69166STakashi Iwainame='Mic Capture Volume',index=0 10872e69166STakashi Iwai--------------------------------- 10972e69166STakashi IwaiThis control is used to attenuate samples for left and right Mic input. 11072e69166STakashi IwaiThe result is forwarded to the ADC capture FIFO (thus to the standard capture 11172e69166STakashi IwaiPCM device). 11272e69166STakashi Iwai 11372e69166STakashi Iwainame='Audigy CD Playback Volume',index=0 11472e69166STakashi Iwai---------------------------------------- 11572e69166STakashi IwaiThis control is used to attenuate samples from left and right IEC958 TTL 11672e69166STakashi Iwaidigital inputs (usually used by a CDROM drive). The result samples are 11772e69166STakashi Iwaiforwarded to the front DAC PCM slots of the Philips DAC. 11872e69166STakashi Iwai 11972e69166STakashi Iwainame='Audigy CD Capture Volume',index=0 12072e69166STakashi Iwai--------------------------------------- 12172e69166STakashi IwaiThis control is used to attenuate samples from left and right IEC958 TTL 12272e69166STakashi Iwaidigital inputs (usually used by a CDROM drive). The result samples are 12372e69166STakashi Iwaiforwarded to the ADC capture FIFO (thus to the standard capture PCM device). 12472e69166STakashi Iwai 12572e69166STakashi Iwainame='IEC958 Optical Playback Volume',index=0 12672e69166STakashi Iwai--------------------------------------------- 12772e69166STakashi IwaiThis control is used to attenuate samples from left and right IEC958 optical 12872e69166STakashi Iwaidigital input. The result samples are forwarded to the front DAC PCM slots 12972e69166STakashi Iwaiof the Philips DAC. 13072e69166STakashi Iwai 13172e69166STakashi Iwainame='IEC958 Optical Capture Volume',index=0 13272e69166STakashi Iwai-------------------------------------------- 13372e69166STakashi IwaiThis control is used to attenuate samples from left and right IEC958 optical 13472e69166STakashi Iwaidigital inputs. The result samples are forwarded to the ADC capture FIFO 13572e69166STakashi Iwai(thus 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 14072e69166STakashi Iwaiinputs (on the AudigyDrive). The result samples are forwarded to the front 14172e69166STakashi IwaiDAC PCM slots of the Philips DAC. 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 14672e69166STakashi Iwaiinputs (on the AudigyDrive). The result samples are forwarded to the ADC 14772e69166STakashi Iwaicapture FIFO (thus to the standard capture PCM 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 15272e69166STakashi Iwaiinputs from Philips ADC. The result samples are forwarded to the front 15372e69166STakashi IwaiDAC PCM slots of the Philips DAC. This contains mix from analog sources 15472e69166STakashi Iwailike CD, Line In, Aux, .... 15572e69166STakashi Iwai 15672e69166STakashi Iwainame='Analog Mix Capture Volume',index=1 15772e69166STakashi Iwai---------------------------------------- 15872e69166STakashi IwaiThis control is used to attenuate samples from left and right I2S ADC 15972e69166STakashi Iwaiinputs Philips ADC. The result samples are forwarded to the ADC 16072e69166STakashi Iwaicapture FIFO (thus to the standard capture PCM device). 16172e69166STakashi Iwai 16272e69166STakashi Iwainame='Aux2 Playback Volume',index=0 16372e69166STakashi Iwai----------------------------------- 16472e69166STakashi IwaiThis control is used to attenuate samples from left and right I2S ADC 16572e69166STakashi Iwaiinputs (on the AudigyDrive). The result samples are forwarded to the front 16672e69166STakashi IwaiDAC PCM slots of the Philips DAC. 16772e69166STakashi Iwai 16872e69166STakashi Iwainame='Aux2 Capture Volume',index=1 16972e69166STakashi Iwai---------------------------------- 17072e69166STakashi IwaiThis control is used to attenuate samples from left and right I2S ADC 17172e69166STakashi Iwaiinputs (on the AudigyDrive). The result samples are forwarded to the ADC 17272e69166STakashi Iwaicapture FIFO (thus to the standard capture PCM device). 17372e69166STakashi Iwai 17472e69166STakashi Iwainame='Front Playback Volume',index=0 17572e69166STakashi Iwai------------------------------------ 17672e69166STakashi IwaiAll stereo signals are mixed together and mirrored to surround, center and LFE. 17772e69166STakashi IwaiThis control is used to attenuate samples for left and right front speakers of 17872e69166STakashi Iwaithis mix. 17972e69166STakashi Iwai 18072e69166STakashi Iwainame='Surround Playback Volume',index=0 18172e69166STakashi Iwai--------------------------------------- 18272e69166STakashi IwaiAll stereo signals are mixed together and mirrored to surround, center and LFE. 18372e69166STakashi IwaiThis control is used to attenuate samples for left and right surround speakers of 18472e69166STakashi Iwaithis mix. 18572e69166STakashi Iwai 18672e69166STakashi Iwainame='Center Playback Volume',index=0 18772e69166STakashi Iwai------------------------------------- 18872e69166STakashi IwaiAll stereo signals are mixed together and mirrored to surround, center and LFE. 18972e69166STakashi IwaiThis control is used to attenuate sample for center speaker of this mix. 19072e69166STakashi Iwai 19172e69166STakashi Iwainame='LFE Playback Volume',index=0 19272e69166STakashi Iwai---------------------------------- 19372e69166STakashi IwaiAll stereo signals are mixed together and mirrored to surround, center and LFE. 19472e69166STakashi IwaiThis control is used to attenuate sample for LFE speaker of this mix. 19572e69166STakashi Iwai 19672e69166STakashi Iwainame='Tone Control - Switch',index=0 19772e69166STakashi Iwai------------------------------------ 19872e69166STakashi IwaiThis control turns the tone control on or off. The samples for front, rear 19972e69166STakashi Iwaiand center / LFE outputs are affected. 20072e69166STakashi Iwai 20172e69166STakashi Iwainame='Tone Control - Bass',index=0 20272e69166STakashi Iwai---------------------------------- 20372e69166STakashi IwaiThis control sets the bass intensity. There is no neutral value!! 20472e69166STakashi IwaiWhen the tone control code is activated, the samples are always modified. 20572e69166STakashi IwaiThe closest value to pure signal is 20. 20672e69166STakashi Iwai 20772e69166STakashi Iwainame='Tone Control - Treble',index=0 20872e69166STakashi Iwai------------------------------------ 20972e69166STakashi IwaiThis control sets the treble intensity. There is no neutral value!! 21072e69166STakashi IwaiWhen the tone control code is activated, the samples are always modified. 21172e69166STakashi IwaiThe closest value to pure signal is 20. 21272e69166STakashi Iwai 21372e69166STakashi Iwainame='Master Playback Volume',index=0 21472e69166STakashi Iwai------------------------------------- 21572e69166STakashi IwaiThis control is used to attenuate samples for front, surround, center and 21672e69166STakashi IwaiLFE 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 306*d945ef36SOswald BuddenhagenSee sb-live-mixer.rst. 307