[linux-dvb] [PATCH] Userspace tuner

Mauro Carvalho Chehab mchehab at infradead.org
Wed Sep 12 21:49:20 CEST 2007


Markus,

Em Ter, 2007-08-14 às 16:31 +0200, Markus Rechberger escreveu:
> Following patch adds the possibility to implement tuner drivers in 
> userspace.

As you asked me about userspace driver, at Linux Conf Europe, let me
give you my feedback about it.

On Linux, userspace-to-kernelspace APIs are meant to be forever. This
means that, once a newer API is created, this should remain supported
for all future versions. So, such APIs should be carefully analyzed and
accepted by the community, before going to mainstream.

I don't see any technical reason why tuner drivers should be moved to
userspace. Looking at xc3028 device, the driver is very simple and
doesn't require any special treatment that it isn't possible to be done
at kernel. There are already some implementations on kernelspace that
works fine.

On the other hand, a TV driver without a tuner is a broken driver. With
parts of the driver being at userspace, this means to add undesired
complexity at the drivers architecture, while not bringing any benefit. 

If you look at V4L history, the first drivers started at userspace,
being migrated to kernelspace, where we have the proper scenario for
managing those devices.

Another aspect that should be analyzed is what is desired by the
community: kernelspace tuners or userspace tuners. Keeping support for
both at long term doesn't seem reasonable. The Linux community should
decide what is the better way. Currently, only you are pushing for
userspace tuners, mainly due to non-technical reasons. Almost all the
other developers are comfortable with kernelspace tuners. So, creating
an userspace interface just to make you happy is not the way we should
go.

A final aspect is that having an userspace driver for tuner will mean
that the kernel driver will depend on an userspace counterpart in order
to work. This will allow a vendor with bad intentions to release a
partially broken userspace driver, with limited capabilities, and a
closed source driver for full support. This model is likely to occur, if
you take a look at the past. For example: ATI and Nvidia closed source
drivers, several soft modem drivers, some network drivers, ...

With all those issues, I'm against to add an userspace interface for
tuners.

Cheers,
Mauro




More information about the linux-dvb mailing list