csp_load.c:

  This is a source file for simple CSP microcode loader for Sound Blaster 16ASP and some 
Sound Blaster AWE32 sound cards with Creative Signal Processor (CSP) chip (CT1748A) installed.
It can also be used as a post-install function for snd-sb16-csp module to load default codec at
module installation. If CSP chip is succesfully detected and initialized, it will be installed
as a hardware dependant device hwC0D2 into /dev/snd directory. 'csp_load' executable can be
compiled with 'make csp_load' command in alsa-driver/test directory. 

  If Sound Blaster 16ASP/AWE card is named 'SB16', then status of CSP chip can be read from
/proc/asound/SB16/csp . After initialization, this file will show:

Creative Signal Processor [v1.0]
State: -x---

  It is possible to load hardware codecs, supplied with your SB16ASP/AWE Windows drivers.
Currently, following codecs can be loaded to CSP device:
  -wfm0001a.csp: QSound decoder
  -wfm0006a.csp: A-law codec
  -wfm0007a.csp: u-law codec
  -wfm0011a.csp: IMA ADPCM codec (distorted output for IMA test files)
  -wfm0200a.csp: Creative ADPCM codec (sounds like Intel/DVI IMA ADPCM compatible)

These codecs are not yet supported by ALSA:
  -wfm0201a.csp: Text2Speech
  -wfm0202a.csp: Fast Speech 8 codec
  -wfm0203a.csp: Fast Speech 10 codec

  Qsound microcode file has 4 functions, each function is a decoder for different sample rate.
Rates for QSound functions #1, #2, #3 and #4 are 44100, 22050, 11025 and 8000Hz respectively.
IMA ADPCM and FastSpeech codecs are formed of 2 functions, the first one is for capture and the
second one is for playback.

  To load for example function #2 from QSound microcode file (decoder for 22050Hz), you should
type: 'csp_load wfm0001a.csp 2'. After successful loading, /proc/asound/SB16/csp will show:

Creative Signal Processor [v1.0]
State: -x--L
Codec: QSOUND [func #2]
Sample rates: 22050Hz
QSound decoder disabled

  With QSound decoder microcode loaded, all supported file formats can be played with QSound
180 degree positioning applied. QSound element is dynamically added into mixer structure as
3D Effect1 - space element, and it will be only shown if support for CSP has been compiled into
ALSA drivers, CSP chip has been found and QSound codec is loaded into CSP. When enabled, QSound
position can be dynamically changed by mixer slider position, and proc interface will follow
the state of CSP chip and its current QSound position:

Creative Signal Processor [v1.0]
State: Qx-RL
Codec: QSOUND [func #2]
Sample rates: 22050Hz
QSound decoder enabled
Processing 16bit mono PCM samples
Qsound position: left = 0x9, right = 0x9

  Driver supports autoloading of Mu-Law, A-Law and Ima-ADPCM codecs. Autoloading is active only
when there is no microcode loaded to CSP, and there is no need to preload appropriate *.csp files.
To unload manually loaded microcode, you should use 'csp_load -u'.

  If microcode for hardware codec has been manually loaded, then CSP will support only loaded
PCM format and autoloading will be disabled. In such case, proc interface will show loaded codec
properties:

Creative Signal Processor [v1.0]
State: -x--L
Codec: IMA-ADPCM [func #2]
Sample rates: All
PCM format ID: 0x400000 (16bit/-) [mono/stereo] [playback/-]

  All CSP functions can be accessed through IOCTL interface. Please look at
alsa-driver/include/sb16_csp.h for further details.


