Jaroslav Kysela wrote: > > Hello, > > because we had many questions about the SB Live mixer, I've tried > to write an initial document describing the features of the ALSA's DSP > code. You can find it in alsa-driver/doc/SB-Live-mixer.txt. I welcome any > improvements regarding it. > > Jaroslav
thank you so much, jaroslav i'm attaching the file with minor corrections (without notice) and some annotations/questions. if you'd rather have a diff, let me know, but since i have inserted some whitespace as well, it would not be much smaller. regards, jörn -- Jörn Nettingsmeier home://Kurfürstenstr.49.45138.Essen.Germany phone://+49.201.491621 http://spunk.dnsalias.org http://www.linuxdj.com/audio/lad/
Sound Blaster Live mixer / default DSP code =========================================== The EMU10K1 chips have a DSP part which can be programmed to support various sample processing. (This acticle does not describe the overall functionality of the EMU10K1 chips. See the manuals section for further details.) The ALSA driver programs this portion of the chip by default code (can be altered later) which offers the following functionality: 1) IEC958 (S/PDIF) raw PCM -------------------------- This PCM device (it's 3rd PCM device for given card and first (0) subdevice) that would be index (2), no? lets add the index there, too. allows to forward 48kHz, stereo, 16-bit little endian stream without any modifications to the digital output (coaxial or digital). The universal misleading. both are digital. do you mean "coaxial or optical" ? interface allows for the creation up to 8 raw PCM devices operating at 48kHz, 16-bit little endian. It could be easy to add support for multichannel it could = it is probably ? or it would be if anyone tried ? devices to the current code, but the conversion routines exist only for stereo (2-channel streams) at the time. Look to tram_poke routines in lowlevel/emu10k1/emufx.c for more details. 2) Digital mixer controls ------------------------- These controls are built using the DSP instructions. They offer extended functionality. Only the default built-in code in the ALSA driver is described here. name='Wave Playback Volume',index=0 This control is used to attenuate samples for left and right PCM FX-bus does attenuate mean that "all the way up" is the neutral position that leaves the audio unchanged ? if yes, would be nice to state this explicitly. if not, and if it can also be used to raise the samples, "control the gain of" is more precise. accumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples. The result samples are forwarded to the front DAC PCM slots of the AC'97 codec. name='Wave Surround Playback Volume',index=0 This control is used to attenuate samples for left and right PCM FX-bus accumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples. The result samples are forwarded to the rear I2S DACs. These DACs separates probably you mean "operate" ? separately (they are not inside the AC'97 codec). some short notice about the meaning of i2c would be nice. it's some kind of isa-like bus for things like thermal sensors and internal device communication, right ? could you clarify ? name='Wave Center Playback Volume',index=0 This control is used to attenuate samples for left and right PCM FX-bus accumulators. ALSA uses accumulators 0 and 1 for left and right PCM samples. i don't get this. it goes to FX-BUS accus, but then you say alsa uses accus 0 and 1 (are these the same as in the mixer channels above ? The result is converted to a single channel (mono) and forwarded to the ??rear?? here i see ??rear??. probably font problems. are you using a special character ? converted = mixed ? or do you just drop one ? should be explained. i'd rather say "mono signal" with "(single channel)" added, if at all. right DAC PCM slot of the AC'97 codec. name='Wave LFE Playback Volume',index=0 This control is used to attenuate samples for left and right PCM FX-bus accumulators. ALSA uses accumulators 0 and 1 for left and right PCM. The result is converted to a single channel (mono) and forwarded to the ??rear?? same with ??rear?? and "converted" left DAC PCM slot of the AC'97 codec. name='Wave Capture Volume',index=0 name='Wave Capture Switch',index=0 These controls are used to attenuate samples for left and right PCM FX-bus accumulators. ALSA uses accumulators 0 and 1 for left and right PCM. what has this got to do with the PCM FX-Bus ??? i don't understand. i thought fx-bus is for surround stuff and effects which the emu10k1 can generate if programmed accordingly. if i see "wave capture", i would not expect that it captures the fx bus. The result is forwarded to the ADC capture FIFO (thus to the standard capture PCM device). name='Music Playback Volume',index=0 This control is used to attenuate samples for left and right MIDI FX-bus same problem with understanding "FX-BUS". accumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples. The result samples are forwarded to the front DAC PCM slots of the AC'97 codec. name='Music Capture Volume',index=0 name='Music Capture Switch',index=0 These controls are used to attenuate samples for left and right MIDI FX-bus accumulator. ALSA uses accumulators 4 and 5 for left and right PCM. The result is forwared to the ADC capture FIFO (thus to the standard capture PCM device). name='Surround Digital Playback Volume',index=0 This control is used to attenuate samples for left and right rear PCM FX-bus aah. might fx-bus refer to multichannel stuff, i.e. everything that is not front l/r ? accumulators. ALSA uses accumulators 2 and 3 for left and right rear PCM samples. The result samples are forwarded to the rear I2S DACs. These DACs separates again, "operate" ? separately (they are not inside the AC'97 codec). name='Surround Digital Capture Volume',index=0 name='Surround Digital Capture Switch',index=0 Thes controls are used to attenuate samples for left and right rear PCM FX-bus accumulators. ALSA uses accumulators 2 and 3 for left and right rear PCM samples. The result is forwarded to the ADC capture FIFO (thus to the standard capture PCM device). name='Center Playback Volume',index=0 This control is used to attenuate samples for the center PCM FX-bus accumulator. ALSA uses accumulator 6 for center PCM samples. The result samples are forwarded to the ??rear?? right DAC PCM slot of the AC'97 codec. again ??rear?? name='LFE Playback Volume',index=0 This control is used to attenuate samples for the center PCM FX-bus accumulator. ALSA uses accumulator 6 for center PCM samples. The result samples are forwarded to the ??rear?? left DAC PCM slot of the AC'97 codec. what does LFE mean ? it's a bit hard to see the difference to "Center Playback Volume". btw, it looks like alsa tries to map multichannel surround with more than 4 channels to the 4 channel front/rear outs. could you describe this in a few sentences ? name='AC'97 Playback Volume',index=0 This control is used to attenuate samples for the left and right front ADC PCM slots of the AC'97 codec. The result samples are forwarded to the front DAC PCM slots of the AC'97 codec. *** Note: This control should be zero for the standard *** operations, otherwise an digital loopback is activated. i think an extra emphasis is appropriate here. name='AC'97 Capture Volume',index=0 This control is used to attenuate samples for left and right front ADC PCM slots of the AC'97 codec. The result is forwared to the ADC capture FIFO (thus to the standard capture PCM device). Note: This control should be 100 (maximal value), otherwise no analog inputs of the AC'97 codec can be captured (recorded). name='IEC958 TTL Playback Volume',index=0 This control is used to attenuate samples for the left and right IEC958 TTL for or rather "from" ? it's inputs, so i'd say "from". i have changed that on all follwing occurances. digital inputs (usually used by a CDROM drive). The result samples are forwarded to the front DAC PCM slots of the AC'97 codec. name='IEC958 TTL Capture Volume',index=0 This control is used to attenuate samples from the left and right IEC958 TTL digital inputs (usually used by a CDROM drive). The result samples are forwared to the ADC capture FIFO (thus to the standard capture PCM device). name='Zoom Video Playback Volume',index=0 This control is used to attenuate samples from the left and right zoom video digital inputs (usually used by a CDROM drive). The result samples are forwarded to the front DAC PCM slots of the AC'97 codec. name='Zoom Video Capture Volume',index=0 This control is used to attenuate samples from the left and right zoom video digital inputs (usually used by a CDROM drive). The result samples are forwared to the ADC capture FIFO (thus to the standard capture PCM device). name='IEC958 Optical Playback Volume',index=0 This control is used to attenuate samples from the left and right IEC958 optical digital input. The result samples are forwarded to the front DAC PCM slots of the AC'97 codec. name='IEC958 Optical Capture Volume',index=0 This control is used to attenuate samples from the left and right IEC958 optical digital inputs. The result samples are forwared to the ADC capture FIFO (thus to the standard capture PCM device). name='IEC958 Coaxial Playback Volume',index=0 This control is used to attenuate samples from the left and right IEC958 coaxial digital inputs. The result samples are forwarded to the front DAC PCM slots of the AC'97 codec. name='IEC958 Coaxial Capture Volume',index=0 This control is used to attenuate samples from the left and right IEC958 coaxial digital inputs. The result samples are forwared to the ADC capture FIFO (thus to the standard capture PCM device). name='Line LiveDrive Playback Volume',index=0 name='Line LiveDrive Playback Volume',index=1 This control is used to attenuate samples from the left and right I2S ADC please also elaborate shortly on i2c here. is it used for communication between the card and livedrive ? inputs (on the LiveDrive). The result samples are forwarded to the front DAC PCM slots of the AC'97 codec. name='Line LiveDrive Capture Volume',index=0 name='Line LiveDrive Playback Volume',index=1 This control is used to attenuate samples from the left and right I2S ADC inputs (on the LiveDrive). The result samples are forwared to the ADC capture FIFO (thus to the standard capture PCM device). name='Tone Control - Switch',index=0 This control turns the tone control on or off. The samples for front, rear and center / LFE outputs are affected. name='Tone Control - Bass',index=0 This control sets the bass intensity. say which value is neutral. name='Tone Control - Treble',index=0 This control sets the treble intensity. say which value is neutral. name='IEC958 Optical Raw Playback Switch',index=0 If this switch is on, then the samples for the IEC958 digital output are add (s/pdif) for those who can't memorize iec standards :) taken only from the raw FX8010 PCM, otherwise standard front PCM samples are taken. name='Headphone Playback Volume',index=1 This control attenuates the samples for the headphone output. name='Headphone Center Playback Switch',index=1 If this switch is on, then the sample for the center PCM is put to the left headphone output (useful for SB Live cards without separate center/LFE output). why not call it "Headphone Assign Center to Left Switch" so that people know which sort of voodoo it does ? name='Headphone LFE Playback Switch',index=1 If this switch is on, then the sample for the center PCM is put to the right headphone output (useful for SB Live cards without separate center/LFE output). same, "Headphone Assign LFE to Right Switch" 3) MANUALS/PATENTS: ------------------- ftp://opensource.creative.com/pub/doc ------------------------------------ Files: LM4545.pdf AC97 Codec m2049.pdf The EMU10K1 Digital Audio Processor hog63.ps FX8010 - A DSP Chip Architecture for Audio Effects WIPO Patents ------------ Patent numbers: WO 9901813 (A1) Audio Effects Processor with multiple asynchronous (Jan. 14, 1999) streams WO 9901814 (A1) Processor with Instruction Set for Audio Effects (Jan. 14, 1999) WO 9901953 (A1) Audio Effects Processor having Decoupled Instruction Execution and Audio Data Sequencing (Jan. 14, 1999) US Patents (http://www.uspto.gov/) ---------------------------------- US 5925841 Digital Sampling Instrument employing cache memory (Jul. 20, 1999) US 5928342 Audio Effects Processor integrated on a single chip (Jul. 27, 1999) with a multiport memory onto which multiple asynchronous digital sound samples can be concurrently loaded US 5930158 Processor with Instruction Set for Audio Effects (Jul. 27, 1999) US 6032235 Memory initialization circuit (Tram) (Feb. 29, 2000) US 6138207 Interpolation looping of audio samples in cache connected to (Oct. 24, 2000) system bus with prioritization and modification of bus transfers in accordance with loop ends and minimum block sizes US 6151670 Method for conserving memory storage using a (Nov. 21, 2000) pool of short term memory registers US 6195715 Interrupt control for multiple programs communicating with (Feb. 27, 2001) a common interrupt by associating programs to GP registers, defining interrupt register, polling GP registers, and invoking callback routine associated with defined interrupt register