aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-03-28 04:49:36 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:09:48 -0400
commit087886eb111fde9659d69c030ea618b3c242e39c (patch)
treedfc71c22db0382e659a0b188d0e0e2dad73fe274 /drivers/media/video/pvrusb2
parentc881284151e35479ffee26a571b6e9769c351095 (diff)
V4L/DVB (7707): pvrusb2-dvb: add atsc/qam support for Hauppauge pvrusb2 model 750xx
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>
Diffstat (limited to 'drivers/media/video/pvrusb2')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-devattr.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
index 9598f80ecd4d..64a29adcfd92 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
@@ -35,6 +35,9 @@ pvr2_device_desc structures.
35#ifdef CONFIG_VIDEO_PVRUSB2_DVB 35#ifdef CONFIG_VIDEO_PVRUSB2_DVB
36#include "pvrusb2-hdw-internal.h" 36#include "pvrusb2-hdw-internal.h"
37#include "lgdt330x.h" 37#include "lgdt330x.h"
38#include "s5h1409.h"
39#include "tda18271.h"
40#include "tda8290.h"
38#include "tuner-simple.h" 41#include "tuner-simple.h"
39#endif 42#endif
40 43
@@ -304,6 +307,60 @@ static const struct pvr2_device_desc pvr2_device_73xxx = {
304/*------------------------------------------------------------------------*/ 307/*------------------------------------------------------------------------*/
305/* Hauppauge PVR-USB2 Model 75xxx */ 308/* Hauppauge PVR-USB2 Model 75xxx */
306 309
310#ifdef CONFIG_VIDEO_PVRUSB2_DVB
311static struct s5h1409_config pvr2_s5h1409_config = {
312 .demod_address = 0x32 >> 1,
313 .output_mode = S5H1409_PARALLEL_OUTPUT,
314 .gpio = S5H1409_GPIO_OFF,
315 .qam_if = 4000,
316 .inversion = S5H1409_INVERSION_ON,
317 .status_mode = S5H1409_DEMODLOCKING,
318};
319
320static struct tda829x_config tda829x_no_probe = {
321 .probe_tuner = TDA829X_DONT_PROBE,
322};
323
324static struct tda18271_std_map hauppauge_tda18271_std_map = {
325 .atsc_6 = { .if_freq = 5380, .agc_mode = 3, .std = 3,
326 .if_lvl = 6, .rfagc_top = 0x37, },
327 .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 0,
328 .if_lvl = 6, .rfagc_top = 0x37, },
329};
330
331static struct tda18271_config hauppauge_tda18271_config = {
332 .std_map = &hauppauge_tda18271_std_map,
333 .gate = TDA18271_GATE_ANALOG,
334};
335
336static int pvr2_s5h1409_attach(struct pvr2_dvb_adapter *adap)
337{
338 adap->fe = dvb_attach(s5h1409_attach, &pvr2_s5h1409_config,
339 &adap->channel.hdw->i2c_adap);
340 if (adap->fe)
341 return 0;
342
343 return -EIO;
344}
345
346static int pvr2_tda18271_8295_attach(struct pvr2_dvb_adapter *adap)
347{
348 dvb_attach(tda829x_attach, adap->fe,
349 &adap->channel.hdw->i2c_adap, 0x42,
350 &tda829x_no_probe);
351 dvb_attach(tda18271_attach, adap->fe, 0x60,
352 &adap->channel.hdw->i2c_adap,
353 &hauppauge_tda18271_config);
354
355 return 0;
356}
357
358struct pvr2_dvb_props pvr2_750xx_dvb_props = {
359 .frontend_attach = pvr2_s5h1409_attach,
360 .tuner_attach = pvr2_tda18271_8295_attach,
361};
362#endif
363
307static const char *pvr2_client_75xxx[] = { 364static const char *pvr2_client_75xxx[] = {
308 "cx25840", 365 "cx25840",
309 "tuner", 366 "tuner",
@@ -329,6 +386,9 @@ static const struct pvr2_device_desc pvr2_device_750xx = {
329 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, 386 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
330 .default_std_mask = V4L2_STD_NTSC_M, 387 .default_std_mask = V4L2_STD_NTSC_M,
331 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, 388 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
389#ifdef CONFIG_VIDEO_PVRUSB2_DVB
390 .dvb_props = &pvr2_750xx_dvb_props,
391#endif
332}; 392};
333 393
334static const struct pvr2_device_desc pvr2_device_751xx = { 394static const struct pvr2_device_desc pvr2_device_751xx = {