Template:3rd party drivers: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
Line 14: Line 14:


In case a manufacturer provides open source drivers the patches can be sent to the linux-media mailinglist [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] (LMML). Keep in mind however that if the license isn't compatible with the Linux kernel or the quality of the code isn't good enough, these will not become a part of the Linux kernel.<br />
In case a manufacturer provides open source drivers the patches can be sent to the linux-media mailinglist [mailto:majordomo@vger.kernel.org?body=subscribe%20linux-media Linux-Media Mailing List] (LMML). Keep in mind however that if the license isn't compatible with the Linux kernel or the quality of the code isn't good enough, these will not become a part of the Linux kernel.<br />

NOTE:
As linux media drivers are character based, drivers can be also written using libfuse's character device in userspace example.
If written that way, an out-of-kernel driver can be written, which fully integrates to udev without the disadvantage of closed source or incompatibility to other drivers. Such driver would rely on kernel ''fuse'' and ''character device in user space'' support as well as libfuse.


== Closed source userspace drivers (mostly Sundtek) ==
== Closed source userspace drivers (mostly Sundtek) ==

Revision as of 11:18, 15 January 2015

Sometimes a manufacturer forks v4l-dvb all on their own and writes a driver for their device so they can claim Linux support.

In-Kernel 3rd party Drivers

Advantages:

  1. It's possible your device will work.. for the moment.
  2. If the manufacturer provides open source drivers with an acceptable license, volunteers could technically implement this code in the Linux kernel for true support. However.. :

Disadvantages:

  1. The quality of the code (if open, there are also cases where you just get a binary blob) too often just isn't good enough and there's still too much work to be done to make the device work. There was probably a reason the manufacturer didn't just send their patches to the linux-media mailinglist.
  2. Depending on what exactly the manufacturer did, you may have to reinstall the drivers every time your kernel is updated.
  3. When the manufacturer stops updating the drivers, the drivers will quickly refuse to install as newer kernels are released.

In case a manufacturer provides open source drivers the patches can be sent to the linux-media mailinglist Linux-Media Mailing List (LMML). Keep in mind however that if the license isn't compatible with the Linux kernel or the quality of the code isn't good enough, these will not become a part of the Linux kernel.

NOTE: As linux media drivers are character based, drivers can be also written using libfuse's character device in userspace example. If written that way, an out-of-kernel driver can be written, which fully integrates to udev without the disadvantage of closed source or incompatibility to other drivers. Such driver would rely on kernel fuse and character device in user space support as well as libfuse.

Closed source userspace drivers (mostly Sundtek)

Advantages:

  1. Same driver may be usable for different Linux versions, depending on what vendor did.
  2. No need to reinstall drivers when your kernel is updated.
  3. Drivers can be profiled easily and more accurately than in kernelspace.
  4. If the driver crashes, it won't crash the system or kernel, only the driver and applications using the driver will be affected. Userspace drivers can also be used when debugging drivers for USB host controllers, as the userspace driver can't crash the system, making debugging easier.
  5. If the manufacturer would stop to support the drivers, the userspace driver may still continue to work with newer Linux systems

Disadvantages:

  1. No interoperation with udev, since kernel interfaces are not used and uevents not send.
  2. Needs non-standard constructs to create device nodes or hack into system using LD_PRELOAD (bad idea.)
  3. Kernel doesnt autoload devices, since kernel is not aware of those devices.
  4. Drivers need to be downloaded from the manufacturer and installed, whereas in-kernel drivers are included in most popular Linux desktop-oriented distributions.
  5. You can't look into the sources. While this may be not a problem for end-users, it prevents hacking devices and trying to fix bugs.
  6. Similarly, users who want (or work for a company that requires) a FOSS-only system couldn't use these drivers. This also prevents inclusion in most Linux distributions.