diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-24 00:12:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-24 00:12:49 -0400 |
commit | df462b3dbeeaae7141f1b63cbfcc1e1bae6a85fc (patch) | |
tree | bca52fce066159f136d75c69e79016422212cb1d /drivers/media/common/tuners/xc5000.c | |
parent | 343800e7d20944aead238c2c6e3f7789f8b6587c (diff) | |
parent | cf25220677b3f10468a74278130fe224f73632a6 (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (247 commits)
[media] gspca - sunplus: Fix some warnings and simplify code
[media] gspca: Fix some warnings tied to 'no debug'
[media] gspca: Unset debug by default
[media] gspca - cpia1: Remove a bad conditional compilation instruction
[media] gspca - main: Remove USB traces
[media] gspca - main: Version change to 2.13
[media] gspca - stk014 / t613: Accept the index 0 in querymenu
[media] gspca - kinect: Remove __devinitdata
[media] gspca - cpia1: Fix some warnings
[media] video/Kconfig: Fix mis-classified devices
[media] support for medion dvb stick 1660:1921
[media] tm6000: fix uninitialized field, change prink to dprintk
[media] cx231xx: Add support for Iconbit U100
[media] saa7134 add new TV cards
[media] Use a more consistent value for RC repeat period
[media] cx18: Move spinlock and vb_type initialisation into stream_init
[media] tm6000: remove tm6010 sif audio start and stop
[media] tm6000: remove unused exports
[media] tm6000: add pts logging
[media] tm6000: change from ioctl to unlocked_ioctl
...
Diffstat (limited to 'drivers/media/common/tuners/xc5000.c')
-rw-r--r-- | drivers/media/common/tuners/xc5000.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index 1e28f7dcb26b..aa1b2e844d32 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c | |||
@@ -628,6 +628,15 @@ static void xc_debug_dump(struct xc5000_priv *priv) | |||
628 | dprintk(1, "*** Quality (0:<8dB, 7:>56dB) = %d\n", quality); | 628 | dprintk(1, "*** Quality (0:<8dB, 7:>56dB) = %d\n", quality); |
629 | } | 629 | } |
630 | 630 | ||
631 | /* | ||
632 | * As defined on EN 300 429, the DVB-C roll-off factor is 0.15. | ||
633 | * So, the amount of the needed bandwith is given by: | ||
634 | * Bw = Symbol_rate * (1 + 0.15) | ||
635 | * As such, the maximum symbol rate supported by 6 MHz is given by: | ||
636 | * max_symbol_rate = 6 MHz / 1.15 = 5217391 Bauds | ||
637 | */ | ||
638 | #define MAX_SYMBOL_RATE_6MHz 5217391 | ||
639 | |||
631 | static int xc5000_set_params(struct dvb_frontend *fe, | 640 | static int xc5000_set_params(struct dvb_frontend *fe, |
632 | struct dvb_frontend_parameters *params) | 641 | struct dvb_frontend_parameters *params) |
633 | { | 642 | { |
@@ -688,21 +697,32 @@ static int xc5000_set_params(struct dvb_frontend *fe, | |||
688 | } | 697 | } |
689 | priv->rf_mode = XC_RF_MODE_AIR; | 698 | priv->rf_mode = XC_RF_MODE_AIR; |
690 | } else if (fe->ops.info.type == FE_QAM) { | 699 | } else if (fe->ops.info.type == FE_QAM) { |
691 | dprintk(1, "%s() QAM\n", __func__); | ||
692 | switch (params->u.qam.modulation) { | 700 | switch (params->u.qam.modulation) { |
701 | case QAM_256: | ||
702 | case QAM_AUTO: | ||
693 | case QAM_16: | 703 | case QAM_16: |
694 | case QAM_32: | 704 | case QAM_32: |
695 | case QAM_64: | 705 | case QAM_64: |
696 | case QAM_128: | 706 | case QAM_128: |
697 | case QAM_256: | ||
698 | case QAM_AUTO: | ||
699 | dprintk(1, "%s() QAM modulation\n", __func__); | 707 | dprintk(1, "%s() QAM modulation\n", __func__); |
700 | priv->bandwidth = BANDWIDTH_8_MHZ; | ||
701 | priv->video_standard = DTV7_8; | ||
702 | priv->freq_hz = params->frequency - 2750000; | ||
703 | priv->rf_mode = XC_RF_MODE_CABLE; | 708 | priv->rf_mode = XC_RF_MODE_CABLE; |
709 | /* | ||
710 | * Using a 8MHz bandwidth sometimes fail | ||
711 | * with 6MHz-spaced channels, due to inter-carrier | ||
712 | * interference. So, use DTV6 firmware | ||
713 | */ | ||
714 | if (params->u.qam.symbol_rate <= MAX_SYMBOL_RATE_6MHz) { | ||
715 | priv->bandwidth = BANDWIDTH_6_MHZ; | ||
716 | priv->video_standard = DTV6; | ||
717 | priv->freq_hz = params->frequency - 1750000; | ||
718 | } else { | ||
719 | priv->bandwidth = BANDWIDTH_8_MHZ; | ||
720 | priv->video_standard = DTV7_8; | ||
721 | priv->freq_hz = params->frequency - 2750000; | ||
722 | } | ||
704 | break; | 723 | break; |
705 | default: | 724 | default: |
725 | dprintk(1, "%s() Unsupported QAM type\n", __func__); | ||
706 | return -EINVAL; | 726 | return -EINVAL; |
707 | } | 727 | } |
708 | } else { | 728 | } else { |