]> Pileus Git - ~andy/linux/commitdiff
V4L/DVB (6701): pvrusb2: Enable support for "GOTVIEW USB2.0 DVD2" hardware
authorMike Isely <isely@pobox.com>
Mon, 26 Nov 2007 05:14:23 +0000 (02:14 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:03:06 +0000 (19:03 -0200)
This changeset allows the pvrusb2 driver to operate a new device type
("GOTVIEW USB2.0 DVD2").  Changes amount to defining a new routing
scheme for the device and adding appropriate table entries into
pvrusb2-devattr.c.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
drivers/media/video/pvrusb2/pvrusb2-devattr.c
drivers/media/video/pvrusb2/pvrusb2-devattr.h

index b6714c41ea7561b68c4eaaa7291b48c98584f914..ffdc45c324e5d24936de4557da279af46314ee8d 100644 (file)
@@ -78,11 +78,35 @@ static const struct routing_scheme_item routing_scheme0[] = {
        },
 };
 
+/* Specific to gotview device */
+static const struct routing_scheme_item routing_schemegv[] = {
+       [PVR2_CVAL_INPUT_TV] = {
+               .vid = CX25840_COMPOSITE2,
+               .aud = CX25840_AUDIO5,
+       },
+       [PVR2_CVAL_INPUT_RADIO] = { /* Treat the same as composite */
+               .vid = CX25840_COMPOSITE1,
+               .aud = CX25840_AUDIO_SERIAL,
+       },
+       [PVR2_CVAL_INPUT_COMPOSITE] = {
+               .vid = CX25840_COMPOSITE1,
+               .aud = CX25840_AUDIO_SERIAL,
+       },
+       [PVR2_CVAL_INPUT_SVIDEO] = {
+               .vid = (CX25840_SVIDEO_LUMA3|CX25840_SVIDEO_CHROMA4),
+               .aud = CX25840_AUDIO_SERIAL,
+       },
+};
+
 static const struct routing_scheme routing_schemes[] = {
        [PVR2_ROUTING_SCHEME_HAUPPAUGE] = {
                .def = routing_scheme0,
                .cnt = ARRAY_SIZE(routing_scheme0),
        },
+       [PVR2_ROUTING_SCHEME_GOTVIEW] = {
+               .def = routing_schemegv,
+               .cnt = ARRAY_SIZE(routing_schemegv),
+       },
 };
 
 static void set_input(struct pvr2_v4l_cx2584x *ctxt)
index 6ba0b79e3a1e0aa62d4b1988b0e00db5726b3dfe..e0a5bb9a9587342bf695e44710405b9559e40763 100644 (file)
@@ -29,14 +29,20 @@ pvr2_device_desc structures.
 
 #include "pvrusb2-devattr.h"
 #include <linux/usb.h>
+/* All this is needed in order to pull in tuner type ids... */
+#include <linux/i2c.h>
+#include <linux/videodev2.h>
+#include <media/tuner.h>
 
 /* Known major hardware variants, keyed from device ID */
 #define PVR2_HDW_TYPE_29XXX 0
 #define PVR2_HDW_TYPE_24XXX 1
+#define PVR2_HDW_TYPE_GOTVIEW_2 2
 
 struct usb_device_id pvr2_device_table[] = {
        [PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) },
        [PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) },
+       [PVR2_HDW_TYPE_GOTVIEW_2] = { USB_DEVICE(0x1164, 0x0622) },
        { }
 };
 
@@ -54,6 +60,12 @@ static const char *pvr2_client_29xxx[] = {
        "tuner",
 };
 
+// Names of other client modules to request for Gotview 2 model hardware
+static const char *pvr2_client_gotview_2[] = {
+       "cx25840",
+       "tuner",
+};
+
 /* Firmware file name(s) for 29xxx devices */
 static const char *pvr2_fw1_names_29xxx[] = {
                "v4l-pvrusb2-29xxx-01.fw",
@@ -88,6 +100,14 @@ const struct pvr2_device_desc pvr2_device_descriptions[] = {
                .flag_has_hauppauge_custom_ir = !0,
                .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
        },
+       [PVR2_HDW_TYPE_GOTVIEW_2] = {
+               .description = "Gotview USB 2.0 DVD 2",
+               .shortname = "gv2",
+               .client_modules.lst = pvr2_client_gotview_2,
+               .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2),
+               .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
+               .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
+       },
 };
 
 const unsigned int pvr2_device_count = ARRAY_SIZE(pvr2_device_descriptions);
index 2aff5a3d5a554ef9237f243d9c64ca41a66c14b7..b9517e1cac0812770b9da1b65d047346c55dc58d 100644 (file)
@@ -36,6 +36,7 @@ struct pvr2_string_table {
 };
 
 #define PVR2_ROUTING_SCHEME_HAUPPAUGE 0
+#define PVR2_ROUTING_SCHEME_GOTVIEW 1
 
 /* This describes a particular hardware type (except for the USB device ID
    which must live in a separate structure due to environmental