aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-03-28 04:47:47 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:09:48 -0400
commit906a495741bf63a7448ca4c452d70f937549e9ad (patch)
tree0320468184c438042d1cf8397be15329dc4da1f0
parent1b1b8d7841684d9d6273c479abe39d517dfb8cb8 (diff)
V4L/DVB (7705): pvrusb2: Enable OnAir digital operation
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-devattr.c75
1 files changed, 74 insertions, 1 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
index f489aab112dc..6794862bbb19 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
@@ -32,7 +32,11 @@ pvr2_device_desc structures.
32/* This is needed in order to pull in tuner type ids... */ 32/* This is needed in order to pull in tuner type ids... */
33#include <linux/i2c.h> 33#include <linux/i2c.h>
34#include <media/tuner.h> 34#include <media/tuner.h>
35 35#ifdef CONFIG_VIDEO_PVRUSB2_DVB
36#include "pvrusb2-hdw-internal.h"
37#include "lgdt330x.h"
38#include "tuner-simple.h"
39#endif
36 40
37 41
38/*------------------------------------------------------------------------*/ 42/*------------------------------------------------------------------------*/
@@ -147,6 +151,38 @@ static const struct pvr2_device_desc pvr2_device_gotview_2d = {
147/*------------------------------------------------------------------------*/ 151/*------------------------------------------------------------------------*/
148/* OnAir Creator */ 152/* OnAir Creator */
149 153
154#ifdef CONFIG_VIDEO_PVRUSB2_DVB
155static struct lgdt330x_config pvr2_lgdt3303_config = {
156 .demod_address = 0x0e,
157 .demod_chip = LGDT3303,
158 .clock_polarity_flip = 1,
159};
160
161static int pvr2_lgdt3303_attach(struct pvr2_dvb_adapter *adap)
162{
163 adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3303_config,
164 &adap->channel.hdw->i2c_adap);
165 if (adap->fe)
166 return 0;
167
168 return -EIO;
169}
170
171static int pvr2_lgh06xf_attach(struct pvr2_dvb_adapter *adap)
172{
173 dvb_attach(simple_tuner_attach, adap->fe,
174 &adap->channel.hdw->i2c_adap, 0x61,
175 TUNER_LG_TDVS_H06XF);
176
177 return 0;
178}
179
180struct pvr2_dvb_props pvr2_onair_creator_fe_props = {
181 .frontend_attach = pvr2_lgdt3303_attach,
182 .tuner_attach = pvr2_lgh06xf_attach,
183};
184#endif
185
150static const char *pvr2_client_onair_creator[] = { 186static const char *pvr2_client_onair_creator[] = {
151 "saa7115", 187 "saa7115",
152 "tuner", 188 "tuner",
@@ -165,6 +201,9 @@ static const struct pvr2_device_desc pvr2_device_onair_creator = {
165 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 201 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
166 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR, 202 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
167 .default_std_mask = V4L2_STD_NTSC_M, 203 .default_std_mask = V4L2_STD_NTSC_M,
204#ifdef CONFIG_VIDEO_PVRUSB2_DVB
205 .dvb_props = &pvr2_onair_creator_fe_props,
206#endif
168}; 207};
169#endif 208#endif
170 209
@@ -174,6 +213,37 @@ static const struct pvr2_device_desc pvr2_device_onair_creator = {
174/*------------------------------------------------------------------------*/ 213/*------------------------------------------------------------------------*/
175/* OnAir USB 2.0 */ 214/* OnAir USB 2.0 */
176 215
216#ifdef CONFIG_VIDEO_PVRUSB2_DVB
217static struct lgdt330x_config pvr2_lgdt3302_config = {
218 .demod_address = 0x0e,
219 .demod_chip = LGDT3302,
220};
221
222static int pvr2_lgdt3302_attach(struct pvr2_dvb_adapter *adap)
223{
224 adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3302_config,
225 &adap->channel.hdw->i2c_adap);
226 if (adap->fe)
227 return 0;
228
229 return -EIO;
230}
231
232static int pvr2_fcv1236d_attach(struct pvr2_dvb_adapter *adap)
233{
234 dvb_attach(simple_tuner_attach, adap->fe,
235 &adap->channel.hdw->i2c_adap, 0x61,
236 TUNER_PHILIPS_FCV1236D);
237
238 return 0;
239}
240
241struct pvr2_dvb_props pvr2_onair_usb2_fe_props = {
242 .frontend_attach = pvr2_lgdt3302_attach,
243 .tuner_attach = pvr2_fcv1236d_attach,
244};
245#endif
246
177static const char *pvr2_client_onair_usb2[] = { 247static const char *pvr2_client_onair_usb2[] = {
178 "saa7115", 248 "saa7115",
179 "tuner", 249 "tuner",
@@ -192,6 +262,9 @@ static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
192 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 262 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
193 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR, 263 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
194 .default_std_mask = V4L2_STD_NTSC_M, 264 .default_std_mask = V4L2_STD_NTSC_M,
265#ifdef CONFIG_VIDEO_PVRUSB2_DVB
266 .dvb_props = &pvr2_onair_usb2_fe_props,
267#endif
195}; 268};
196#endif 269#endif
197 270