Ubuntu-media-tree-kernel-builder
Ubuntu-media-tree-kernel-builder copied to clipboard
Can not install more than 4 x Hauppauge WinTV-QuadHD-DVB in a system
Hello,
As per title, I've been struggling to use 5 x Hauppauge WinTV-QuadHD-DVB in a single system without any success.
It seems that the driver will correctly identify 4 of the cards, but the fifth one will fail. These
Linux version 5.13.0-442206031516-generic (buildd@lcy02-amd64-103) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #0+mediatree+hauppauge~hwe-Ubuntu SMP Mon Jun 6 18:58:29 UTC 202 (Ubuntu 5.13.0-442206031516.0+mediatree+hauppauge~hwe-generic 5.13.19)
cx23885: CORE cx23885[0]: subsystem: 0070:6a28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]
tveeprom: Hauppauge model 166100, rev B4I6, serial# 4036162686
cx23885: cx23885[0]: hauppauge eeprom: model=166100
cx23885: CORE cx23885[1]: subsystem: 0070:6b28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]
tveeprom: Hauppauge model 166101, rev B4I6, serial# 4036162686
cx23885: cx23885[1]: hauppauge eeprom: model=166101
cx23885: CORE cx23885[2]: subsystem: 0070:6a28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]
tveeprom: Hauppauge model 166100, rev B4I6, serial# 4036162869
cx23885: cx23885[2]: hauppauge eeprom: model=166100
cx23885: CORE cx23885[3]: subsystem: 0070:6b28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]
tveeprom: Hauppauge model 166101, rev B4I6, serial# 4036162869
cx23885: cx23885[3]: hauppauge eeprom: model=166101
cx23885: CORE cx23885[4]: subsystem: 0070:6a28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]
tveeprom: Hauppauge model 166100, rev B4I6, serial# 4036152220
cx23885: cx23885[4]: hauppauge eeprom: model=166100
cx23885: CORE cx23885[5]: subsystem: 0070:6b28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]
tveeprom: Hauppauge model 166101, rev B4I6, serial# 4036152220
cx23885: cx23885[5]: hauppauge eeprom: model=166101
cx23885: CORE cx23885[6]: subsystem: 0070:6a28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]
tveeprom: Hauppauge model 166100, rev B4I6, serial# 4036162718
cx23885: cx23885[6]: hauppauge eeprom: model=166100
cx23885: CORE cx23885[7]: subsystem: 0070:6b28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]
tveeprom: Hauppauge model 166101, rev B4I6, serial# 4036162718
cx23885: cx23885[7]: hauppauge eeprom: model=166101
cx23885: CORE cx23885[8]: subsystem: 0070:6a28, board: Hauppauge WinTV-HVR1800 [card=2,insmod option]
tveeprom: Hauppauge model 166100, rev B5I6, serial# 4036177626
cx23885: cx23885[8]: hauppauge eeprom: model=166100
Please note that I DID NOT pass the card=2 option, this is somehow automatically inserted.
I have attempted to use pass card=56,56,56,56,56,56,56,56,56,56, but the kernel will complain with:
cx23885: `56' invalid for parameter `card'
card: can only take 8 arguments
The devices all seem identical, as per lspci:
03:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 04)
Subsystem: Hauppauge computer works Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
Flags: bus master, fast devsel, latency 0, IRQ 96
Memory at fc800000 (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: cx23885
Kernel modules: cx23885
04:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 04)
Subsystem: Hauppauge computer works Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
Flags: bus master, fast devsel, latency 0, IRQ 98
Memory at fc600000 (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: cx23885
Kernel modules: cx23885
03:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 04)
Subsystem: Hauppauge computer works Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
Flags: bus master, fast devsel, latency 0, IRQ 96
Memory at fc800000 (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: cx23885
Kernel modules: cx23885
04:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 04)
Subsystem: Hauppauge computer works Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
Flags: bus master, fast devsel, latency 0, IRQ 98
Memory at fc600000 (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: cx23885
Kernel modules: cx23885
0d:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 04)
Subsystem: Hauppauge computer works Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
Flags: bus master, fast devsel, latency 0, IRQ 33
Memory at fbc00000 (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: cx23885
Kernel modules: cx23885
0e:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 04)
Subsystem: Hauppauge computer works Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
Flags: bus master, fast devsel, latency 0, IRQ 41
Memory at fba00000 (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: cx23885
Kernel modules: cx23885
11:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 04)
Subsystem: Hauppauge computer works Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
Flags: bus master, fast devsel, latency 0, IRQ 36
Memory at fb800000 (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: cx23885
Kernel modules: cx23885
12:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 04)
Subsystem: Hauppauge computer works Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
Flags: bus master, fast devsel, latency 0, IRQ 33
Memory at fb600000 (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: cx23885
Kernel modules: cx23885
15:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 04)
Subsystem: Hauppauge computer works Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
Flags: bus master, fast devsel, latency 0, IRQ 33
Memory at fb400000 (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: cx23885
Kernel modules: cx23885
16:00.0 Multimedia video controller: Conexant Systems, Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb (rev 04)
Subsystem: Hauppauge computer works Inc. CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
Flags: bus master, fast devsel, latency 0, IRQ 41
Memory at fb200000 (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: cx23885
Kernel modules: cx23885
The last device will seem to fail due to a firmware error, which I have installed, but I'm assuming this is just because the card detection fails, and obviously it will reject the firmware:
[ 8.200542] tveeprom: Hauppauge model 166100, rev B5I6, serial# 4036177626
[ 8.200547] tveeprom: MAC address is 00:0d:fe:93:2e:da
[ 8.200548] tveeprom: tuner model is SiLabs Si2157 (idx 186, type 4)
[ 8.200550] tveeprom: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)
[ 8.200552] tveeprom: audio processor is CX23888 (idx 40)
[ 8.200553] tveeprom: decoder processor is CX23888 (idx 34)
[ 8.200554] tveeprom: has no radio, has IR receiver, has no IR transmitter
[ 8.200556] cx23885: cx23885[8]: hauppauge eeprom: model=166100
[ 8.205880] cx25840 45-0044: cx23888 A/V decoder found @ 0x88 (cx23885[8])
[ 8.855632] cx25840 45-0044: loaded v4l-cx23885-avcore-01.fw firmware (16382 bytes)
[ 8.900940] tda9887 44-0042: creating new instance
[ 8.900944] tda9887 44-0042: tda988[5/6/7] found
[ 8.901513] tuner: 44-0042: Tuner 74 found with type(s) Radio TV.
[ 8.901527] tda9887 44-0042: destroying instance
[ 8.904243] tda829x 44-0042: could not clearly identify tuner address, defaulting to 60
[ 8.969996] cx23885: cx23885[8]: registered device video4 [v4l2]
[ 8.970016] cx23885: cx23885[8]: registered device vbi0
[ 8.970049] cx23885: cx23885[8]: registered device video0 [mpeg]
[ 8.970066] cx23885: Firmware and/or mailbox pointer not initialized or corrupted, signature = 0x9c9f9f9f, cmd = PING_FW
[ 11.145636] cx23885: ERROR: Firmware load failed (checksum mismatch).
[ 11.149671] cx23885: cx23885_initialize_codec() f/w load failed
[ 11.153700] cx23885: cx23885_dvb_register() allocating 1 frontend(s)
[ 11.153702] cx23885: cx23885[8]: cx23885 based dvb card
[ 11.156427] cx23885: cx23885[8]: frontend initialization failed
[ 11.160493] cx23885: cx23885_dvb_register() dvb_register failed err = -22
[ 11.164475] cx23885: cx23885_dev_setup() Failed to register dvb on VID_C
[ 11.168428] cx23885: cx23885_dev_checkrevision() Hardware revision = 0xd0
[ 11.168432] cx23885: cx23885[8]/0: found at 0000:15:00.0, rev: 4, irq: 33, latency: 0, mmio: 0xfb400000
[ 11.168534] cx23885: cx23885_dev_setup: cx23885_dev_setup() Memory configured for PCIe bridge type 888
[ 11.168576] cx23885: CORE cx23885[9]: subsystem: 0070:6b28, board: UNKNOWN/GENERIC [card=0,insmod option]
[ 11.168578] cx23885: cx23885_pci_quirks: cx23885_pci_quirks()
[ 11.168579] cx23885: cx23885_dev_setup: cx23885_dev_setup() tuner_type = 0x0 tuner_addr = 0x0 tuner_bus = 0
[ 11.168580] cx23885: cx23885_dev_setup: cx23885_dev_setup() radio_type = 0x0 radio_addr = 0x0
[ 11.168581] cx23885: cx23885_reset: cx23885_reset()
[ 11.275082] cx23885: cx23885_sram_channel_setup: cx23885_sram_channel_setup() Configuring channel [VID A]
[ 11.275086] cx23885: cx23885_sram_channel_setup: cx23885_sram_channel_setup() Configuring channel [VID A (VBI)]
[ 11.275088] cx23885: cx23885_sram_channel_setup: cx23885_sram_channel_setup() Configuring channel [TS1 B]
[ 11.275090] cx23885: cx23885_sram_channel_setup: cx23885_sram_channel_setup() Erasing channel [ch4]
[ 11.275091] cx23885: cx23885_sram_channel_setup: cx23885_sram_channel_setup() Erasing channel [ch5]
[ 11.275093] cx23885: cx23885_sram_channel_setup: cx23885_sram_channel_setup() Configuring channel [TS2 C]
[ 11.275095] cx23885: cx23885_sram_channel_setup: cx23885_sram_channel_setup() Configuring channel [TV Audio]
[ 11.275096] cx23885: cx23885_sram_channel_setup: cx23885_sram_channel_setup() Erasing channel [ch8]
[ 11.275098] cx23885: cx23885_sram_channel_setup: cx23885_sram_channel_setup() Erasing channel [ch9]
[ 11.304388] cx23885: cx23885_dev_checkrevision() Hardware revision = 0xd0
[ 11.304392] cx23885: cx23885[9]/0: found at 0000:16:00.0, rev: 4, irq: 41, latency: 0, mmio: 0xfb200000
After a rmmod cx23885, I have tried manually loading the module with:
modprobe cx23885 disable_analog_audio=1 disable_analog_video=1 dma_reset_workaround=2
which will fail with:
[ 1346.398675] cx23885: cx23885[8]: cx23885 based dvb card
[ 1346.399114] cx23885: cx23885[8]: frontend initialization failed
[ 1346.399207] cx23885: cx23885_dvb_register() dvb_register failed err = -22
See full log of module: cx23885.log
Again, trying to manually load with the cards option produces an error:
root@dtv1:~# dmesg -C
root@dtv1:~# modprobe cx23885 card=56,56,56,56,56,56,56,56,56,56
modprobe: ERROR: could not insert 'cx23885': Invalid argument
root@dtv1:~# dmesg
[ 1493.242500] card: can only take 8 arguments
[ 1493.242586] cx23885: `56' invalid for parameter `card'
As an aside, I have the same problem on non-HWE (the 5.4.x kernels).
I have also tried the latest Ubuntu HWE 20.04 kernel (5.15.x branch), with the latest media_build tree and I'm met with similar issues, although not so verbose, but clearly an indexing issue:
UBSAN: array-index-out-of-bounds in /root/media_build/v4l/cx23885-core.c:908:10
cx23885_initdev+0x966/0x980 [cx23885]
cx23885_init+0x36/0x1000 [cx23885]
UBSAN: array-index-out-of-bounds in /root/media_build/v4l/cx23885-core.c:909:20
cx23885_initdev+0x949/0x980 [cx23885]
cx23885_init+0x36/0x1000 [cx23885]
UBSAN: array-index-out-of-bounds in /root/media_build/v4l/cx23885-core.c:998:2
cx23885_initdev+0x934/0x980 [cx23885]
cx23885_init+0x36/0x1000 [cx23885]
cx23885: CORE cx23885[8]: subsystem: 0070:6a28, board: Hauppauge WinTV-HVR1800lp [card=1,insmod option]
cx23885: cx23885[8]: hauppauge eeprom: model=166100
cx25840 37-0044: cx23888 A/V decoder found @ 0x88 (cx23885[8])
cx25840 37-0044: loaded v4l-cx23885-avcore-01.fw firmware (16382 bytes)
cx23885: cx23885_dvb_register() allocating 1 frontend(s)
cx23885: cx23885[8]: cx23885 based dvb card
cx23885: cx23885[8]: frontend initialization failed
cx23885: cx23885_dvb_register() dvb_register failed err = -22
cx23885: cx23885_dev_setup() Failed to register dvb on VID_C
cx23885: cx23885_dev_checkrevision() Hardware revision = 0xd0
cx23885: cx23885[8]/0: found at 0000:15:00.0, rev: 4, irq: 33, latency: 0, mmio: 0xfb400000
cx23885: CORE cx23885[9]: subsystem: 0070:6b28, board: UNKNOWN/GENERIC [card=0,insmod option]
cx23885: cx23885_dev_checkrevision() Hardware revision = 0xd0
cx23885: cx23885[9]/0: found at 0000:16:00.0, rev: 4, irq: 41, latency: 0, mmio: 0xfb200000
Please advise.
I'll post the resolution, as I've finally figured out what's going on.
The cx23885 defines a maximum number of 8 devices, for some... reasons:
#define CX23885_MAXBOARDS 8
Changing this value to 16 technically fixes the driver issue. You can now pass up to 16 parameters to card=, or just let the module autodetect, as it will do a good job by itself.
Next thing you'll find out is that the default Ubuntu kernel defines a CONFIG_DVB_MAX_ADAPTERS = 8, for, again, some obscure reasons.
The author of this PPA, @b-rad-NDi patches the setting itself to 16, as per this comment: https://github.com/b-rad-NDi/Ubuntu-media-tree-kernel-builder/issues/40#issuecomment-371512505
I attempted to use the script in this repository to plug in my own changes and make the all the debs in the PPA, but I was highly unsuccessful - there are no instructions, and I couldn't figure out the correct procedure/order of the operations.
In the end, I managed to re-compile the debs posted, by downloading the source debs of this project and following the re-build instructions after making my changes.
I've followed this old article: https://raphaelhertzog.com/2010/12/15/howto-to-rebuild-debian-packages/
End result:
[ 4.763345] cx23885: CORE cx23885[0]: subsystem: 0070:6a28, board: Hauppauge WinTV-QuadHD-DVB [card=56,insmod option]
[ 5.119305] tveeprom: Hauppauge model 166100, rev B4I6, serial# 4036162686
[ 5.119319] cx23885: cx23885[0]: hauppauge eeprom: model=166100
[ 5.149307] cx23885: CORE cx23885[1]: subsystem: 0070:6b28, board: Hauppauge WinTV-QuadHD-DVB [card=56,insmod option]
[ 5.507337] tveeprom: Hauppauge model 166101, rev B4I6, serial# 4036162686
[ 5.507350] cx23885: cx23885[1]: hauppauge eeprom: model=166101
[ 5.531103] cx23885: CORE cx23885[2]: subsystem: 0070:6a28, board: Hauppauge WinTV-QuadHD-DVB [card=56,insmod option]
[ 5.884254] tveeprom: Hauppauge model 166100, rev B4I6, serial# 4036162869
[ 5.884268] cx23885: cx23885[2]: hauppauge eeprom: model=166100
[ 5.907618] cx23885: CORE cx23885[3]: subsystem: 0070:6b28, board: Hauppauge WinTV-QuadHD-DVB [card=56,insmod option]
[ 6.260363] tveeprom: Hauppauge model 166101, rev B4I6, serial# 4036162869
[ 6.260376] cx23885: cx23885[3]: hauppauge eeprom: model=166101
[ 6.285376] cx23885: CORE cx23885[4]: subsystem: 0070:6a28, board: Hauppauge WinTV-QuadHD-DVB [card=56,insmod option]
[ 6.636594] tveeprom: Hauppauge model 166100, rev B4I6, serial# 4036152220
[ 6.636608] cx23885: cx23885[4]: hauppauge eeprom: model=166100
[ 6.661288] cx23885: CORE cx23885[5]: subsystem: 0070:6b28, board: Hauppauge WinTV-QuadHD-DVB [card=56,insmod option]
[ 7.012620] tveeprom: Hauppauge model 166101, rev B4I6, serial# 4036152220
[ 7.012633] cx23885: cx23885[5]: hauppauge eeprom: model=166101
[ 7.037313] cx23885: CORE cx23885[6]: subsystem: 0070:6a28, board: Hauppauge WinTV-QuadHD-DVB [card=56,insmod option]
[ 7.388613] tveeprom: Hauppauge model 166100, rev B4I6, serial# 4036162718
[ 7.388626] cx23885: cx23885[6]: hauppauge eeprom: model=166100
[ 7.413091] cx23885: CORE cx23885[7]: subsystem: 0070:6b28, board: Hauppauge WinTV-QuadHD-DVB [card=56,insmod option]
[ 7.764609] tveeprom: Hauppauge model 166101, rev B4I6, serial# 4036162718
[ 7.764622] cx23885: cx23885[7]: hauppauge eeprom: model=166101
[ 7.789148] cx23885: CORE cx23885[8]: subsystem: 0070:6a28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]
[ 8.140617] tveeprom: Hauppauge model 166100, rev B5I6, serial# 4036177626
[ 8.140631] cx23885: cx23885[8]: hauppauge eeprom: model=166100
[ 8.165655] cx23885: CORE cx23885[9]: subsystem: 0070:6b28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]
[ 8.516558] tveeprom: Hauppauge model 166101, rev B5I6, serial# 4036177626
[ 8.516571] cx23885: cx23885[9]: hauppauge eeprom: model=166101
All 5 cards are detected, all 20 adapters are showing up properly.
UEFI + Secure boot is used.