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