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, however:
- The CX23885 family has a 64-bit DMA engine and can therefore directly address memory above the 4GB boundary
- The CX23885 has a somewhat different SRAM layout than the CX23880 family.
- The CX23885 is a native PCI-Express bridge, which means that (among other things) it supports Message Signaled Interrupts (MSIs).
- The CX23885 has three onboard I2C masters to the CX23880's one, and the I2C transfer logic is somewhat different.
- The CX23885 uses the CX25840 as its internal analog audio/video core, so analog control is very different from the CX23880, which uses sort of an "enhanced BT878" A/V core.
- The CX23885 supports dual frontends and dual MPEG transport streams and analog streams, which typically means 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. Core DMA and SRAM logic for the CX23885 family was integrated directly into cx88.ko with relatively little added code and probably 80-90% reuse of existing logic. Konstantin wrote the I2C control logic for the CX23885 family, which was integrated into cx88i2c.ko with ~60-70% existing logic reuse.
Konstantin also added the necessary register pokes for MPEG transport stream control. The MPEG register offsets for the CX23885 are completely different, but the control logic is probably 95% shared w/ the CX23880, so we split the common logic into a separate kernel module called cx88mpegcore.ko. For the CX23880 family. cx88mpeg.ko is now a very thin wrapper around cx88mpegcore, which is basically responsible for attaching the core logic to CX23880 PCI function 2. For the CX23885, cx23885.ko also uses this core logic to support both MPEG transport streams there. The core logic is solely responsible for /dev/cx88mpeg* device interface, so there is a common ioctl(2) interface between all CX23880 and CX23885 MPEG transport streams.