Page 1 of 1

Problem with PCi-E card combination of CX25853 and CX25821

Posted: Mon Mar 05, 2012 11:48 pm
by p3k074
Hi,

I have problem with start working Zoneminder with PCIE card with two chips onboard : CX25853 and CX25821. This is 8 channel dvr h264 pcie capture cards - made in china. I installed UBUNTU with all updates and Zoneminder. All fine Zoneminder start working but problem is no video from this card.

I think all looks fine but not work:

Code: Select all

#lspci -vvvnn

04:00.0 Multimedia video controller [0400]: Conexant Systems, Inc. Device [14f1:8210]
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 3
        Region 0: Memory at fe400000 (64-bit, non-prefetchable) [size=2M]
        Capabilities: [40] Express (v1) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <2us, L1 <4us
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
        Capabilities: [80] Power Management version 3
                Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [90] Vital Product Data
                Unknown small resource type 00, will not decode more.
        Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
        Capabilities: [200 v1] Virtual Channel
                Caps:   LPEVC=1 RefClk=100ns PATEntryBits=1
                Arb:    Fixed+ WRR32+ WRR64+ WRR128-
                Ctrl:   ArbSelect=WRR64
                Status: InProgress-
                Port Arbitration Table [240] <?>
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01
                        Status: NegoPending- InProgress-
                VC1:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable- ID=1 ArbSelect=Fixed TC/VC=00
                        Status: NegoPending- InProgress-
I do:

Code: Select all

#modprobe -v cx25821
insmod /lib/modules/3.2.0-030200-generic/kernel/drivers/media/video/tveeprom.ko
insmod /lib/modules/3.2.0-030200-generic/kernel/drivers/media/video/btcx-risc.ko
insmod /lib/modules/3.2.0-030200-generic/kernel/drivers/media/video/videobuf-core.ko
insmod /lib/modules/3.2.0-030200-generic/kernel/drivers/media/video/videobuf-dma-sg.ko
insmod /lib/modules/3.2.0-030200-generic/kernel/drivers/media/video/videodev.ko
insmod /lib/modules/3.2.0-030200-generic/kernel/drivers/media/video/cx25821/cx25821.ko

Code: Select all

#dmesg
[   87.844265] Linux video capture interface: v2.00
[   87.852787] cx25821: driver version 0.0.106 loaded
but nothing happen:

Code: Select all

#ls -la /dev/video*
ls: cannot access /dev/video*: No such file or directory

I dont have any idea how do this card usable ... If any can help will be great ...

Re: Problem with PCi-E card combination of CX25853 and CX258

Posted: Sun Mar 11, 2012 9:31 am
by xmasin
You have to recompile kernel module with this patch http://comments.gmane.org/gmane.linux.d ... ture/44985. Current kernel module doesn't have definition for generic card. I followed this guide for recompiling module http://wiki.centos.org/HowTos/BuildingKernelModules.

Regards
Radek Masin

Re: Problem with PCi-E card combination of CX25853 and CX258

Posted: Fri Jun 08, 2012 12:53 pm
by marcin.gawenda
Hi Radek,

How many video channels you get working? What exact card model you managed to work?

Regards,
Marcin

Re: Problem with PCi-E card combination of CX25853 and CX258

Posted: Wed Jul 04, 2012 8:32 am
by xmasin
Hello,
I get working all 8 video channels, in /dev/ you can see video0 - video11, but devices video8 - video11 are audio channels from decoder, so you can use only first 8 channels for Zoneminder. I have bought this card http://dx.com/p/8-ch-h-264-dvr-video-ca ... ntsc-42242.

Regards
Radek Masin

Re: Problem with PCi-E card combination of CX25853 and CX258

Posted: Thu Jul 05, 2012 5:25 am
by cctvsales
Radek Masin

Have you tested the cx25858 chip video card, use the ZM program?

Thank you

Re: Problem with PCi-E card combination of CX25853 and CX258

Posted: Tue Jul 10, 2012 1:46 pm
by xmasin
cctvsales wrote:Radek Masin
Have you tested the cx25858 chip video card, use the ZM program?
Thank you
Hello,
unfortunatelly no, because I have only card with CX25853 and CX25821 chips.

Regards
Radek Masin

Re: Problem with PCi-E card combination of CX25853 and CX25821

Posted: Fri Mar 03, 2023 10:43 am
by vadegdadeg
Hello!
I have a similar problem. But the link to the patch is no longer available. Tell me at least what it was about, what keywords should I google for?

Re: Problem with PCi-E card combination of CX25853 and CX25821

Posted: Fri Mar 03, 2023 4:25 pm
by vadegdadeg
I figured out this problem!
My card contains:
CX25821-11Z
CX25853-12Z
Four sound ADC ES7240S
And two EEPROM's 24C02 and AT88SC0104CA this is "super-puper" Atmel CryptoMemory

At the beginning, I looked at the VID/PID of my card:

Code: Select all

