diff options
author | Mike Isely <isely@pobox.com> | 2007-11-26 00:14:23 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:03:06 -0500 |
commit | 9e2e3aeb2d2c8bf64b04e1f5747f1d9842df43de (patch) | |
tree | 7806460ad4e078eabace186417b109fa86fd0804 /drivers/media/video/pvrusb2 | |
parent | 65bd80fe18b6abb63776746646321b41b44d70a7 (diff) |
V4L/DVB (6701): pvrusb2: Enable support for "GOTVIEW USB2.0 DVD2" hardware
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>
Diffstat (limited to 'drivers/media/video/pvrusb2')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c | 24 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-devattr.c | 20 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-devattr.h | 1 |
3 files changed, 45 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c index b6714c41ea75..ffdc45c324e5 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c +++ b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c | |||
@@ -78,11 +78,35 @@ static const struct routing_scheme_item routing_scheme0[] = { | |||
78 | }, | 78 | }, |
79 | }; | 79 | }; |
80 | 80 | ||
81 | /* Specific to gotview device */ | ||
82 | static const struct routing_scheme_item routing_schemegv[] = { | ||
83 | [PVR2_CVAL_INPUT_TV] = { | ||
84 | .vid = CX25840_COMPOSITE2, | ||
85 | .aud = CX25840_AUDIO5, | ||
86 | }, | ||
87 | [PVR2_CVAL_INPUT_RADIO] = { /* Treat the same as composite */ | ||
88 | .vid = CX25840_COMPOSITE1, | ||
89 | .aud = CX25840_AUDIO_SERIAL, | ||
90 | }, | ||
91 | [PVR2_CVAL_INPUT_COMPOSITE] = { | ||
92 | .vid = CX25840_COMPOSITE1, | ||
93 | .aud = CX25840_AUDIO_SERIAL, | ||
94 | }, | ||
95 | [PVR2_CVAL_INPUT_SVIDEO] = { | ||
96 | .vid = (CX25840_SVIDEO_LUMA3|CX25840_SVIDEO_CHROMA4), | ||
97 | .aud = CX25840_AUDIO_SERIAL, | ||
98 | }, | ||
99 | }; | ||
100 | |||
81 | static const struct routing_scheme routing_schemes[] = { | 101 | static const struct routing_scheme routing_schemes[] = { |
82 | [PVR2_ROUTING_SCHEME_HAUPPAUGE] = { | 102 | [PVR2_ROUTING_SCHEME_HAUPPAUGE] = { |
83 | .def = routing_scheme0, | 103 | .def = routing_scheme0, |
84 | .cnt = ARRAY_SIZE(routing_scheme0), | 104 | .cnt = ARRAY_SIZE(routing_scheme0), |
85 | }, | 105 | }, |
106 | [PVR2_ROUTING_SCHEME_GOTVIEW] = { | ||
107 | .def = routing_schemegv, | ||
108 | .cnt = ARRAY_SIZE(routing_schemegv), | ||
109 | }, | ||
86 | }; | 110 | }; |
87 | 111 | ||
88 | static void set_input(struct pvr2_v4l_cx2584x *ctxt) | 112 | static void set_input(struct pvr2_v4l_cx2584x *ctxt) |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c index 6ba0b79e3a1e..e0a5bb9a9587 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c +++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c | |||
@@ -29,14 +29,20 @@ pvr2_device_desc structures. | |||
29 | 29 | ||
30 | #include "pvrusb2-devattr.h" | 30 | #include "pvrusb2-devattr.h" |
31 | #include <linux/usb.h> | 31 | #include <linux/usb.h> |
32 | /* All this is needed in order to pull in tuner type ids... */ | ||
33 | #include <linux/i2c.h> | ||
34 | #include <linux/videodev2.h> | ||
35 | #include <media/tuner.h> | ||
32 | 36 | ||
33 | /* Known major hardware variants, keyed from device ID */ | 37 | /* Known major hardware variants, keyed from device ID */ |
34 | #define PVR2_HDW_TYPE_29XXX 0 | 38 | #define PVR2_HDW_TYPE_29XXX 0 |
35 | #define PVR2_HDW_TYPE_24XXX 1 | 39 | #define PVR2_HDW_TYPE_24XXX 1 |
40 | #define PVR2_HDW_TYPE_GOTVIEW_2 2 | ||
36 | 41 | ||
37 | struct usb_device_id pvr2_device_table[] = { | 42 | struct usb_device_id pvr2_device_table[] = { |
38 | [PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) }, | 43 | [PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) }, |
39 | [PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) }, | 44 | [PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) }, |
45 | [PVR2_HDW_TYPE_GOTVIEW_2] = { USB_DEVICE(0x1164, 0x0622) }, | ||
40 | { } | 46 | { } |
41 | }; | 47 | }; |
42 | 48 | ||
@@ -54,6 +60,12 @@ static const char *pvr2_client_29xxx[] = { | |||
54 | "tuner", | 60 | "tuner", |
55 | }; | 61 | }; |
56 | 62 | ||
63 | // Names of other client modules to request for Gotview 2 model hardware | ||
64 | static const char *pvr2_client_gotview_2[] = { | ||
65 | "cx25840", | ||
66 | "tuner", | ||
67 | }; | ||
68 | |||
57 | /* Firmware file name(s) for 29xxx devices */ | 69 | /* Firmware file name(s) for 29xxx devices */ |
58 | static const char *pvr2_fw1_names_29xxx[] = { | 70 | static const char *pvr2_fw1_names_29xxx[] = { |
59 | "v4l-pvrusb2-29xxx-01.fw", | 71 | "v4l-pvrusb2-29xxx-01.fw", |
@@ -88,6 +100,14 @@ const struct pvr2_device_desc pvr2_device_descriptions[] = { | |||
88 | .flag_has_hauppauge_custom_ir = !0, | 100 | .flag_has_hauppauge_custom_ir = !0, |
89 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, | 101 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
90 | }, | 102 | }, |
103 | [PVR2_HDW_TYPE_GOTVIEW_2] = { | ||
104 | .description = "Gotview USB 2.0 DVD 2", | ||
105 | .shortname = "gv2", | ||
106 | .client_modules.lst = pvr2_client_gotview_2, | ||
107 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2), | ||
108 | .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3, | ||
109 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW, | ||
110 | }, | ||
91 | }; | 111 | }; |
92 | 112 | ||
93 | const unsigned int pvr2_device_count = ARRAY_SIZE(pvr2_device_descriptions); | 113 | const unsigned int pvr2_device_count = ARRAY_SIZE(pvr2_device_descriptions); |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.h b/drivers/media/video/pvrusb2/pvrusb2-devattr.h index 2aff5a3d5a55..b9517e1cac08 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-devattr.h +++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.h | |||
@@ -36,6 +36,7 @@ struct pvr2_string_table { | |||
36 | }; | 36 | }; |
37 | 37 | ||
38 | #define PVR2_ROUTING_SCHEME_HAUPPAUGE 0 | 38 | #define PVR2_ROUTING_SCHEME_HAUPPAUGE 0 |
39 | #define PVR2_ROUTING_SCHEME_GOTVIEW 1 | ||
39 | 40 | ||
40 | /* This describes a particular hardware type (except for the USB device ID | 41 | /* This describes a particular hardware type (except for the USB device ID |
41 | which must live in a separate structure due to environmental | 42 | which must live in a separate structure due to environmental |