View Issue Details

IDProjectCategoryView StatusLast Update
0001302channel: elrepo/el9--elrepo--request-for-enhancement--public2022-12-20 19:13
Reportermetatron320 Assigned Topperry  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Summary0001302: Possible to build kmod-em82xx (and possibly a few others) for TV tuner support in el9?
DescriptionI am attempting to install a Hauppauge WinTV-dualHD USB tuner on an el9-based system (in this case, AlmaLinux 9), and it appears that all of the necessary drivers are no longer included by default in the upstream kernel. All of the necessary drivers appear to exist in the kernel source, they simply are not compiled and available for use in the el9 kernel. I was wondering if it would be possible to get kmod packages for the necessary drivers?

The tuner itself is identified by lsusb as follows:
Bus 001 Device 007: ID 2040:826d Hauppauge 955D

After plugging in the adapter, dmesg shows messages indicating there is a new USB device, but that's about it (no drivers are loaded and the adapter is not usable).

I booted my system using a Fedora 34 Live DVD just to confirm that the adapter should work in kernel 5.14, and it does indeed appear to work. I have included the dmesg output from Fedora 34 below for reference. I can see that the em28xx driver is needed, as is the si2157 driver. An ELRepo el9 package for the si2157 driver is already available (kmod-si2157), but there is no package for the em28xx driver yet. Would it be possible to make the em28xx driver available?

