diff options
author | David T.L. Wong <davidtlwong@gmail.com> | 2009-05-04 21:59:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:21:07 -0400 |
commit | 6c99080d8eae64c51f8b44946eb47f995361c582 (patch) | |
tree | 528289237e273d3b09672390858e366c281367c5 /drivers/media | |
parent | a6301d1d57dc08ef0e575d39f21435a2fe805900 (diff) |
V4L/DVB (11803): xc5000: add support for DVB-T tuning
This patch adds XC5000 supports for DVB-T 6MHz and 8MHz bandwidth.
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/common/tuners/xc5000.c | 63 |
1 files changed, 45 insertions, 18 deletions
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index a75521caa41d..cc829a0b6db7 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c | |||
@@ -636,25 +636,52 @@ static int xc5000_set_params(struct dvb_frontend *fe, | |||
636 | 636 | ||
637 | dprintk(1, "%s() frequency=%d (Hz)\n", __func__, params->frequency); | 637 | dprintk(1, "%s() frequency=%d (Hz)\n", __func__, params->frequency); |
638 | 638 | ||
639 | switch (params->u.vsb.modulation) { | 639 | if (fe->ops.info.type == FE_ATSC) { |
640 | case VSB_8: | 640 | dprintk(1, "%s() ATSC\n", __func__); |
641 | case VSB_16: | 641 | switch (params->u.vsb.modulation) { |
642 | dprintk(1, "%s() VSB modulation\n", __func__); | 642 | case VSB_8: |
643 | case VSB_16: | ||
644 | dprintk(1, "%s() VSB modulation\n", __func__); | ||
645 | priv->rf_mode = XC_RF_MODE_AIR; | ||
646 | priv->freq_hz = params->frequency - 1750000; | ||
647 | priv->bandwidth = BANDWIDTH_6_MHZ; | ||
648 | priv->video_standard = DTV6; | ||
649 | break; | ||
650 | case QAM_64: | ||
651 | case QAM_256: | ||
652 | case QAM_AUTO: | ||
653 | dprintk(1, "%s() QAM modulation\n", __func__); | ||
654 | priv->rf_mode = XC_RF_MODE_CABLE; | ||
655 | priv->freq_hz = params->frequency - 1750000; | ||
656 | priv->bandwidth = BANDWIDTH_6_MHZ; | ||
657 | priv->video_standard = DTV6; | ||
658 | break; | ||
659 | default: | ||
660 | return -EINVAL; | ||
661 | } | ||
662 | } else if (fe->ops.info.type == FE_OFDM) { | ||
663 | dprintk(1, "%s() OFDM\n", __func__); | ||
664 | switch (params->u.ofdm.bandwidth) { | ||
665 | case BANDWIDTH_6_MHZ: | ||
666 | priv->bandwidth = BANDWIDTH_6_MHZ; | ||
667 | priv->video_standard = DTV6; | ||
668 | priv->freq_hz = params->frequency - 1750000; | ||
669 | break; | ||
670 | case BANDWIDTH_7_MHZ: | ||
671 | printk(KERN_ERR "xc5000 bandwidth 7MHz not supported\n"); | ||
672 | return -EINVAL; | ||
673 | case BANDWIDTH_8_MHZ: | ||
674 | priv->bandwidth = BANDWIDTH_8_MHZ; | ||
675 | priv->video_standard = DTV8; | ||
676 | priv->freq_hz = params->frequency - 2750000; | ||
677 | break; | ||
678 | default: | ||
679 | printk(KERN_ERR "xc5000 bandwidth not set!\n"); | ||
680 | return -EINVAL; | ||
681 | } | ||
643 | priv->rf_mode = XC_RF_MODE_AIR; | 682 | priv->rf_mode = XC_RF_MODE_AIR; |
644 | priv->freq_hz = params->frequency - 1750000; | 683 | } else { |
645 | priv->bandwidth = BANDWIDTH_6_MHZ; | 684 | printk(KERN_ERR "xc5000 modulation type not supported!\n"); |
646 | priv->video_standard = DTV6; | ||
647 | break; | ||
648 | case QAM_64: | ||
649 | case QAM_256: | ||
650 | case QAM_AUTO: | ||
651 | dprintk(1, "%s() QAM modulation\n", __func__); | ||
652 | priv->rf_mode = XC_RF_MODE_CABLE; | ||
653 | priv->freq_hz = params->frequency - 1750000; | ||
654 | priv->bandwidth = BANDWIDTH_6_MHZ; | ||
655 | priv->video_standard = DTV6; | ||
656 | break; | ||
657 | default: | ||
658 | return -EINVAL; | 685 | return -EINVAL; |
659 | } | 686 | } |
660 | 687 | ||