brintos

brintos / linux-shallow public Read only

0
0
Text · 15.4 KiB · 27667f5 Raw
377 lines · plain
1===========================================2Sound Blaster Live mixer / default DSP code3===========================================4 5 6The EMU10K1 chips have a DSP part which can be programmed to support7various ways of sample processing, which is described here.8(This article does not deal with the overall functionality of the 9EMU10K1 chips. See the manuals section for further details.)10 11The ALSA driver programs this portion of chip by default code12(can be altered later) which offers the following functionality:13 14 15IEC958 (S/PDIF) raw PCM16=======================17 18This PCM device (it's the 3rd PCM device (index 2!) and first subdevice19(index 0) for a given card) allows to forward 48kHz, stereo, 16-bit20little endian streams without any modifications to the digital output21(coaxial or optical). The universal interface allows the creation of up22to 8 raw PCM devices operating at 48kHz, 16-bit little endian. It would23be easy to add support for multichannel devices to the current code,24but the conversion routines exist only for stereo (2-channel streams)25at the time. 26 27Look to tram_poke routines in lowlevel/emu10k1/emufx.c for more details.28 29 30Digital mixer controls31======================32 33These controls are built using the DSP instructions. They offer extended34functionality. Only the default built-in code in the ALSA driver is described35here. Note that the controls work as attenuators: the maximum value is the 36neutral position leaving the signal unchanged. Note that if the same destination37is mentioned in multiple controls, the signal is accumulated and can be clipped38(set to maximal or minimal value without checking for overflow).39 40 41Explanation of used abbreviations:42 43DAC44	digital to analog converter45ADC46	analog to digital converter47I2S48	one-way three wire serial bus for digital sound by Philips Semiconductors49	(this standard is used for connecting standalone D/A and A/D converters)50LFE51	low frequency effects (used as subwoofer signal)52AC9753	a chip containing an analog mixer, D/A and A/D converters54IEC95855	S/PDIF56FX-bus57	the EMU10K1 chip has an effect bus containing 16 accumulators.58	Each of the synthesizer voices can feed its output to these accumulators59	and the DSP microcontroller can operate with the resulting sum.60 61 62``name='Wave Playback Volume',index=0``63---------------------------------------64This control is used to attenuate samples from left and right PCM FX-bus65accumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples.66The result samples are forwarded to the front DAC PCM slots of the AC97 codec.67 68``name='Wave Surround Playback Volume',index=0``69------------------------------------------------70This control is used to attenuate samples from left and right PCM FX-bus71accumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples.72The result samples are forwarded to the rear I2S DACs. These DACs operates73separately (they are not inside the AC97 codec).74 75``name='Wave Center Playback Volume',index=0``76----------------------------------------------77This control is used to attenuate samples from left and right PCM FX-bus78accumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples.79The result is mixed to mono signal (single channel) and forwarded to80the ??rear?? right DAC PCM slot of the AC97 codec.81 82``name='Wave LFE Playback Volume',index=0``83-------------------------------------------84This control is used to attenuate samples from left and right PCM FX-bus85accumulators. ALSA uses accumulators 0 and 1 for left and right PCM.86The result is mixed to mono signal (single channel) and forwarded to87the ??rear?? left DAC PCM slot of the AC97 codec.88 89``name='Wave Capture Volume',index=0``, ``name='Wave Capture Switch',index=0``90------------------------------------------------------------------------------91These controls are used to attenuate samples from left and right PCM FX-bus92accumulator. ALSA uses accumulators 0 and 1 for left and right PCM.93The result is forwarded to the ADC capture FIFO (thus to the standard capture94PCM device).95 96``name='Synth Playback Volume',index=0``97----------------------------------------98This control is used to attenuate samples from left and right MIDI FX-bus99accumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples.100The result samples are forwarded to the front DAC PCM slots of the AC97 codec.101 102``name='Synth Capture Volume',index=0``, ``name='Synth Capture Switch',index=0``103--------------------------------------------------------------------------------104These controls are used to attenuate samples from left and right MIDI FX-bus105accumulator. ALSA uses accumulators 4 and 5 for left and right MIDI samples.106The result is forwarded to the ADC capture FIFO (thus to the standard capture107PCM device).108 109``name='Surround Playback Volume',index=0``110-------------------------------------------111This control is used to attenuate samples from left and right rear PCM FX-bus112accumulators. ALSA uses accumulators 2 and 3 for left and right rear PCM samples.113The result samples are forwarded to the rear I2S DACs. These DACs operate114separately (they are not inside the AC97 codec).115 116``name='Surround Capture Volume',index=0``, ``name='Surround Capture Switch',index=0``117--------------------------------------------------------------------------------------118These controls are used to attenuate samples from left and right rear PCM FX-bus119accumulators. ALSA uses accumulators 2 and 3 for left and right rear PCM samples.120The result is forwarded to the ADC capture FIFO (thus to the standard capture121PCM device).122 123``name='Center Playback Volume',index=0``124-----------------------------------------125This control is used to attenuate sample for center PCM FX-bus accumulator.126ALSA uses accumulator 6 for center PCM sample. The result sample is forwarded127to the ??rear?? right DAC PCM slot of the AC97 codec.128 129``name='LFE Playback Volume',index=0``130--------------------------------------131This control is used to attenuate sample for center PCM FX-bus accumulator.132ALSA uses accumulator 6 for center PCM sample. The result sample is forwarded133to the ??rear?? left DAC PCM slot of the AC97 codec.134 135``name='AC97 Playback Volume',index=0``136---------------------------------------137This control is used to attenuate samples from left and right front ADC PCM slots138of the AC97 codec. The result samples are forwarded to the front DAC PCM139slots of the AC97 codec.140 141.. note::142  This control should be zero for the standard operations, otherwise143  a digital loopback is activated.144 145 146``name='AC97 Capture Volume',index=0``147--------------------------------------148This control is used to attenuate samples from left and right front ADC PCM slots149of the AC97 codec. The result is forwarded to the ADC capture FIFO (thus to150the standard capture PCM device).151 152.. note::153   This control should be 100 (maximal value), otherwise no analog154   inputs of the AC97 codec can be captured (recorded).155 156``name='IEC958 TTL Playback Volume',index=0``157---------------------------------------------158This control is used to attenuate samples from left and right IEC958 TTL159digital inputs (usually used by a CDROM drive). The result samples are160forwarded to the front DAC PCM slots of the AC97 codec.161 162``name='IEC958 TTL Capture Volume',index=0``163--------------------------------------------164This control is used to attenuate samples from left and right IEC958 TTL165digital inputs (usually used by a CDROM drive). The result samples are166forwarded to the ADC capture FIFO (thus to the standard capture PCM device).167 168``name='Zoom Video Playback Volume',index=0``169---------------------------------------------170This control is used to attenuate samples from left and right zoom video171digital inputs (usually used by a CDROM drive). The result samples are172forwarded to the front DAC PCM slots of the AC97 codec.173 174``name='Zoom Video Capture Volume',index=0``175--------------------------------------------176This control is used to attenuate samples from left and right zoom video177digital inputs (usually used by a CDROM drive). The result samples are178forwarded to the ADC capture FIFO (thus to the standard capture PCM device).179 180``name='IEC958 LiveDrive Playback Volume',index=0``181---------------------------------------------------182This control is used to attenuate samples from left and right IEC958 optical183digital input. The result samples are forwarded to the front DAC PCM slots184of the AC97 codec.185 186``name='IEC958 LiveDrive Capture Volume',index=0``187--------------------------------------------------188This control is used to attenuate samples from left and right IEC958 optical189digital inputs. The result samples are forwarded to the ADC capture FIFO190(thus to the standard capture PCM device).191 192``name='IEC958 Coaxial Playback Volume',index=0``193-------------------------------------------------194This control is used to attenuate samples from left and right IEC958 coaxial195digital inputs. The result samples are forwarded to the front DAC PCM slots196of the AC97 codec.197 198``name='IEC958 Coaxial Capture Volume',index=0``199------------------------------------------------200This control is used to attenuate samples from left and right IEC958 coaxial201digital inputs. The result samples are forwarded to the ADC capture FIFO202(thus to the standard capture PCM device).203 204``name='Line LiveDrive Playback Volume',index=0``, ``name='Line LiveDrive Playback Volume',index=1``205----------------------------------------------------------------------------------------------------206This control is used to attenuate samples from left and right I2S ADC207inputs (on the LiveDrive). The result samples are forwarded to the front208DAC PCM slots of the AC97 codec.209 210``name='Line LiveDrive Capture Volume',index=1``, ``name='Line LiveDrive Capture Volume',index=1``211--------------------------------------------------------------------------------------------------212This control is used to attenuate samples from left and right I2S ADC213inputs (on the LiveDrive). The result samples are forwarded to the ADC214capture FIFO (thus to the standard capture PCM device).215 216``name='Tone Control - Switch',index=0``217----------------------------------------218This control turns the tone control on or off. The samples for front, rear219and center / LFE outputs are affected.220 221``name='Tone Control - Bass',index=0``222--------------------------------------223This control sets the bass intensity. There is no neutral value!!224When the tone control code is activated, the samples are always modified.225The closest value to pure signal is 20.226 227``name='Tone Control - Treble',index=0``228----------------------------------------229This control sets the treble intensity. There is no neutral value!!230When the tone control code is activated, the samples are always modified.231The closest value to pure signal is 20.232 233``name='IEC958 Optical Raw Playback Switch',index=0``234-----------------------------------------------------235If this switch is on, then the samples for the IEC958 (S/PDIF) digital236output are taken only from the raw FX8010 PCM, otherwise standard front237PCM samples are taken.238 239``name='Headphone Playback Volume',index=1``240--------------------------------------------241This control attenuates the samples for the headphone output.242 243``name='Headphone Center Playback Switch',index=1``244---------------------------------------------------245If this switch is on, then the sample for the center PCM is put to the246left headphone output (useful for SB Live cards without separate center/LFE247output).248 249``name='Headphone LFE Playback Switch',index=1``250------------------------------------------------251If this switch is on, then the sample for the center PCM is put to the252right headphone output (useful for SB Live cards without separate center/LFE253output).254 255 256PCM stream related controls257===========================258 259``name='EMU10K1 PCM Volume',index 0-31``260----------------------------------------261Channel volume attenuation in range 0-0x1fffd. The middle value (no262attenuation) is default. The channel mapping for three values is263as follows:264 265* 0 - mono, default 0xffff (no attenuation)266* 1 - left, default 0xffff (no attenuation)267* 2 - right, default 0xffff (no attenuation)268 269``name='EMU10K1 PCM Send Routing',index 0-31``270----------------------------------------------271This control specifies the destination - FX-bus accumulators. There are272twelve values with this mapping:273 274*  0 -  mono, A destination (FX-bus 0-15), default 0275*  1 -  mono, B destination (FX-bus 0-15), default 1276*  2 -  mono, C destination (FX-bus 0-15), default 2277*  3 -  mono, D destination (FX-bus 0-15), default 3278*  4 -  left, A destination (FX-bus 0-15), default 0279*  5 -  left, B destination (FX-bus 0-15), default 1280*  6 -  left, C destination (FX-bus 0-15), default 2281*  7 -  left, D destination (FX-bus 0-15), default 3282*  8 - right, A destination (FX-bus 0-15), default 0283*  9 - right, B destination (FX-bus 0-15), default 1284* 10 - right, C destination (FX-bus 0-15), default 2285* 11 - right, D destination (FX-bus 0-15), default 3286 287Don't forget that it's illegal to assign a channel to the same FX-bus accumulator 288more than once (it means 0=0 && 1=0 is an invalid combination).289 290``name='EMU10K1 PCM Send Volume',index 0-31``291---------------------------------------------292It specifies the attenuation (amount) for given destination in range 0-255.293The channel mapping is following:294 295*  0 -  mono, A destination attn, default 255 (no attenuation)296*  1 -  mono, B destination attn, default 255 (no attenuation)297*  2 -  mono, C destination attn, default 0 (mute)298*  3 -  mono, D destination attn, default 0 (mute)299*  4 -  left, A destination attn, default 255 (no attenuation)300*  5 -  left, B destination attn, default 0 (mute)301*  6 -  left, C destination attn, default 0 (mute)302*  7 -  left, D destination attn, default 0 (mute)303*  8 - right, A destination attn, default 0 (mute)304*  9 - right, B destination attn, default 255 (no attenuation)305* 10 - right, C destination attn, default 0 (mute)306* 11 - right, D destination attn, default 0 (mute)307 308 309 310MANUALS/PATENTS311===============312 313ftp://opensource.creative.com/pub/doc314-------------------------------------315 316Note that the site is defunct, but the documents are available317from various other locations.318 319LM4545.pdf320	AC97 Codec321m2049.pdf322	The EMU10K1 Digital Audio Processor323hog63.ps324	FX8010 - A DSP Chip Architecture for Audio Effects325 326 327WIPO Patents328------------329 330WO 9901813 (A1)331	Audio Effects Processor with multiple asynchronous streams332	(Jan. 14, 1999)333 334WO 9901814 (A1)335	Processor with Instruction Set for Audio Effects (Jan. 14, 1999)336 337WO 9901953 (A1)338	Audio Effects Processor having Decoupled Instruction339        Execution and Audio Data Sequencing (Jan. 14, 1999)340 341 342US Patents (https://www.uspto.gov/)343-----------------------------------344 345US 5925841346	Digital Sampling Instrument employing cache memory (Jul. 20, 1999)347 348US 5928342349	Audio Effects Processor integrated on a single chip350        with a multiport memory onto which multiple asynchronous351        digital sound samples can be concurrently loaded352	(Jul. 27, 1999)353 354US 5930158355	Processor with Instruction Set for Audio Effects (Jul. 27, 1999)356 357US 6032235358	Memory initialization circuit (Tram) (Feb. 29, 2000)359 360US 6138207361	Interpolation looping of audio samples in cache connected to362        system bus with prioritization and modification of bus transfers363        in accordance with loop ends and minimum block sizes364	(Oct. 24, 2000)365 366US 6151670367	Method for conserving memory storage using a368        pool of  short term memory registers369	(Nov. 21, 2000)370 371US 6195715372	Interrupt control for multiple programs communicating with373        a common interrupt by associating programs to GP registers,374        defining interrupt register, polling GP registers, and invoking375        callback routine associated with defined interrupt register376	(Feb. 27, 2001)377