I am also not sure if any other drivers are needed (for example, lgdt3306a, tveeprom, and dvbdev are listed as well, but I wasn't sure if these were drivers/modules). If any other drivers are needed, would it be possible to make them available as well? Thank you so much for considering this request!

=== EL9 and Fedora 34 dmesg output ===
[ 365.586713] usb 2-1: new high-speed USB device number 6 using xhci_hcd
[ 365.713630] usb 2-1: New USB device found, idVendor=2040, idProduct=826d, bcdDevice= 1.00
[ 365.713643] usb 2-1: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[ 365.713648] usb 2-1: Product: 955D
[ 365.713652] usb 2-1: Manufacturer: HCW
[ 365.713656] usb 2-1: SerialNumber: xxxxxxxxxx

=== el9 dmesg stops here due to lack of drivers, Fedora 34 dmesg output continues below ===
[ 366.290277] em28xx 2-1:1.0: New device HCW 955D @ 480 Mbps (2040:826d, interface 0, class 0)
[ 366.290283] em28xx 2-1:1.0: DVB interface 0 found: bulk
[ 366.341992] em28xx 2-1:1.0: chip ID is em28174
[ 367.484897] em28xx 2-1:1.0: EEPROM ID = 26 00 01 00, EEPROM hash = 0x7c99074e
[ 367.484910] em28xx 2-1:1.0: EEPROM info:
[ 367.484913] em28xx 2-1:1.0: microcode start address = 0x0004, boot configuration = 0x01
[ 367.492625] em28xx 2-1:1.0: AC97 audio (5 sample rates)
[ 367.492634] em28xx 2-1:1.0: 500mA max power
[ 367.492637] em28xx 2-1:1.0: Table at offset 0x27, strings=0x0a72, 0x187c, 0x086a
[ 367.544717] em28xx 2-1:1.0: Identified as Hauppauge WinTV-dualHD 01595 ATSC/QAM (card=100)
[ 367.548684] tveeprom: Hauppauge model 204201, rev C2I6, serial# 14330228
[ 367.548689] tveeprom: tuner model is SiLabs Si2157 (idx 186, type 4)
[ 367.548690] tveeprom: TV standards PAL(B/G) NTSC(M) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xfc)
[ 367.548693] tveeprom: audio processor is None (idx 0)
[ 367.548694] tveeprom: has no radio, has IR receiver, has no IR transmitter
[ 367.548697] em28xx 2-1:1.0: dvb set to bulk mode.
[ 367.600816] em28xx 2-1:1.0: chip ID is em28174
[ 368.739797] em28xx 2-1:1.0: EEPROM ID = 26 00 01 00, EEPROM hash = 0x7c99074e
[ 368.739809] em28xx 2-1:1.0: EEPROM info:
[ 368.739813] em28xx 2-1:1.0: microcode start address = 0x0004, boot configuration = 0x01
[ 368.746892] em28xx 2-1:1.0: AC97 audio (5 sample rates)
[ 368.746900] em28xx 2-1:1.0: 500mA max power
[ 368.746904] em28xx 2-1:1.0: Table at offset 0x27, strings=0x0a72, 0x187c, 0x086a
[ 368.798719] em28xx 2-1:1.0: Identified as Hauppauge WinTV-dualHD 01595 ATSC/QAM (card=100)
[ 368.801796] tveeprom: Hauppauge model 204201, rev C2I6, serial# 14330228
[ 368.801800] tveeprom: tuner model is SiLabs Si2157 (idx 186, type 4)
[ 368.801802] tveeprom: TV standards PAL(B/G) NTSC(M) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xfc)
[ 368.801814] tveeprom: audio processor is None (idx 0)
[ 368.801815] tveeprom: has no radio, has IR receiver, has no IR transmitter
[ 368.801818] em28xx 2-1:1.0: dvb ts2 set to bulk mode.
[ 369.002288] usbcore: registered new interface driver em28xx
[ 369.163144] em28xx 2-1:1.0: Binding DVB extension
[ 369.390348] i2c i2c-12: Added multiplexed i2c bus 15
[ 369.390354] lgdt3306a 12-0059: LG Electronics LGDT3306A successfully identified
[ 369.640889] si2157 15-0060: Silicon Labs Si2147/2148/2157/2158 successfully attached
[ 369.640920] dvbdev: DVB: registering new adapter (2-1:1.0)
[ 369.640925] em28xx 2-1:1.0: DVB: registering adapter 0 frontend 0 (LG Electronics LGDT3306A VSB/QAM Frontend)...
[ 369.640932] dvbdev: dvb_create_media_entity: media entity 'LG Electronics LGDT3306A VSB/QAM Frontend' registered.
[ 369.641358] dvbdev: dvb_create_media_entity: media entity 'dvb-demux' registered.
[ 369.642490] em28xx 2-1:1.0: DVB extension successfully initialized
[ 369.642495] em28xx 2-1:1.0: Binding DVB extension
[ 369.648676] i2c i2c-14: Added multiplexed i2c bus 16
[ 369.648679] lgdt3306a 14-000e: LG Electronics LGDT3306A successfully identified
[ 369.651618] si2157 16-0062: Silicon Labs Si2147/2148/2157/2158 successfully attached
[ 369.651633] dvbdev: DVB: registering new adapter (2-1:1.0)
[ 369.651635] em28xx 2-1:1.0: DVB: registering adapter 1 frontend 0 (LG Electronics LGDT3306A VSB/QAM Frontend)...
[ 369.651638] dvbdev: dvb_create_media_entity: media entity 'LG Electronics LGDT3306A VSB/QAM Frontend' registered.
[ 369.651953] dvbdev: dvb_create_media_entity: media entity 'dvb-demux' registered.
[ 369.654539] em28xx 2-1:1.0: DVB extension successfully initialized
[ 369.654543] em28xx: Registered (Em28xx dvb Extension) extension
[ 369.658245] em28xx 2-1:1.0: Registering input extension
[ 369.795635] Registered IR keymap rc-hauppauge
[ 369.796059] rc rc0: Hauppauge WinTV-dualHD 01595 ATSC/QAM as /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/rc/rc0
[ 369.796204] rc rc0: lirc_dev: driver em28xx registered at minor = 0, scancode receiver, no transmitter
[ 369.796276] input: Hauppauge WinTV-dualHD 01595 ATSC/QAM as /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/rc/rc0/input25
[ 369.796410] em28xx 2-1:1.0: Input extension successfully initialized
[ 369.796414] em28xx 2-1:1.0: Remote control support is not available for this card.
[ 369.796417] em28xx: Registered (Em28xx Input Extension) extension
TagsNo tags attached.

Activities

pperry

2022-12-19 03:01

administrator   ~0008862

I'm not an expert on digital TV stuff, but Just having a very quick preliminary look and this is not looking hopeful:

[phil@Build64R9 boot]$ cat config-5.14.0-162.6.1.el9_1.x86_64 | grep -i tv
# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set

which would indicate that the underlying frameworks are not enabled in the RHEL kernel.

By contrast, on the Fedora kernel we see:

[phil@Build64F37 boot]$ cat config-6.0.12-300.fc37.x86_64 | grep -i tv
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
# Digital TV options

So I would say we are fighting an uphill battle with the RHEL kernel.

As an alternative, have you tried our own elrepo kernel-ml package, based on the latest upstream kernels. A quick look shows CONFIG_MEDIA_DIGITAL_TV_SUPPORT is enabled as is the EM28XX module. This may provide you with an easy solution to getting your hardware running on Alma Linux.

https://elrepo.org/linux/kernel/el9/x86_64/RPMS/

Are you able to try this kernel and let us know how it compares to the fedora kernel for you?

metatron320

2022-12-20 00:27

reporter   ~0008864

Thanks so much for looking into this for me! At your suggestion, I installed the kernel-ml packages and booted into this kernel. After plugging in the adapter, I saw the dmesg output below:

[ 217.885971] usb 1-5: new high-speed USB device number 12 using xhci_hcd
[ 218.012604] usb 1-5: New USB device found, idVendor=2040, idProduct=826d, bcdDevice= 1.00
[ 218.012618] usb 1-5: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[ 218.012623] usb 1-5: Product: 955D
[ 218.012627] usb 1-5: Manufacturer: HCW
[ 218.012631] usb 1-5: SerialNumber: 0014330228
[ 218.045483] mc: Linux media interface: v0.10
[ 218.058000] videodev: Linux video capture interface: v2.00
[ 218.063297] em28xx 1-5:1.0: New device HCW 955D @ 480 Mbps (2040:826d, interface 0, class 0)
[ 218.063300] em28xx 1-5:1.0: DVB interface 0 found: bulk
[ 218.115135] em28xx 1-5:1.0: chip ID is em28174
[ 219.252720] em28xx 1-5:1.0: EEPROM ID = 26 00 01 00, EEPROM hash = 0x7c99074e
[ 219.252733] em28xx 1-5:1.0: EEPROM info:
[ 219.252737] em28xx 1-5:1.0: microcode start address = 0x0004, boot configuration = 0x01
[ 219.259505] em28xx 1-5:1.0: AC97 audio (5 sample rates)
[ 219.259513] em28xx 1-5:1.0: 500mA max power
[ 219.259517] em28xx 1-5:1.0: Table at offset 0x27, strings=0x0a72, 0x187c, 0x086a
[ 219.311011] em28xx 1-5:1.0: Identified as Hauppauge WinTV-dualHD 01595 ATSC/QAM (card=100)
[ 219.317818] tveeprom: Hauppauge model 204201, rev C2I6, serial# 14330228
[ 219.317821] tveeprom: tuner model is SiLabs Si2157 (idx 186, type 4)
[ 219.317822] tveeprom: TV standards PAL(B/G) NTSC(M) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xfc)
[ 219.317823] tveeprom: audio processor is None (idx 0)
[ 219.317824] tveeprom: has no radio, has IR receiver, has no IR transmitter
[ 219.317826] em28xx 1-5:1.0: dvb set to bulk mode.
[ 219.369168] em28xx 1-5:1.0: chip ID is em28174
[ 220.508747] em28xx 1-5:1.0: EEPROM ID = 26 00 01 00, EEPROM hash = 0x7c99074e
[ 220.508760] em28xx 1-5:1.0: EEPROM info:
[ 220.508764] em28xx 1-5:1.0: microcode start address = 0x0004, boot configuration = 0x01
[ 220.515382] em28xx 1-5:1.0: AC97 audio (5 sample rates)
[ 220.515391] em28xx 1-5:1.0: 500mA max power
[ 220.515394] em28xx 1-5:1.0: Table at offset 0x27, strings=0x0a72, 0x187c, 0x086a
[ 220.566974] em28xx 1-5:1.0: Identified as Hauppauge WinTV-dualHD 01595 ATSC/QAM (card=100)
[ 220.572293] tveeprom: Hauppauge model 204201, rev C2I6, serial# 14330228
[ 220.572296] tveeprom: tuner model is SiLabs Si2157 (idx 186, type 4)
[ 220.572297] tveeprom: TV standards PAL(B/G) NTSC(M) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xfc)
[ 220.572298] tveeprom: audio processor is None (idx 0)
[ 220.572299] tveeprom: has no radio, has IR receiver, has no IR transmitter
[ 220.572301] em28xx 1-5:1.0: dvb ts2 set to bulk mode.
[ 220.772800] usbcore: registered new interface driver em28xx
[ 220.794215] em28xx 1-5:1.0: Binding DVB extension
[ 220.800910] i2c i2c-14: Added multiplexed i2c bus 17
[ 220.800912] lgdt3306a 14-0059: LG Electronics LGDT3306A successfully identified
[ 220.804411] si2157 17-0060: Silicon Labs Si2157 successfully attached
[ 220.804420] dvbdev: DVB: registering new adapter (1-5:1.0)
[ 220.804421] em28xx 1-5:1.0: DVB: registering adapter 0 frontend 0 (LG Electronics LGDT3306A VSB/QAM Frontend)...
[ 220.805003] em28xx 1-5:1.0: DVB extension successfully initialized
[ 220.805005] em28xx 1-5:1.0: Binding DVB extension
[ 220.808880] i2c i2c-16: Added multiplexed i2c bus 18
[ 220.808882] lgdt3306a 16-000e: LG Electronics LGDT3306A successfully identified
[ 220.810789] si2157 18-0062: Silicon Labs Si2157 successfully attached
[ 220.810798] dvbdev: DVB: registering new adapter (1-5:1.0)
[ 220.810799] em28xx 1-5:1.0: DVB: registering adapter 1 frontend 0 (LG Electronics LGDT3306A VSB/QAM Frontend)...
[ 220.811344] em28xx 1-5:1.0: DVB extension successfully initialized
[ 220.811346] em28xx: Registered (Em28xx dvb Extension) extension
[ 220.817893] em28xx 1-5:1.0: Registering input extension
[ 220.841032] Registered IR keymap rc-hauppauge
[ 220.841188] rc rc0: Hauppauge WinTV-dualHD 01595 ATSC/QAM as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/rc/rc0
[ 220.841282] rc rc0: lirc_dev: driver em28xx registered at minor = 0, scancode receiver, no transmitter
[ 220.841314] input: Hauppauge WinTV-dualHD 01595 ATSC/QAM as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/rc/rc0/input33
[ 220.841372] em28xx 1-5:1.0: Input extension successfully initialized
[ 220.841375] em28xx 1-5:1.0: Remote control support is not available for this card.
[ 220.841376] em28xx: Registered (Em28xx Input Extension) extension
[ 239.764671] si2157 17-0060: found a 'Silicon Labs Si2157-A30 ROM 0x50'
[ 239.764777] si2157 17-0060: Using ROM firmware.
[ 239.815174] si2157 17-0060: firmware version: 3.0.5
[ 239.869572] si2157 18-0062: found a 'Silicon Labs Si2157-A30 ROM 0x50'
[ 239.869606] si2157 18-0062: Using ROM firmware.
[ 239.920346] si2157 18-0062: firmware version: 3.0.5

Success! The OS recognizes the adapter without issue, and I was able to access it successfully with a variety of apps. As far as I can tell, the rest of my system is working fine on this kernel. I know this probably isn't the proper forum for this, but are there any potential problems or issues with using kernel-ml on my system? I have never used a kernel that wasn't "out of the box" for my distro, so it feels a bit like living on the edge. Is there any chance building the various modules used by the adapter would allow me to use the "out of the box" el9 kernel, or is it simply not possible to get it to work without recompiling the el9 kernel with the necessary "digital TV options" turned on (and I assume there's no way to get RHEL to do this upstream)?

Thanks again!!

pperry

2022-12-20 04:15

administrator   ~0008865

Hi,

Great news that everything works with kernel-ml.

I completely get what you are saying with using a non-distro kernel. Our kernel-ml package is based upon the latest upstream mainline kernel (hence the -ml denotion) and receives regular updates through dnf (make sure you have the elrepo-kernel repository enabled). We simply cannot answer the question as to whether this may potentially cause issues elsewhere as it's not a thoroughly tested scenario like the distro kernel, and is a constantly changing beast, so it is entirely possible it may cause issues at some point.

Another alternative at some point will be out kernel-lt release, although not yet available for el9. The kernel-lt release will be based on an LTS kernel for the lifetime of that kernel, and will thus be far less cutting edge with greater stability in terms of removing the constant churn and thus may prove a more stable long-term choice than kernel-ml whilst still providing a "newer" kernel than the distro kernel and with the features you require enabled. A kernel-lt package will be available in due course, but no time line is available yet.

Regarding building the modules you require, I believe this is not going to be possible as the underlying subsystem is completely disabled, including stuff that is built into the kernel and not available to build as a loadable module, so getting this working on the RHEL kernel is a non-starter. It is also extremely unlikely Red Hat would enable digital TV support - they make executive business decisions about which parts of the kernel to enable/disable based on what they wish to support for the next 10+ year lifetime of RHEL. Red Hat clearly do not see digital TV support as a core part of their market, so it is completely understandable they would disable it and not want/have the headache of maintaining backported patches for it for the next 10 years.

Another alternative may be to rebuild the RHEL distro kernel with these options enabled. That's likely relatively easy to do now (although not something we offer) whilst the RHEL kernel is young and still closely resembles it's 5.14 origins, but as RH backport more and more changes into their distro kernel, but ignore the digital TV subsystem they have disabled, the bits you require may fail to compile as they become unmaintained. This also has the risk that the bits you enable and use may present security risks - something that is being actively addressed in the kernel-ml kernel based on the latest upstream release but not in the old unmaintained 5.14 kernel code.

Your final option would of course be to select a distro with native hardware support enabled (such as fedora), but I'm sure you have reasons for choosing Alma. If the system is ONLY a digital TV system, then a RHEL-based distro may not be the most obvious choice, but I'm sure you have other reasons on which you have based your choice.

So, for now, our kernel-ml is your easiest option for getting this working on a RHEL-based distro such as Alma.

metatron320

2022-12-20 18:15

reporter   ~0008867

Sounds good. I suspect I'll switch to the kernel-lt packages once they're available for el9, but for now I'm happy to hang with kernel-ml a bit and see how things go. Thanks so much for your help! Please feel free to close this ticket!

pperry

2022-12-20 19:13

administrator   ~0008868

Thanks for the feedback.

Closing now, but please feel free to raise further reports if you have any issues.

Issue History

Date Modified Username Field Change
2022-12-18 22:59 metatron320 New Issue
2022-12-19 03:01 pperry Note Added: 0008862
2022-12-19 03:02 pperry Assigned To => pperry
2022-12-19 03:02 pperry Status new => feedback
2022-12-20 00:27 metatron320 Note Added: 0008864
2022-12-20 00:27 metatron320 Status feedback => assigned
2022-12-20 04:15 pperry Note Added: 0008865
2022-12-20 18:15 metatron320 Note Added: 0008867
2022-12-20 19:13 pperry Note Added: 0008868
2022-12-20 19:13 pperry Status assigned => resolved
2022-12-20 19:13 pperry Resolution open => no change required