Back to home page

OSCL-LXR

 
 

    


0001 =============================================
0002 Sound Blaster Audigy mixer / default DSP code
0003 =============================================
0004 
0005 This is based on sb-live-mixer.rst.
0006 
0007 The EMU10K2 chips have a DSP part which can be programmed to support 
0008 various ways of sample processing, which is described here.
0009 (This article does not deal with the overall functionality of the 
0010 EMU10K2 chips. See the manuals section for further details.)
0011 
0012 The ALSA driver programs this portion of chip by default code
0013 (can be altered later) which offers the following functionality:
0014 
0015 
0016 Digital mixer controls
0017 ======================
0018 
0019 These controls are built using the DSP instructions. They offer extended
0020 functionality. Only the default build-in code in the ALSA driver is described
0021 here. Note that the controls work as attenuators: the maximum value is the 
0022 neutral position leaving the signal unchanged. Note that if the  same destination 
0023 is mentioned in multiple controls, the signal is accumulated and can be wrapped 
0024 (set to maximal or minimal value without checking of overflow).
0025 
0026 
0027 Explanation of used abbreviations:
0028 
0029 DAC
0030         digital to analog converter
0031 ADC
0032         analog to digital converter
0033 I2S
0034         one-way three wire serial bus for digital sound by Philips Semiconductors
0035         (this standard is used for connecting standalone DAC and ADC converters)
0036 LFE
0037         low frequency effects (subwoofer signal)
0038 AC97
0039         a chip containing an analog mixer, DAC and ADC converters
0040 IEC958
0041         S/PDIF
0042 FX-bus
0043         the EMU10K2 chip has an effect bus containing 64 accumulators.
0044         Each of the synthesizer voices can feed its output to these accumulators
0045         and the DSP microcontroller can operate with the resulting sum.
0046 
0047 name='PCM Front Playback Volume',index=0
0048 ----------------------------------------
0049 This control is used to attenuate samples for left and right front PCM FX-bus
0050 accumulators. ALSA uses accumulators 8 and 9 for left and right front PCM 
0051 samples for 5.1 playback. The result samples are forwarded to the front DAC PCM 
0052 slots of the Philips DAC.
0053 
0054 name='PCM Surround Playback Volume',index=0
0055 -------------------------------------------
0056 This control is used to attenuate samples for left and right surround PCM FX-bus
0057 accumulators. ALSA uses accumulators 2 and 3 for left and right surround PCM 
0058 samples for 5.1 playback. The result samples are forwarded to the surround DAC PCM 
0059 slots of the Philips DAC.
0060 
0061 name='PCM Center Playback Volume',index=0
0062 -----------------------------------------
0063 This control is used to attenuate samples for center PCM FX-bus accumulator.
0064 ALSA uses accumulator 6 for center PCM sample for 5.1 playback. The result sample
0065 is forwarded to the center DAC PCM slot of the Philips DAC.
0066 
0067 name='PCM LFE Playback Volume',index=0
0068 --------------------------------------
0069 This control is used to attenuate sample for LFE PCM FX-bus accumulator. 
0070 ALSA uses accumulator 7 for LFE PCM sample for 5.1 playback. The result sample 
0071 is forwarded to the LFE DAC PCM slot of the Philips DAC.
0072 
0073 name='PCM Playback Volume',index=0
0074 ----------------------------------
0075 This control is used to attenuate samples for left and right PCM FX-bus
0076 accumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples for
0077 stereo playback. The result samples are forwarded to the front DAC PCM slots 
0078 of the Philips DAC.
0079 
0080 name='PCM Capture Volume',index=0
0081 ---------------------------------
0082 This control is used to attenuate samples for left and right PCM FX-bus
0083 accumulator. ALSA uses accumulators 0 and 1 for left and right PCM.
0084 The result is forwarded to the ADC capture FIFO (thus to the standard capture
0085 PCM device).
0086 
0087 name='Music Playback Volume',index=0
0088 ------------------------------------
0089 This control is used to attenuate samples for left and right MIDI FX-bus
0090 accumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples.
0091 The result samples are forwarded to the front DAC PCM slots of the AC97 codec.
0092 
0093 name='Music Capture Volume',index=0
0094 -----------------------------------
0095 These controls are used to attenuate samples for left and right MIDI FX-bus
0096 accumulator. ALSA uses accumulators 4 and 5 for left and right PCM.
0097 The result is forwarded to the ADC capture FIFO (thus to the standard capture
0098 PCM device).
0099 
0100 name='Mic Playback Volume',index=0
0101 ----------------------------------
0102 This control is used to attenuate samples for left and right Mic input.
0103 For Mic input is used AC97 codec. The result samples are forwarded to 
0104 the front DAC PCM slots of the Philips DAC. Samples are forwarded to Mic
0105 capture FIFO (device 1 - 16bit/8KHz mono) too without volume control.
0106 
0107 name='Mic Capture Volume',index=0
0108 ---------------------------------
0109 This control is used to attenuate samples for left and right Mic input.
0110 The result is forwarded to the ADC capture FIFO (thus to the standard capture
0111 PCM device).
0112 
0113 name='Audigy CD Playback Volume',index=0
0114 ----------------------------------------
0115 This control is used to attenuate samples from left and right IEC958 TTL
0116 digital inputs (usually used by a CDROM drive). The result samples are
0117 forwarded to the front DAC PCM slots of the Philips DAC.
0118 
0119 name='Audigy CD Capture Volume',index=0
0120 ---------------------------------------
0121 This control is used to attenuate samples from left and right IEC958 TTL
0122 digital inputs (usually used by a CDROM drive). The result samples are
0123 forwarded to the ADC capture FIFO (thus to the standard capture PCM device).
0124 
0125 name='IEC958 Optical Playback Volume',index=0
0126 ---------------------------------------------
0127 This control is used to attenuate samples from left and right IEC958 optical
0128 digital input. The result samples are forwarded to the front DAC PCM slots
0129 of the Philips DAC.
0130 
0131 name='IEC958 Optical Capture Volume',index=0
0132 --------------------------------------------
0133 This control is used to attenuate samples from left and right IEC958 optical
0134 digital inputs. The result samples are forwarded to the ADC capture FIFO
0135 (thus to the standard capture PCM device).
0136 
0137 name='Line2 Playback Volume',index=0
0138 ------------------------------------
0139 This control is used to attenuate samples from left and right I2S ADC
0140 inputs (on the AudigyDrive). The result samples are forwarded to the front
0141 DAC PCM slots of the Philips DAC.
0142 
0143 name='Line2 Capture Volume',index=1
0144 -----------------------------------
0145 This control is used to attenuate samples from left and right I2S ADC
0146 inputs (on the AudigyDrive). The result samples are forwarded to the ADC
0147 capture FIFO (thus to the standard capture PCM device).
0148 
0149 name='Analog Mix Playback Volume',index=0
0150 -----------------------------------------
0151 This control is used to attenuate samples from left and right I2S ADC
0152 inputs from Philips ADC. The result samples are forwarded to the front
0153 DAC PCM slots of the Philips DAC. This contains mix from analog sources
0154 like CD, Line In, Aux, ....
0155 
0156 name='Analog Mix Capture Volume',index=1
0157 ----------------------------------------
0158 This control is used to attenuate samples from left and right I2S ADC
0159 inputs Philips ADC. The result samples are forwarded to the ADC
0160 capture FIFO (thus to the standard capture PCM device).
0161 
0162 name='Aux2 Playback Volume',index=0
0163 -----------------------------------
0164 This control is used to attenuate samples from left and right I2S ADC
0165 inputs (on the AudigyDrive). The result samples are forwarded to the front
0166 DAC PCM slots of the Philips DAC.
0167 
0168 name='Aux2 Capture Volume',index=1
0169 ----------------------------------
0170 This control is used to attenuate samples from left and right I2S ADC
0171 inputs (on the AudigyDrive). The result samples are forwarded to the ADC
0172 capture FIFO (thus to the standard capture PCM device).
0173 
0174 name='Front Playback Volume',index=0
0175 ------------------------------------
0176 All stereo signals are mixed together and mirrored to surround, center and LFE.
0177 This control is used to attenuate samples for left and right front speakers of
0178 this mix.
0179 
0180 name='Surround Playback Volume',index=0
0181 ---------------------------------------
0182 All stereo signals are mixed together and mirrored to surround, center and LFE.
0183 This control is used to attenuate samples for left and right surround speakers of
0184 this mix.
0185 
0186 name='Center Playback Volume',index=0
0187 -------------------------------------
0188 All stereo signals are mixed together and mirrored to surround, center and LFE.
0189 This control is used to attenuate sample for center speaker of this mix.
0190 
0191 name='LFE Playback Volume',index=0
0192 ----------------------------------
0193 All stereo signals are mixed together and mirrored to surround, center and LFE.
0194 This control is used to attenuate sample for LFE speaker of this mix.
0195 
0196 name='Tone Control - Switch',index=0
0197 ------------------------------------
0198 This control turns the tone control on or off. The samples for front, rear
0199 and center / LFE outputs are affected.
0200 
0201 name='Tone Control - Bass',index=0
0202 ----------------------------------
0203 This control sets the bass intensity. There is no neutral value!!
0204 When the tone control code is activated, the samples are always modified.
0205 The closest value to pure signal is 20.
0206 
0207 name='Tone Control - Treble',index=0
0208 ------------------------------------
0209 This control sets the treble intensity. There is no neutral value!!
0210 When the tone control code is activated, the samples are always modified.
0211 The closest value to pure signal is 20.
0212 
0213 name='Master Playback Volume',index=0
0214 -------------------------------------
0215 This control is used to attenuate samples for front, surround, center and 
0216 LFE outputs.
0217 
0218 name='IEC958 Optical Raw Playback Switch',index=0
0219 -------------------------------------------------
0220 If this switch is on, then the samples for the IEC958 (S/PDIF) digital
0221 output are taken only from the raw FX8010 PCM, otherwise standard front
0222 PCM samples are taken.
0223 
0224 
0225 PCM stream related controls
0226 ===========================
0227 
0228 name='EMU10K1 PCM Volume',index 0-31
0229 ------------------------------------
0230 Channel volume attenuation in range 0-0xffff. The maximum value (no
0231 attenuation) is default. The channel mapping for three values is
0232 as follows:
0233 
0234 * 0 - mono, default 0xffff (no attenuation)
0235 * 1 - left, default 0xffff (no attenuation)
0236 * 2 - right, default 0xffff (no attenuation)
0237 
0238 name='EMU10K1 PCM Send Routing',index 0-31
0239 ------------------------------------------
0240 This control specifies the destination - FX-bus accumulators. There 24
0241 values with this mapping:
0242 
0243 * 0 -  mono, A destination (FX-bus 0-63), default 0
0244 * 1 -  mono, B destination (FX-bus 0-63), default 1
0245 * 2 -  mono, C destination (FX-bus 0-63), default 2
0246 * 3 -  mono, D destination (FX-bus 0-63), default 3
0247 * 4 -  mono, E destination (FX-bus 0-63), default 0
0248 * 5 -  mono, F destination (FX-bus 0-63), default 0
0249 * 6 -  mono, G destination (FX-bus 0-63), default 0
0250 * 7 -  mono, H destination (FX-bus 0-63), default 0
0251 * 8 -  left, A destination (FX-bus 0-63), default 0
0252 * 9 -  left, B destination (FX-bus 0-63), default 1
0253 * 10 -  left, C destination (FX-bus 0-63), default 2
0254 * 11 -  left, D destination (FX-bus 0-63), default 3
0255 * 12 -  left, E destination (FX-bus 0-63), default 0
0256 * 13 -  left, F destination (FX-bus 0-63), default 0
0257 * 14 -  left, G destination (FX-bus 0-63), default 0
0258 * 15 -  left, H destination (FX-bus 0-63), default 0
0259 * 16 - right, A destination (FX-bus 0-63), default 0
0260 * 17 - right, B destination (FX-bus 0-63), default 1
0261 * 18 - right, C destination (FX-bus 0-63), default 2
0262 * 19 - right, D destination (FX-bus 0-63), default 3
0263 * 20 - right, E destination (FX-bus 0-63), default 0
0264 * 21 - right, F destination (FX-bus 0-63), default 0
0265 * 22 - right, G destination (FX-bus 0-63), default 0
0266 * 23 - right, H destination (FX-bus 0-63), default 0
0267 
0268 Don't forget that it's illegal to assign a channel to the same FX-bus accumulator 
0269 more than once (it means 0=0 && 1=0 is an invalid combination).
0270  
0271 name='EMU10K1 PCM Send Volume',index 0-31
0272 -----------------------------------------
0273 It specifies the attenuation (amount) for given destination in range 0-255.
0274 The channel mapping is following:
0275 
0276 *  0 -  mono, A destination attn, default 255 (no attenuation)
0277 *  1 -  mono, B destination attn, default 255 (no attenuation)
0278 *  2 -  mono, C destination attn, default 0 (mute)
0279 *  3 -  mono, D destination attn, default 0 (mute)
0280 *  4 -  mono, E destination attn, default 0 (mute)
0281 *  5 -  mono, F destination attn, default 0 (mute)
0282 *  6 -  mono, G destination attn, default 0 (mute)
0283 *  7 -  mono, H destination attn, default 0 (mute)
0284 *  8 -  left, A destination attn, default 255 (no attenuation)
0285 *  9 -  left, B destination attn, default 0 (mute)
0286 * 10 -  left, C destination attn, default 0 (mute)
0287 * 11 -  left, D destination attn, default 0 (mute)
0288 * 12 -  left, E destination attn, default 0 (mute)
0289 * 13 -  left, F destination attn, default 0 (mute)
0290 * 14 -  left, G destination attn, default 0 (mute)
0291 * 15 -  left, H destination attn, default 0 (mute)
0292 * 16 - right, A destination attn, default 0 (mute)
0293 * 17 - right, B destination attn, default 255 (no attenuation)
0294 * 18 - right, C destination attn, default 0 (mute)
0295 * 19 - right, D destination attn, default 0 (mute)
0296 * 20 - right, E destination attn, default 0 (mute)
0297 * 21 - right, F destination attn, default 0 (mute)
0298 * 22 - right, G destination attn, default 0 (mute)
0299 * 23 - right, H destination attn, default 0 (mute)
0300 
0301 
0302 
0303 MANUALS/PATENTS
0304 ===============
0305 
0306 ftp://opensource.creative.com/pub/doc
0307 -------------------------------------
0308 
0309 LM4545.pdf
0310         AC97 Codec
0311 
0312 m2049.pdf
0313         The EMU10K1 Digital Audio Processor
0314 
0315 hog63.ps
0316         FX8010 - A DSP Chip Architecture for Audio Effects
0317 
0318 
0319 WIPO Patents
0320 ------------
0321 
0322 WO 9901813 (A1)
0323         Audio Effects Processor with multiple asynchronous streams
0324         (Jan. 14, 1999)
0325 
0326 WO 9901814 (A1)
0327         Processor with Instruction Set for Audio Effects (Jan. 14, 1999)
0328 
0329 WO 9901953 (A1)
0330         Audio Effects Processor having Decoupled Instruction
0331         Execution and Audio Data Sequencing (Jan. 14, 1999)
0332 
0333 
0334 US Patents (https://www.uspto.gov/)
0335 -----------------------------------
0336 
0337 US 5925841
0338         Digital Sampling Instrument employing cache memory (Jul. 20, 1999)
0339 
0340 US 5928342
0341         Audio Effects Processor integrated on a single chip
0342         with a multiport memory onto which multiple asynchronous
0343         digital sound samples can be concurrently loaded
0344         (Jul. 27, 1999)
0345 
0346 US 5930158
0347         Processor with Instruction Set for Audio Effects (Jul. 27, 1999)
0348 
0349 US 6032235
0350         Memory initialization circuit (Tram) (Feb. 29, 2000)
0351 
0352 US 6138207
0353         Interpolation looping of audio samples in cache connected to
0354         system bus with prioritization and modification of bus transfers
0355         in accordance with loop ends and minimum block sizes
0356         (Oct. 24, 2000)
0357 
0358 US 6151670
0359         Method for conserving memory storage using a
0360         pool of  short term memory registers
0361         (Nov. 21, 2000)
0362 
0363 US 6195715
0364         Interrupt control for multiple programs communicating with
0365         a common interrupt by associating programs to GP registers,
0366         defining interrupt register, polling GP registers, and invoking
0367         callback routine associated with defined interrupt register
0368         (Feb. 27, 2001)