/*
* Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk>
* Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit
* Version: 0.0.23
*
* FEATURES currently supported:
* Front, Rear and Center/LFE.
* Surround40 and Surround51.
* Capture from MIC an LINE IN input.
* SPDIF digital playback of PCM stereo and AC3/DTS works.
* (One can use a standard mono mini-jack to one RCA plugs cable.
* or one can use a standard stereo mini-jack to two RCA plugs cable.
* Plug one of the RCA plugs into the Coax input of the external decoder/receiver.)
* ( In theory one could output 3 different AC3 streams at once, to 3 different SPDIF outputs. )
* Notes on how to capture sound:
* The AC97 is used in the PLAYBACK direction.
* The output from the AC97 chip, instead of reaching the speakers, is fed into the Philips 1361T ADC.
* So, to record from the MIC, set the MIC Playback volume to max,
* unmute the MIC and turn up the MASTER Playback volume.
* So, to prevent feedback when capturing, minimise the "Capture feedback into Playback" volume.
*
* The only playback controls that currently do anything are: -
* Analog Front
* Analog Rear
* Analog Center/LFE
* SPDIF Front
* SPDIF Rear
* SPDIF Center/LFE
*
* For capture from Mic in or Line in.
* Digital/Analog ( switch must be in Analog mode for CAPTURE. )
*
* CAPTURE feedback into PLAYBACK
*
* Changelog:
* Support interrupts per period.
* Removed noise from Center/LFE channel when in Analog mode.
* Rename and remove mixer controls.
* 0.0.6
* Use separate card based DMA buffer for periods table list.
* 0.0.7
* Change remove and rename ctrls into lists.
* 0.0.8
* Try to fix capture sources.
* 0.0.9
* Fix AC3 output.
* Enable S32_LE format support.
* 0.0.10
* Enable playback 48000 and 96000 rates. (Rates other that these do not work, even with "plug:front".)
* 0.0.11
* Add Model name recognition.
* 0.0.12
* Correct interrupt timing. interrupt at end of period, instead of in the middle of a playback period.
* Remove redundent "voice" handling.
* 0.0.13
* Single trigger call for multi channels.
* 0.0.14
* Set limits based on what the sound card hardware can do.
* playback periods_min=2, periods_max=8
* capture hw constrain