aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2009-01-18 23:10:49 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:16 -0400
commit3abdedd8a4e3b1a0ad164c67929b3e798c85cd11 (patch)
treedb85d0b13d1e09142f3121f8a80375794ac6a59b /drivers/media/video/saa7134
parentcae78ed599c348999a318ace0fcc3ff0277c8fa4 (diff)
V4L/DVB (10926): saa7134: enable digital tv support for Hauppauge WinTV-HVR1120
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/Kconfig3
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c4
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c44
3 files changed, 50 insertions, 1 deletions
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig
index 51f17c82bc30..e62b2996768f 100644
--- a/drivers/media/video/saa7134/Kconfig
+++ b/drivers/media/video/saa7134/Kconfig
@@ -42,6 +42,9 @@ config VIDEO_SAA7134_DVB
42 select DVB_MT312 if !DVB_FE_CUSTOMISE 42 select DVB_MT312 if !DVB_FE_CUSTOMISE
43 select DVB_LNBP21 if !DVB_FE_CUSTOMISE 43 select DVB_LNBP21 if !DVB_FE_CUSTOMISE
44 select DVB_ZL10353 if !DVB_FE_CUSTOMISE 44 select DVB_ZL10353 if !DVB_FE_CUSTOMISE
45 select DVB_LGDT3305 if !DVB_FE_CUSTOMISE
46 select MEDIA_TUNER_TDA18271 if !MEDIA_TUNER_CUSTOMIZE
47 select MEDIA_TUNER_TDA8290 if !MEDIA_TUNER_CUSTOMIZE
45 ---help--- 48 ---help---
46 This adds support for DVB cards based on the 49 This adds support for DVB cards based on the
47 Philips saa7134 chip. 50 Philips saa7134 chip.
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index be53d8f35425..265a52ff8c33 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -3293,13 +3293,15 @@ struct saa7134_board saa7134_boards[] = {
3293 }, 3293 },
3294 }, 3294 },
3295 [SAA7134_BOARD_HAUPPAUGE_HVR1120] = { 3295 [SAA7134_BOARD_HAUPPAUGE_HVR1120] = {
3296 .name = "Hauppauge WinTV-HVR1120", 3296 .name = "Hauppauge WinTV-HVR1120 ATSC/QAM-Hybrid",
3297 .audio_clock = 0x00187de7, 3297 .audio_clock = 0x00187de7,
3298 .tuner_type = TUNER_PHILIPS_TDA8290, 3298 .tuner_type = TUNER_PHILIPS_TDA8290,
3299 .radio_type = UNSET, 3299 .radio_type = UNSET,
3300 .tuner_addr = ADDR_UNSET, 3300 .tuner_addr = ADDR_UNSET,
3301 .radio_addr = ADDR_UNSET, 3301 .radio_addr = ADDR_UNSET,
3302 .tuner_config = 3, 3302 .tuner_config = 3,
3303 .mpeg = SAA7134_MPEG_DVB,
3304 .ts_type = SAA7134_MPEG_TS_SERIAL,
3303 .gpiomask = 0x0800100, /* GPIO 21 is an INPUT */ 3305 .gpiomask = 0x0800100, /* GPIO 21 is an INPUT */
3304 .inputs = {{ 3306 .inputs = {{
3305 .name = name_tv, 3307 .name = name_tv,
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 80ad96ad8939..4eff1ca8593c 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -48,6 +48,9 @@
48#include "isl6405.h" 48#include "isl6405.h"
49#include "lnbp21.h" 49#include "lnbp21.h"
50#include "tuner-simple.h" 50#include "tuner-simple.h"
51#include "tda18271.h"
52#include "lgdt3305.h"
53#include "tda8290.h"
51 54
52#include "zl10353.h" 55#include "zl10353.h"
53 56
@@ -964,6 +967,34 @@ static struct zl10036_config avertv_a700_tuner = {
964 .tuner_address = 0x60, 967 .tuner_address = 0x60,
965}; 968};
966 969
970static struct lgdt3305_config hcw_lgdt3305_config = {
971 .i2c_addr = 0x0e,
972 .mpeg_mode = LGDT3305_MPEG_SERIAL,
973 .tpclk_edge = LGDT3305_TPCLK_RISING_EDGE,
974 .tpvalid_polarity = LGDT3305_TP_VALID_HIGH,
975 .deny_i2c_rptr = 1,
976 .spectral_inversion = 1,
977 .qam_if_khz = 4000,
978 .vsb_if_khz = 3250,
979};
980
981static struct tda18271_std_map hauppauge_tda18271_std_map = {
982 .atsc_6 = { .if_freq = 3250, .agc_mode = 3, .std = 4,
983 .if_lvl = 1, .rfagc_top = 0x58, },
984 .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 5,
985 .if_lvl = 1, .rfagc_top = 0x58, },
986};
987
988static struct tda18271_config hcw_tda18271_config = {
989 .std_map = &hauppauge_tda18271_std_map,
990 .gate = TDA18271_GATE_ANALOG,
991 .config = 3,
992};
993
994static struct tda829x_config tda829x_no_probe = {
995 .probe_tuner = TDA829X_DONT_PROBE,
996};
997
967/* ================================================================== 998/* ==================================================================
968 * Core code 999 * Core code
969 */ 1000 */
@@ -1090,6 +1121,19 @@ static int dvb_init(struct saa7134_dev *dev)
1090 &tda827x_cfg_1) < 0) 1121 &tda827x_cfg_1) < 0)
1091 goto dettach_frontend; 1122 goto dettach_frontend;
1092 break; 1123 break;
1124 case SAA7134_BOARD_HAUPPAUGE_HVR1120:
1125 fe0->dvb.frontend = dvb_attach(lgdt3305_attach,
1126 &hcw_lgdt3305_config,
1127 &dev->i2c_adap);
1128 if (fe0->dvb.frontend) {
1129 dvb_attach(tda829x_attach, fe0->dvb.frontend,
1130 &dev->i2c_adap, 0x4b,
1131 &tda829x_no_probe);
1132 dvb_attach(tda18271_attach, fe0->dvb.frontend,
1133 0x60, &dev->i2c_adap,
1134 &hcw_tda18271_config);
1135 }
1136 break;
1093 case SAA7134_BOARD_ASUSTeK_P7131_DUAL: 1137 case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
1094 if (configure_tda827x_fe(dev, &asus_p7131_dual_config, 1138 if (configure_tda827x_fe(dev, &asus_p7131_dual_config,
1095 &tda827x_cfg_0) < 0) 1139 &tda827x_cfg_0) < 0)