📄 cs46xx
字号:
Documentation for the Cirrus Logic/Crystal SoundFusion cs46xx/cs4280 audio controller chips (2001/05/11)The cs46xx audio driver supports the DSP line of Cirrus controllers. Specifically, the cs4610, cs4612, cs4614, cs4622, cs4624, cs4630 and the cs4280products. This driver uses the generic ac97_codec driver for AC97 codecsupport. Features:Full Duplex Playback/Capture supported from 8k-48k.16Bit Signed LE & 8Bit Unsigned, with Mono or Stereo supported.APM/PM - 2.2.x PM is enabled and functional. APM can alsobe enabled for 2.4.x by modifying the CS46XX_ACPI_SUPPORT macrodefinition.DMA playback buffer size is configurable from 16k (defaultorder=2) up to 2Meg (defaultorder=11). DMA capture buffer size is fixed at a single 4k page astwo 2k fragments.MMAP seems to work well with QuakeIII, and test XMMS plugin.Myth2 works, but the polling logic is not fully correct, but is functional.The 2.4.4-ac6 gameport code in the cs461x joystick driver has been tested with a Microsoft Sidewinder joystick (cs461x.o and sidewinder.o). This audio driver must be loaded prior to the joystick driver to enable theDSP task image supporting the joystick device.Limitations:SPDIF is currently not supported.Primary codec support only. No secondary codec support is implemented.NOTES:Hercules Game Theatre XP - the EGPIO2 pin controls the external Amp,and has been tested.Module parameter hercules_egpio_disable set to 1, will force a 0 to EGPIODRto disable the external amplifier.VTB Santa Cruz - the GPIO7/GPIO8 on the Secondary Codec controlthe external amplifier for the "back" speakers, since we do notsupport the secondary codec then this external amp is notturned on. The primary codec external amplifier is supported butnote that the AC97 EAPD bit is inverted logic (amp_voyetra()).DMA buffer size - there are issues with many of the Linux applicationsconcerning the optimal buffer size. Several applications request a certain fragment size and number and then do not verify that the driverhas the ability to support the requested configuration. SNDCTL_DSP_SETFRAGMENT ioctl is used to request a fragment size andnumber of fragments. Some applications exit if an error is returnedon this particular ioctl. Therefore, in alignment with the other OSS audio drivers, no error is returned when a SETFRAGs IOCTL is received, but the values passed from the app are not used in any buffer calculation (ossfragshift/ossmaxfrags are not used).Use the "defaultorder=N" module parameter to change the buffer size ifyou have an application that requires a specific number of fragmentsor a specific buffer size (see below).Debug Interface---------------There is an ioctl debug interface to allow runtime modification of the debug print levels. This debug interface code can be disabled from the compilation process with commenting the following define:#define CSDEBUG_INTERFACE 1There is also a debug print methodolgy to select printf statements fromdifferent areas of the driver. A debug print level is also used to allowadditional printfs to be active. Comment out the following line in thedriver to disable compilation of the CS_DBGOUT print statements:#define CSDEBUG 1 Please see the definitions for cs_debuglevel and cs_debugmask for additionalinformation on the debug levels and sections.There is also a csdbg executable to allow runtime manipulation of these parameters. for a copy email: twoller@crystal.cirrus.comMODULE_PARMS definitions------------------------MODULE_PARM(defaultorder, "i");defaultorder=Nwhere N is a value from 1 to 12The buffer order determines the size of the dma buffer for the driver.under Linux, a smaller buffer allows more responsiveness from many of the applications (e.g. games). A larger buffer allows some of the apps (esound) to not underrun the dma buffer as easily. As default, use 32k (order=3)rather than 64k as some of the games work more responsively.(2^N) * PAGE_SIZE = allocated buffer sizeMODULE_PARM(cs_debuglevel, "i");MODULE_PARM(cs_debugmask, "i");cs_debuglevel=Ncs_debugmask=0xMMMMMMMMwhere N is a value from 0 (no debug printfs), to 9 (maximum)0xMMMMMMMM is a debug mask corresponding to the CS_xxx bits (see driver source).MODULE_PARM(hercules_egpio_disable, "i");hercules_egpio_disable=Nwhere N is a 0 (enable egpio), or a 1 (disable egpio support)MODULE_PARM(initdelay, "i");initdelay=NThis value is used to determine the millescond delay during the initializationcode prior to powering up the PLL. On laptops this value can be used toassist with errors on resume, mostly with IBM laptops. Basically, if the system is booted under battery power then the mdelay()/udelay() functions fail to properly delay the required time. Also, if the system is booted under AC powerand then the power removed, the mdelay()/udelay() functions will not delay properly. MODULE_PARM(powerdown, "i");powerdown=Nwhere N is 0 (disable any powerdown of the internal blocks) or 1 (enable powerdown)MODULE_PARM(external_amp, "i");external_amp=1if N is set to 1, then force enabling the EAPD support in the primary AC97 codec.override the detection logic and force the external amp bit in the AC97 0x26 registerto be reset (0). EAPD should be 0 for powerup, and 1 for powerdown. The VTB Santa Cruzcard has inverted logic, so there is a special function for these cards.MODULE_PARM(thinkpad, "i");thinkpad=1if N is set to 1, then force enabling the clkrun functionality.Currently, when the part is being used, then clkrun is disabled for the entire system,but re-enabled when the driver is released or there is no outstanding open count.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -