9.2.2 DVB tbs driver / Hauppauge USB wintv dual HD / Tvheadend conflict

I wonder if tvheadend 4.2 would produce different results than 4.3 which is what is apparently used.

I had to revert to 4.2 to get proper functionality.

The issue is nothing to do with TVH.

The problem is the crazycat driver, it crashes the kernel straight after the firmware for this adaptor has been loaded, which you can see in the previous log provided.

[   34.467935@2] si2168 6-0064: downloading firmware from file 'dvb-demod-si2168-b40-01.fw'
[   34.467946@2] Unable to handle kernel paging request at virtual address fffffffe0
...

I have a different card but is uses the same demodulator and it doesn’t crash.

[ 64.292171@3] si2168 5-0064: downloading firmware from file ‘dvb-demod-si2168-b40-01.fw’
[ 65.927518@5] si2168 5-0064: firmware version: B 4.0.25

A bit of a long shot but you could try to download another (older) firmware from here and put it under /storage/.config/firmware (Reboot required). The one under /usr/lib/kernel-overlays/base/lib/firmware/ seems to be 4.0.25.

@Rascal is yours a 3.14 or 4.9 device?

My bad, it’s a 3.14. I guess the issue is with -ng and 4.9.

I am struggling with the same problem here using a Hauppauge dual DVB-T2 stick connected to Hardkernel N2.
Meanwhile it’s 9.2.3. If I enable “latest drivers from kernel” the driver (?) crashes. System works but tvheadend server (4.2) doesn’t. No web interface, no connection from clients possible. Without driver add-ons it works, but without the second receiver of the Hauppauge stick.

If I shall provide logs I am ready to do.

More information are available in this thread: CoreELEC 9.2.3: tvheadend not working
With the help of Ray I found out that it seems to be the same problem as discussed here.

Yes it’s the same issue. There is just no chance to debug it Jochen. I already looked at an easy fix. I don’t think anyone in the Team can tackle it either.
Only thing I can do is maybe make a build with a lot of printk and then send it to you. See what it prints before oops happen.

It seems to be the driver packet from the addon “latest drivers from kernel”, right? So, at least, the packet to blame is identified?
Sure, I would like to try a kernel with massive printk. Last time I did that was when I added a 2nd SCSI adapter to Linux kernel1.x kernel driver. :wink:

Sorry, I don’t have any experience in cross compiling.

Yes but this driver “addon” contains a lot of latest linux media driver code with is compiled with the current linux source code. So it is not easy to identify. My guess is that it’s a 4.9 Kernel issue as it works with 3.14 kernel which uses the same addon driver code.

But it works in 9.2.1:
> # uname -a
> Linux odroid 4.9.190 #1 SMP PREEMPT Wed Nov 27 07:28:48 GMT 2019 aarch64 GNU/Linux
May be a 4.9 kernel issue, but 4.9.190 works.

And now please do the same uname on 9.2.3 and the me the difference.

Sure. Here it is:
# uname -a
Linux odroid 4.9.113 #1 SMP PREEMPT Tue Jun 16 12:53:14 CEST 2020 aarch64 GNU/Linux

That’s from the development built you sent me. Why is ist an older kernel than in 9.2.1?
Now I would like to try 9.2.3 with kernel release 4.9.190.

@jochen02 or anyone else. Can you try this test build:
https://mega.nz/file/g9x1GApJ#SQlsjz2piN2YpNjd8zg2zsyoSIJ89l84oI-hm2OhFUg

EDIT: mpeg2 playback seems to be broken in this build. But at least check if it oops too.

# uname -a

Linux odroid 4.9.113 #1 SMP PREEMPT Sat Jun 20 12:06:56 CEST 2020 aarch64 GNU/Linux
And no, it doesn’t work.
DVB drivers from latest kernel: activated
Crazy Cat drivers: deactivated
dmesg: http://ix.io/2pEO

Reboot after deactivating DVB-T driver addons: http://ix.io/2pEQ
DVB-T works but without the 2nd receiver of the Hauppauge stick.

For my understanding: With activated “DVB drivers from latest kernel” the kernel driver will be dynamically loaded when the particular DVB-T stick is recognized? Should the problem research not focus on the driver package (the addon)?

The addon has not changed since over a year.

Ok. Is it still under development or is it an orphaned addon?
May be kernel 4.9.190 with CoreELEC 9.2.3 seems to be worth a try?

Why does 9.2.3 come with an older kernel as 9.2.1? Or is that an error in kernel versioning of the CoreELEC development team?

Because somewhere last year there was a decision by CoreELEC developers to use pure AML Android Kernel. Which fixed a lot of playback issues and made generic S905x2(3) and S922X possible.
Hardkernel kernel is a bit messy and very HK Products specific.

I suspect though that the fix is hidden there somewhere. They pull in lts changes from mainline which explains why the minor version was higher.

I was no longer part of CE back then but it’s how I understand the reasons about the switch. Maybe a CE dev can correct me if I am wrong.

Thank you for the information.
I hope users of not so usual DVB-T2 sticks are not fucked up now.

Looks like only this usb tuner is affected so far.

@jochen02: Can you please try https://mega.nz/file/J5RhSAYD#0KgTEpUNlPrqnu8jJmw-3TBSYqPooZ5f0j4-tMmmsb4

It is 4.9.228 kernel. Yet still with some broken mpeg2 decoder but thats just for a quick test. I can fix the rest later. Probably lots of bugs inside but it’s only relevant to see if the oops happen.