From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
v4l-dvb <linux-media@vger.kernel.org>
Subject: Re: RFC: Drop V4L1 support in V4L2 drivers
Date: Fri, 19 Mar 2010 10:47:52 -0300 [thread overview]
Message-ID: <4BA38088.1020006@redhat.com> (raw)
In-Reply-To: <50cd74a798bbf96501cd40b90d2a2b93.squirrel@webmail.xs4all.nl>
Hans Verkuil wrote:
>> Do we still have V4L1-only drivers that use videobuf ?
>
> No V4L1-only drivers use videobuf, but videobuf has support for the V4L1
> compat support in V4L2 drivers (the cgmbuf ioctl). So when we remove the
> compat support, then that videobuf code can be removed as well.
We shouldn't justify the removal of an userspace API due to an internal
code cleanup.
The original reason for the V4L1 API removal is that its design were never
extended to support all world video standards (yet, its non-RDS radio
support is just as fine as V4L2 API).
The fact is that V4L1 API stopped in the time, while V4L2 is live. So,
V4L1 didn't followed 10 years of evolution that happened on media devices.
It would be probably simpler to just extend V4L1 API than to replace it to
a new one, but now we have to deal with both API's.
Due to the lack of features, the V4L1 drivers were gradually converted to V4L2.
This makes sense, since they can provide more features to userspace, like
the support for read/mmap/user mmap streaming, the fine-grained video format
support, the video format and fps enumeration and more userspace controls.
The V4L1 drivers that lasts are the ones without maintainers and probably without
a large users base. So, basically legacy hardware. So, their removals make sense.
After the driver removal, the last V4L1 vestige is the V4L1 compat layer removal.
So, what are the reasons to remove this layer?
I can think on a few technical reasons:
- V4L1 API emulation in kernel is not perfect. There are some known bugs, basically due to
the lack of a stateful layer emulation. So, it is possible, for example, that userspace
selects one video standard on a set and receive another on a get. For example, if userspace
tries to set VIDEO_PALETTE_YUV422, a subsequent get will return VIDEO_PALETTE_YUYV.
- V4L1 API lacks functionality. So, userspace applications using it would have a limited
control of the driver;
- Code cleanup;
- Lack of developers interested on maintaining V4L1 compat layer.
On the other hand, removing it may break applications that works fine with V4L1 emulation.
IMO, none of the above reasons are strong enough to justify prevent users to properly
use the hardware.
So, in order to remove this feature, we should be sure that the existing open-source
V4L2 applications will cover all usage cases: teletext, radio, vbi, tv, webcam, stream
capture, text UI, graphical UI's (qt/gtk), .... If something is not covered, someone
has to port an existing application to V4L2 or to write/maintain a replacement application.
So, the main issue to remove V4L1 compat is: are all cases properly covered?
Comments?
--
Cheers,
Mauro
next prev parent reply other threads:[~2010-03-19 13:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 7:59 RFC: Drop V4L1 support in V4L2 drivers Hans Verkuil
2010-03-19 8:04 ` Laurent Pinchart
2010-03-19 8:46 ` Hans Verkuil
2010-03-19 8:50 ` Laurent Pinchart
2010-03-19 9:03 ` Markus Rechberger
2010-03-19 13:47 ` Mauro Carvalho Chehab [this message]
2010-03-19 15:49 ` David Ellingsworth
2010-03-19 17:43 ` Mauro Carvalho Chehab
2010-03-19 18:00 ` David Ellingsworth
2010-03-19 18:12 ` Devin Heitmueller
2010-03-19 19:04 ` VDR User
2010-03-20 1:01 ` hermann pitton
2010-03-19 19:57 ` Mauro Carvalho Chehab
2010-03-19 19:06 ` Hans de Goede
2010-03-19 15:17 ` Andy Walls
2010-03-19 19:02 ` Hans de Goede
2010-03-19 13:01 ` Mauro Carvalho Chehab
2010-03-19 19:10 ` Hans de Goede
2010-03-19 19:27 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BA38088.1020006@redhat.com \
--to=mchehab@redhat.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox