aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-04-22 13:45:56 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:50 -0400
commit0e5d383b0aca78c70c46b378f6b0e9d03a28c1af (patch)
treecb867261f000ada0b1060c07323c7cc270c05940 /drivers
parenta33b42c6bbe6c5b9067489df9e5650de751b798e (diff)
V4L/DVB (7358): tuner-simple: enable digital tuning support for Philips TD1316
Enable digital tuning support within tuner-simple. This will allow for a single tuner module to manage the hardware, without having dvb-pll loaded. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/tuner-simple.c9
-rw-r--r--drivers/media/video/tuner-types.c21
2 files changed, 30 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c
index 8ecd92324c49..5356c8a92413 100644
--- a/drivers/media/video/tuner-simple.c
+++ b/drivers/media/video/tuner-simple.c
@@ -756,6 +756,15 @@ static void simple_set_dvb(struct dvb_frontend *fe, u8 *buf,
756 params->frequency >= 158870000) 756 params->frequency >= 158870000)
757 buf[3] |= 0x08; 757 buf[3] |= 0x08;
758 break; 758 break;
759 case TUNER_PHILIPS_TD1316:
760 /* determine band */
761 buf[3] |= (params->frequency < 161000000) ? 1 :
762 (params->frequency < 444000000) ? 2 : 4;
763
764 /* setup PLL filter */
765 if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ)
766 buf[3] |= 1 << 3;
767 break;
759 case TUNER_PHILIPS_TUV1236D: 768 case TUNER_PHILIPS_TUV1236D:
760 case TUNER_PHILIPS_ATSC: 769 case TUNER_PHILIPS_ATSC:
761 { 770 {
diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c
index db3320519f8c..afb88ff7db50 100644
--- a/drivers/media/video/tuner-types.c
+++ b/drivers/media/video/tuner-types.c
@@ -1063,12 +1063,30 @@ static struct tuner_range tuner_philips_td1316_pal_ranges[] = {
1063 { 16 * 999.99 , 0xc8, 0xa4, }, 1063 { 16 * 999.99 , 0xc8, 0xa4, },
1064}; 1064};
1065 1065
1066static struct tuner_range tuner_philips_td1316_dvb_ranges[] = {
1067 { 16 * 93.834 /*MHz*/, 0xca, 0x60, },
1068 { 16 * 123.834 /*MHz*/, 0xca, 0xa0, },
1069 { 16 * 163.834 /*MHz*/, 0xca, 0xc0, },
1070 { 16 * 253.834 /*MHz*/, 0xca, 0x60, },
1071 { 16 * 383.834 /*MHz*/, 0xca, 0xa0, },
1072 { 16 * 443.834 /*MHz*/, 0xca, 0xc0, },
1073 { 16 * 583.834 /*MHz*/, 0xca, 0x60, },
1074 { 16 * 793.834 /*MHz*/, 0xca, 0xa0, },
1075 { 16 * 999.999 , 0xca, 0xe0, },
1076};
1077
1066static struct tuner_params tuner_philips_td1316_params[] = { 1078static struct tuner_params tuner_philips_td1316_params[] = {
1067 { 1079 {
1068 .type = TUNER_PARAM_TYPE_PAL, 1080 .type = TUNER_PARAM_TYPE_PAL,
1069 .ranges = tuner_philips_td1316_pal_ranges, 1081 .ranges = tuner_philips_td1316_pal_ranges,
1070 .count = ARRAY_SIZE(tuner_philips_td1316_pal_ranges), 1082 .count = ARRAY_SIZE(tuner_philips_td1316_pal_ranges),
1071 }, 1083 },
1084 {
1085 .type = TUNER_PARAM_TYPE_DIGITAL,
1086 .ranges = tuner_philips_td1316_dvb_ranges,
1087 .count = ARRAY_SIZE(tuner_philips_td1316_dvb_ranges),
1088 .iffreq = 16 * 36.166667 /*MHz*/,
1089 },
1072}; 1090};
1073 1091
1074/* ------------ TUNER_PHILIPS_TUV1236D - Philips ATSC ------------ */ 1092/* ------------ TUNER_PHILIPS_TUV1236D - Philips ATSC ------------ */
@@ -1556,6 +1574,9 @@ struct tunertype tuners[] = {
1556 .name = "Philips TD1316 Hybrid Tuner", 1574 .name = "Philips TD1316 Hybrid Tuner",
1557 .params = tuner_philips_td1316_params, 1575 .params = tuner_philips_td1316_params,
1558 .count = ARRAY_SIZE(tuner_philips_td1316_params), 1576 .count = ARRAY_SIZE(tuner_philips_td1316_params),
1577 .min = 16 * 87.00,
1578 .max = 16 * 895.00,
1579 .stepsize = 166667,
1559 }, 1580 },
1560 [TUNER_PHILIPS_TUV1236D] = { /* Philips ATSC */ 1581 [TUNER_PHILIPS_TUV1236D] = { /* Philips ATSC */
1561 .name = "Philips TUV1236D ATSC/NTSC dual in", 1582 .name = "Philips TUV1236D ATSC/NTSC dual in",