CX23885 Support
Since 2006, a new family of PCI-Express bridge chips has been available in the form of the CX23885 family. From a programming standpoint, the core DMA logic and at least the MPEG transport stream control logic for these cards is very similar to the CX23880/1/2/3. There are some notable differences with the CX23885, however:
- 64-bit DMA engine w/ ability to directly address memory above the 4GB boundary
- More onboard SRAM and in a somewhat different layout
- Native PCI-Express bridge, with support for (among other things) Message Signaled Interrupts (MSIs).
- Three onboard I2C masters instead of one, and somewhat different I2C control logic
- The CX25840 is the internal analog audio/video core, so analog control is very different from the CX23880, which uses sort of an "enhanced BT878" A/V core.
- Support for dual frontends and dual MPEG transport streams and analog streams, which (depending on the card) can mean the ability to perform simultaneous digital/digital or digital/analog captures.
- The CX23885 is a single-function chip, so the MPEG/video/audio/etc. functions do not enumerate as separate devices and must be controlled from a single driver.
The CX23885 family actually has two distinct sub-families with different PCI hardware IDs: the CX23885 and the CX23887/8. The main differences are that the CX23887/8 has more onboard SRAM and enables more DMA channels.
As of version 1.2.0, CX23885/7/8 support has been added to the cx88 kernel drivers. Datasheets for the CX23885 family are not publicly available, but this support was made possible by the hard work of Konstantin Dimitrov. He did a great deal of clean-room research into the register-level programming interfaces for the CX23885/7/8, and was ultimately able to determine their SRAM layout and much of the required I2C and MPEG transport stream control logic. We were able to fill in all the remaining gaps based on our existing knowledge of the CX23880 family and correlation of observed behavior with the Linux CX23885 driver source code.
The net result of this effort is a very clean driver enhancement--All of the fundamental DMA and I2C logic is integrated into the common code base with leverage of existing cx88 infrastructure and relatively little added code. Common MPEG routines have been moved to cx88mpegcore.ko, which also exposes the /dev/cx88mpeg* device nodes, so the nodes are ioctl(2)-compatible. cx88mpeg.ko is now a thin CX23880-specific wrapper around cx88mpegcore, while cx23885.ko is a thin CX23885-family wrapper for all device interfaces that may be used with CX23885/7/8 devices (currently only cx88mpegcore).
This support is currently MPEG-only. We will consider adding support for other streams (analog, MPEG encoders, etc.) as need arises.