[Regression 5.14] media: dvb userspace api

From: Soeren Moch
Date: Wed Aug 11 2021 - 08:16:08 EST

Commit 819fbd3d8ef36c09576c2a0ffea503f5c46e9177 ("media: dvb header
files: move some headers to staging") moved audio, video, and osd parts
of the media DVB API to staging and out of kernel headers. But this is
part of the media userspace API, removing this causes regressions. There
already is a RedHat bug filed against this [1], and cannot be resolved
there, of course. Please revert the above mentioned commit.


Please help to keep the media DVB API intact. From all my previous
experience with Mauro, he would otherwise just ignore this request and
later claim: it was removed and cannot be brought back. The userspace
behind this API is a program suite called VDR ("video disk recorder"),
which was part of the linux media ecosystem from the beginning, is still
part of linux distributions like RedHat/Fedora, Debian, SuSE, Ubuntu,
easyVDR, yaVDR, is actively developed further, and runs with a bigger
community behind it.


From many previous discussions you know that the av7110 driver, the DVB
API, and especially also the output part of it, is in active use. I also
asked several times to pull the saa716x driver [2], which also
implements the full DVB API, among others for the successor cards of
saa7146/av7110-based so called full-featured DVB cards. I also offered
several times to maintain both drivers, and the related API.

From your side there was no support whatsoever for this DVB API, you are
fighting to remove it, against better knowledge that this is used. You
gave no technical reason for this. Just, "it is an old API, I don't like
it". And you wrote, that you do not understand it. This probably is the
main reason for all the related problems. Your request to convert
everything from the DVB API to the video4linux2 API is like "I don't
like serial drivers, it is an old API, convert everything from serial to
drm-framebuffer drivers, if you want to get boot messages out of the
DVB and v4l2 are totally different APIs with different purpose,
different supported hardware, different supported userspace
applications. Just because there are much more drivers implementing v4l2
than DVB output is no good reason to kill this API, associated drivers
and the community that keeps all this running. If you don't want to
maintain the full DVB API and av7110/saa716x drivers any longer, which
is obvious, there is a better solution than just ripping all this out. I
just renew my offer to take over this job.
If there really is a broken frontend support for av7110, I will have a
look at this. Can you provide more detailed information about this?
There are many flavours of this card with different frontends, so maybe
I missed this. Your commit message "the decoder supports only MPEG2,
with is not compatible with several modern DVB streams" is at least
misleading. The most popular satellite TV provider in Germany (Astra)
still transmits most of the interesting programs MPEG-2 encoded, so also
this is actively used and no reason to retire this card.

In all my previous discussions with maintainers from arm/mvebu, arm/imx,
arm/rockchip, arm/soc, net, net/wireless, staging, usb, I always
experienced technical support and fruitful discussions, which lead to
fixed bugs, working hardware, and happy users.
Only media is special. Here it can take up to five months, 3 full linux
release cycles, to get a patch merged that was marked as fix and marked
for stable, with only a single review comment in all that time: add more
comments. In media the supporter recommends to maintain drivers outside
the kernel, because people are happy with that. Of course nobody in the
related community is happy with that, and maintaining the driver itself
is the easiest part for me. Other people maintain scripts and how-tos
for integrating the driver into different distributions with different
update policies and scripts, that is even more work. All that would not
be necessary, if the driver would just be pulled.
So I really hope we also for media can come to a point, where supporters
support the community, where maintainers maintain drivers they
understand, patches are reviewed benevolently within reasonable time,
and existing drivers with working hardware and happy users, only
implementing long existing APIs (in mainline), are kept working,
especially when someone exits who volunteers to maintain this.

So please
- revert this userspace API breakage still for 5.14
  (commit 819fbd3d8ef36c09576c2a0ffea503f5c46e9177)
- move the related documentation back from staging
  (revert commit 793e52d4e77d49737ad83cb11925c98f4907fcb1)
- move the long existing and working av7110 driver back from staging
  (revert commit 989cf18ed08f8b6efd1d1592d1d0108fa09b98f5)
- consider pulling the saa716x driver (based on the current 5.13 branch,
  I'm happy to provide a new pull request)
- transfer maintainer-ship for this to me

Linus, if you would accept a direct pull request from me, I would be
happy to provide one, for the requested reverts (for 5.14) of in-tree
DVB API and av7110 driver, but also for the long existing but still
out-of-tree saa716x driver (for 5.15).


[1] https://bugzilla.redhat.com/show_bug.cgi?id=1989125
[2] https://github.com/s-moch/linux-saa716x