03:00.0 0400: 14f1:8210
        Subsystem: 5644:4e4c
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at f7c00000 (64-bit, non-prefetchable) [size=2M]
        Capabilities: [40] Express Endpoint, MSI 00
        Capabilities: [80] Power Management version 3
        Capabilities: [90] Vital Product Data
        Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [200] Virtual Channel
        Kernel driver in use: cx25821
        Kernel modules: cx25821
And if 14f1:8210 are standard, then subsystem is different from 'reference'...
By searching for the words 14f1:8210, I found these values ​​​​in the source.
I replaced 0000/0000 with my values ​​obtained from lspci.
File: cx25821-core.c

Code: Select all

static const struct pci_device_id cx25821_pci_tbl[] = {
        {
                /* CX25821 Athena */
                .vendor = 0x14f1,
                .device = 0x8210,
                .subvendor = 0x14f1,
                .subdevice = 0x0920,
        }, {
                /* CX25821 No Brand */
                .vendor = 0x14f1,
                .device = 0x8210,
                .subvendor = 0x5644,
                .subdevice = 0x4e4c,
        }, {
                /* --- end of list --- */
        }
};
And it worked!

Code: Select all

[    2.547701] cx25821: driver loaded
[    2.547757] cx25821 0000:03:00.0: enabling device (0100 -> 0102)
[    2.547870] cx25821: Athena Hardware device = 0x8210
[    2.547899] cx25821: cx25821[1]: subsystem: 5644:4e4c, board: CX25821 [card=1,autodetected]
[    2.853836] cx25821: Hardware revision = 0x00
[    2.853847] cx25821: cx25821[1]/0: found at 0000:03:00.0, rev: 0, irq: 17, latency: 0, mmio: 0xf7c00000

Code: Select all

testbox cx25821 # ls -la /dev/vid*
crw-rw---- 1 root video 81, 0 мар  3 17:03 /dev/video0
crw-rw---- 1 root video 81, 1 мар  3 17:03 /dev/video1
crw-rw---- 1 root video 81, 2 мар  3 17:03 /dev/video2
crw-rw---- 1 root video 81, 3 мар  3 17:03 /dev/video3
crw-rw---- 1 root video 81, 4 мар  3 17:03 /dev/video4
crw-rw---- 1 root video 81, 5 мар  3 17:03 /dev/video5
crw-rw---- 1 root video 81, 6 мар  3 17:03 /dev/video6
crw-rw---- 1 root video 81, 7 мар  3 17:03 /dev/video7

Code: Select all

testbox cx25821 # v4l2-ctl -d /dev/video1 --all
Driver Info:
        Driver name      : cx25821
        Card type        : CX25821
        Bus info         : PCIe:0000:03:00.0
        Driver version   : 5.15.82
        Capabilities     : 0x85200003
                Video Capture
                Video Output
                Read/Write
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x05200001
                Video Capture
                Read/Write
                Streaming
                Extended Pix Format
Priority: 2
Video input : 0 (Composite: ok)
Video Standard = 0x000000ff
        PAL-B/B1/G/H/I/D/D1/K
Format Video Capture:
        Width/Height      : 720/576
        Pixel Format      : 'YUYV' (YUYV 4:2:2)
        Field             : Interlaced
        Bytes per Line    : 1440
        Size Image        : 829440
        Colorspace        : SMPTE 170M
        Transfer Function : Default (maps to Rec. 709)
        YCbCr/HSV Encoding: Default (maps to ITU-R 601)
        Quantization      : Default (maps to Limited Range)
        Flags             :
Streaming Parameters Video Capture:
        Frames per second: 25.000 (25/1)
        Read buffers     : 2

User Controls

                     brightness 0x00980900 (int)    : min=0 max=10000 step=1 default=6200 value=6200 flags=slider
                       contrast 0x00980901 (int)    : min=0 max=10000 step=1 default=5000 value=5000 flags=slider
                     saturation 0x00980902 (int)    : min=0 max=10000 step=1 default=5000 value=5000 flags=slider
                            hue 0x00980903 (int)    : min=0 max=10000 step=1 default=5000 value=5000 flags=slider
But there was another problem, the sound does not work!
When cx25821-alsa is loaded, the module loads normally, a sound card appears in alsamixer, but without controls.
And if cx25821-alsa is unloaded and then mplayer is started, the system goes into kernel panic...
But I was warned that IDs should be:
It only works with boards with function 01 enabled. To check if your board supports, use lspci -n. If supported, you should see 14f1:8801 or 14f1:8811 PCI device.

I'll figure it out if the ADC board is soldered for nothing ...
My board
My board
1053627_cr3.jpg (485.82 KiB) Viewed 1193 times

Re: Problem with PCi-E card combination of CX25853 and CX25821

Posted: Sat Mar 04, 2023 5:06 am
by vadegdadeg
Desoldered EEPROM, and reading it. The board didn't work without EEPROM, the 'subsystem' field disappeared.
You can see the identifier, circled in red, but I still didn’t understand about the first byte, a quote from the source (cx25821-alsa.c):
/*
* PCI ID Table - 14f1:8801 and 14f1:8811 means function 1: Audio
* Only boards with eeprom and byte 1 at eeprom=1 have it
*/