Recently I got my hands on a video capture card, it’s a ProVideo PV981A-16, but I didn’t know that at first. The card uses 4 Fusion 878a (formerly bt878) PCI video capture cards and a PCI-E to PCI bus chip to give a maximum of 16 ‘simultaneous’ composite video inputs. In linux there is a driver for the bt878 based cards, and it has quite a lot of options. These chips were very widely used and the cards they went on had many varied feature sets. The card has several composite inputs, audio inputs, and some gpio. The gpio is present because frequently this chip is paired with a TV tuner which requires some digital lines to set the channel or other multiplexers in the audio/video path, or buffered and used for relay contacts or security sensors (like PIR).
Because of the great variety in these cards the driver does its best to autodetect what card is plugged in and set itself up accordingly. The problem is that the card autodetects as a PV150 (may not be a real card). When I probed the card I saw 4 chips with 2 inputs each instead of 4, and for quite a while I was scratching my head as to how I could enable the remaining inputs.
The revelation came that this card was being detected wrong. Well, not wrong, but the identification the card had was shared (presumably) by another card that only had a total of 8 inputs and it was being detected with those settings.
The ‘right way’ to fix this would be to add a definition in the bttv driver source for my card and have some way to detect it was the right card, but that’s not possible as the unique identifier that each tuner on this card uses is identical to a different card with different settings. I could have tried to coerce the driver maintainers to accept that enabling more inputs does no harm except there would be virtual inputs with no actual connector for the card that doesn’t use them, but that also seemed hard and not very helpful to the community. The way to test this would be to remove the driver module and restart it with a manual over-ride that picked a card out of the list that had the right settings. I found the right settings by poking around in the driver source and finding another card that only differed in how many inputs it had (I knew the other settings worked). The card I chose was BTTV_BOARD_GRANDTEC_MULTI which is card ID 77, or 0x4d (hex).
This card allowed it to fire right up with the right inputs and all 16 inputs could be detected. The problem with this solution is that it is not portable. If you remember from my keyboard adventures I prefer a hardware solution that can be plugged into any computer and work on autodetection rather than a bunch of software fixes that have to be applied after installation. Looking carefully on the card you will see 4 socketed DIP-8 chips, there are also 2 data lines coming from each and going toward the 878 chips. I checked and they are each 24c02 i2c eeprom chips, and at the end of their memory they contain hex strings that I recognized from the bttv source code.
This is how these cards are detected (for the most part). Now I just had to look down the list of card identifiers and over-write these with ones that would detect as the right settings. The Provideo PV143 seemed to have the right settings (and a similar bit pattern) so I went with it.
My trusty tl866 wrote these easily and now I have a card that autodetects incorrectly (it did before too) but with the right input settings. I may have been able to just remove the chips and have it autodetect as generic/unknown and had it work, but this seems more resistant to driver autodetection changes in the future.
I did my best to fill out the linuxtv page I linked at the top with all the information I was able to discern from the card (including gpio header pinout) but it is still not complete. I have an e-mail out to ProVideo asking for specs but I’m not very hopeful on that front. After this adventure I feel like I could design one of these cards from scratch, or enable features that were never intended on other cards because they are so simple to use. Don’t be afraid of the 878, go forth and hack!