chewitt / linux

Linux kernel source tree -- WARNING I REBASE MY BRANCHES!
Other
23 stars 17 forks source link

Support for embedded DVB cards #9

Open chewitt opened 1 year ago

chewitt commented 1 year ago

DVB cards embedded in Android TV boxes are not currently support supported. In vendor-kernel images the drivers are often unlicensed (creating issues with code provenance), hacked to work with a single tuner/demo combination (found in a specific device) and use Amlogic's own GPIO framework instead of upstream. The following are tuner/demod combinations where we have box schematics:

SML5442TW (O2.cz streaming box):

Khadas DTV Board for VIM2:

WeTek Play2 (ATSC):

WeTek Play2 (DVB-S/S2):

WeTek Play2 (DVB-C/T/T2):

Availink (with some hints/pressure from myself) have published GPLv2 sources for their recent chipsets. However they claim to have no sources for the older AVL6211 chip; the various iterations of driver found in 3.14 kernel sources are the only "prior-art" available.

In the upstream DVB framework a front-end driver is linked to required demod and tuner (and other required) drivers. These do internal processing to output to a demux that converts raw signal? into a playable audio/video stream. It is unclear to myself (being ignorant on DVB topics and what's in the upstream kernel already) whether we can use what appears to be software demux support in the kernel, or we need to create a V4L2 compatible driver for a demux IP on the SOC. Amlogic's older drivers appear to be feeding something custom, but since Amlogic has their own DRM framwork everything involving is always custom; so to someone who can't truly read the code, the required direction is unclear.

First stage of support would be to create a front-end framework to probe based on device-tree content and load tuner/demod combinations from the same drivers located within a current-version kernel tree. Second stage is figuring out the demux story. Final stage is attempting to get code into an upstreamable form.

chewitt commented 1 year ago

Some early work on getting tuner/demod drivers cleaner and building on upstream kernels can be found here:

https://github.com/chewitt/linux/commits/dvb-sucks

The front-end and demux drivers are imported to the branch but appear to have dependencies on pinctrl/resets/headers from the Amlogic vendor kernel, so will not compile without further effort.