diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-24 08:47:03 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:02:56 -0500 |
commit | d04aa54a27f7bc6f051e55c47abbc0a1db1718bc (patch) | |
tree | b6f4305223000303b93f8bd00e690b8e560086af /drivers/media/video/tuner-xc2028.c | |
parent | d74cb25e427e2ef979107cbed67d39eba53a6b0f (diff) |
V4L/DVB (6674): Add support for other DTV types
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-xc2028.c')
-rw-r--r-- | drivers/media/video/tuner-xc2028.c | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c index cef170cc2ad8..42fb141fc386 100644 --- a/drivers/media/video/tuner-xc2028.c +++ b/drivers/media/video/tuner-xc2028.c | |||
@@ -919,35 +919,47 @@ static int xc2028_set_params(struct dvb_frontend *fe, | |||
919 | { | 919 | { |
920 | struct xc2028_data *priv = fe->tuner_priv; | 920 | struct xc2028_data *priv = fe->tuner_priv; |
921 | unsigned int type=0; | 921 | unsigned int type=0; |
922 | fe_bandwidth_t bw; | 922 | fe_bandwidth_t bw = BANDWIDTH_8_MHZ; |
923 | 923 | ||
924 | tuner_dbg("%s called\n", __FUNCTION__); | 924 | tuner_dbg("%s called\n", __FUNCTION__); |
925 | 925 | ||
926 | /* FIXME: Only OFDM implemented */ | ||
927 | if (fe->ops.info.type != FE_OFDM) { | ||
928 | tuner_err("DTV type not implemented.\n"); | ||
929 | return -EINVAL; | ||
930 | } | ||
931 | bw = p->u.ofdm.bandwidth; | ||
932 | |||
933 | if (bw == BANDWIDTH_7_MHZ || bw == BANDWIDTH_8_MHZ) | ||
934 | type |= F8MHZ; | ||
935 | |||
936 | if (priv->ctrl.d2633) | 926 | if (priv->ctrl.d2633) |
937 | type |= D2633; | 927 | type |= D2633; |
938 | else | 928 | else |
939 | type |= D2620; | 929 | type |= D2620; |
940 | 930 | ||
931 | switch(fe->ops.info.type) { | ||
932 | case FE_QPSK: | ||
933 | break; | ||
934 | case FE_OFDM: | ||
935 | bw = p->u.ofdm.bandwidth; | ||
936 | break; | ||
937 | case FE_QAM: | ||
938 | bw = BANDWIDTH_6_MHZ; | ||
939 | type |= QAM; | ||
940 | break; | ||
941 | case FE_ATSC: | ||
942 | bw = BANDWIDTH_6_MHZ; | ||
943 | type |= ATSC| D2633; | ||
944 | break; | ||
945 | } | ||
946 | |||
947 | bw = p->u.ofdm.bandwidth; | ||
948 | |||
949 | /* FIXME: | ||
950 | There are two Scodes that will never be selected: | ||
951 | DTV78 ZARLINK456, DTV78 DIBCOM52 | ||
952 | When it should opt for DTV78 instead of DTV7 or DTV8? | ||
953 | */ | ||
941 | switch (bw) { | 954 | switch (bw) { |
942 | case BANDWIDTH_8_MHZ: | 955 | case BANDWIDTH_8_MHZ: |
943 | type |= DTV8; | 956 | type |= DTV8 | F8MHZ; |
944 | break; | 957 | break; |
945 | case BANDWIDTH_7_MHZ: | 958 | case BANDWIDTH_7_MHZ: |
946 | type |= DTV7; | 959 | type |= DTV7 | F8MHZ; |
947 | break; | 960 | break; |
948 | case BANDWIDTH_6_MHZ: | 961 | case BANDWIDTH_6_MHZ: |
949 | /* FIXME: Should allow select also ATSC */ | 962 | type |= DTV6 ; |
950 | type |= DTV6 | QAM; | ||
951 | break; | 963 | break; |
952 | default: | 964 | default: |
953 | tuner_err("error: bandwidth not supported.\n"); | 965 | tuner_err("error: bandwidth not supported.\n"); |