happycube / cxadc-linux3

CX2388x direct ADC capture driver, updated for Linux 3.x+ and 64-bit
80 stars 18 forks source link

How can I adapt this for cx23885 cards? #10

Open joncampbell123 opened 3 years ago

joncampbell123 commented 3 years ago

Is it possible? I cannot find programming documentation like I could (barely) find for the cx2388x? Are the registers similar?

happycube commented 3 years ago

Unfortunately no. It's closer to the CX2584x chips and does not have a documented raw mode. If it was possible there would be people on the Domesday86 discord all over it. sigh

https://www.verical.com/datasheet/conexant-systems-unsorted-cx23885-15z-367583.pdf

(BTW Chinese factories have been sticking reused CX23880-3 chips onto boards with PCI-e bridges...)

joncampbell123 commented 3 years ago

I may be able to dig up an old CX2388x based PCI card then. What other means is there to digitize a composite video signal raw?

I ask because my biggest frustration with capture cards in their normal mode is the varied way they all suck at capturing from VHS tape, and I'm trying to capture from VHS tape, thus the interest in capturing it raw and processing it myself.

EDIT: I have an old PCI capture card with a CX23883 on it, will that work? It worked well enough as a capture card in 2006 when I bought it.

tandersn commented 3 years ago

I may be able to dig up an old CX2388x based PCI card then. What other means is there to digitize a composite video signal raw?

I ask because my biggest frustration with capture cards in their normal mode is the varied way they all suck at capturing from VHS tape, and I'm trying to capture from VHS tape, thus the interest in capturing it raw and processing it myself.

EDIT: I have an old PCI capture card with a CX23883 on it, will that work? It worked well enough as a capture card in 2006 when I bought it.

Yes, that will work with raw cxadc driver. if you no longer can use PCI, as Happycube said, there is also this: https://es.aliexpress.com/item/4000386216474.html

joncampbell123 commented 3 years ago

Finally got around to it... the driver works! Composite input on this card is vmux=1. Thank you so much for this driver! Now I can capture VHS tapes without worrying about the infinite ways frames get dropped, skewed, overbright, cut off, or jumpy.

The card is an old 2006 "InstantPCI" card with no tuner, just the capture function. It was cheap but very useful at the time.

happycube commented 3 years ago

@joncampbell123 good timing, there's a lot of work going on right now adapting cxadc and vhs-decode for this :)

joncampbell123 commented 3 years ago

@happycube As someone using this project to capture raw composite video, I find that I have to use level = 0, because odd distortions happen at any other level. Level 1-3 will see an occasional shift in video timing, level 4 can cause gain changes every 4-6 NTSC scanlines if the sync pulses register as too dark.

Also, I am using the modification listed in the pull request to disable the card's PLL adjust. However, my variant is just to write a 0 instead of reading and masking. It seems to work quite well.

It does mean the majority of sample values are generally between 16 and 144 instead of 8 to 248, but it's better than nothing.

My capture script is a simple: chrt -r 50 nice --adjustment=20 dd if=/dev/cxadc0 status=progress bs=30000000 of=rawcapturefile

Going straight onto an SSD, it seems able to keep up just fine.