[linux-dvb] V4L/DVB Tuner API for analogue TV and digital TV devices

Markus Rechberger mrechberger at gmail.com
Fri Aug 10 21:37:50 CEST 2007


Hi,

On 8/10/07, Andrew Junev <a-j at a-j.ru> wrote:
> Hello All,
>
> I want to report my AverMedia M116 works just great with this driver!
> I have a PIII-1GHz system running Fedora Core 6 which is mostly being
> used as a HTPC (MythTV). All I needed was the driver:
>
> http://linuxtv.org/hg/~hverkuil/v4l-dvb-xc
>
> and the tuner module:
>
> http://mcentral.de/hg/~mrec/userspace-tuner/
>
> Ok, I also had some problems setting it up due to my poor knowledge of
> Linux. But Markus helped me a lot with the installation and now
> everything works just great!
>

the ivtv-xc repository needed some tweaks.. after installing the
userspace tuner libraries I had to apply following patch to the named
ivtv repository:

http://mcentral.de/~mrec/patches/ivtv-userspace-tuner.diff

diff -r 2bf2ec67c858 linux/drivers/media/video/ivtv/ivtv-driver.c
--- a/linux/drivers/media/video/ivtv/ivtv-driver.c      Tue Aug 07
11:26:17 2007 +0200
+++ b/linux/drivers/media/video/ivtv/ivtv-driver.c      Fri Aug 10
21:31:37 2007 +0200
@@ -60,7 +60,7 @@
 #include <media/saa7115.h>
 #include <media/v4l2-chip-ident.h>
 #ifdef HAVE_XC2028
-#include "tuner/tuner-stub.h"
+#include <linux/tuner-stub.h>
 #endif

 /* var to keep track of the number of array elements in use */
@@ -834,7 +834,6 @@ static void ivtv_load_and_init_modules(s

                        memset(&config, 0, sizeof(config));
                        config.tunerid = 1;
-                       config.clientid = -1;
                        itv->tunerid = tuner_register_client(&itv->i2c_adap,
                                ivtv_reset_tuner_gpio, itv, &config);
 #else
diff -r 2bf2ec67c858 linux/drivers/media/video/ivtv/ivtv-i2c.c
--- a/linux/drivers/media/video/ivtv/ivtv-i2c.c Tue Aug 07 11:26:17 2007 +0200
+++ b/linux/drivers/media/video/ivtv/ivtv-i2c.c Fri Aug 10 21:32:26 2007 +0200
@@ -66,7 +66,7 @@

 #include <media/ir-kbd-i2c.h>
 #ifdef HAVE_XC2028
-#include "tuner/tuner-stub.h"
+#include <linux/tuner-stub.h>
 #endif

 /* i2c implementation for cx23415/6 chip, ivtv project.

this repository contains Hans' code and the additional patch to
support the userspace tuner library.

http://mcentral.de/hg/~mrec/v4l-dvb-xc/

Markus

> I also use it in MythTV without any problems. It has even detected all
> the channels during automatic channel search (to be honest, I didn't
> expect that at all). And it has all the support for SECAM (which is
> the TV standard for my area).
>
> So I want to thank Markus and Hans for this great software. Hope it
> will work for the others as good as it works for me!
>
> --
> Best regards,
>  Andrew                            mailto:a-j at a-j.ru
>
>
> Friday, August 10, 2007, 9:05:40 PM, you wrote:
>
> > From: Markus Rechberger <mrechberger at gmail.com>
> > Date: Thu, 9 Aug 2007 17:19:52 +0200
> > Subject: V4L/DVB Tuner API for analogue TV and digital TV devices
> > To: linux-dvb at linuxtv.org, video4linux-list at redhat.com
>
> > Hi,
>
> > as announced earlier already I started with another API which is
> > independent of any API core changes to support devices which use the
> > dvb-core framework for digital TV and the analogue TV framework for
> > analogue TV.
>
> > The newer API consists of a kernelmodule and a usersland daemon which
> > automatically loads the tuner modules which are implemented as shared
> > libraries.
>
> > The kernelmodule provides a node /dev/tuner where the usersland daemon
> > attaches and receives its control commands from kernelspace. The
> > mechanism behind that is similar to the udev mechanism. The userspace
> > daemon runs select() on the interface and the kernelmodule wakes the
> > daemon up if something is requested.
> > The daemon receives control commands like loading a specific tuner module.
> > As soon as such a call comes in the daemon looks at a list if the
> > requested tuner driver is available and forks itself and registers
> > (opens a new filehandle) the requested module at /dev/tuner.
> > If the requested module is not found it submits that result back to
> > kernelspace and attaching the requested tuner fails.
>
> > Currently there's one module (xc3028) ported to userspace and tested
> > with TV and DVB-T (radio is in progress).
>
> > The kernelmodule is licensed under GPL, the userspace daemon including
> > the userspace driver are dual licensed BSD/GPL since the usespace
> > tuner module is intended to be reused with other operating systems.
>
> > The current project site (which includes a link to the sources):
> > http://mcentral.de/wiki/index.php/Userspace_tuner
>
> > There's also a description how to use that API with existing devices,
> > drivers need a very small modification to get them work with that API.
>
> > Feel free to ask some questions about it and/or even to review the
> > code and comment it.
>
> > Markus
>
>
>
>
>


-- 
Markus Rechberger



More information about the linux-dvb mailing list