Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d04aa54a27f7bc6f051e55c47abbc0a1db1718bc
Commit:     d04aa54a27f7bc6f051e55c47abbc0a1db1718bc
Parent:     d74cb25e427e2ef979107cbed67d39eba53a6b0f
Author:     Mauro Carvalho Chehab <[EMAIL PROTECTED]>
AuthorDate: Sat Nov 24 10:47:03 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:02:56 2008 -0200

    V4L/DVB (6674): Add support for other DTV types
    
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 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 cef170c..42fb141 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,
 {
        struct xc2028_data *priv = fe->tuner_priv;
        unsigned int       type=0;
-       fe_bandwidth_t     bw;
+       fe_bandwidth_t     bw = BANDWIDTH_8_MHZ;
 
        tuner_dbg("%s called\n", __FUNCTION__);
 
-       /* FIXME: Only OFDM implemented */
-       if (fe->ops.info.type != FE_OFDM) {
-               tuner_err("DTV type not implemented.\n");
-               return -EINVAL;
-       }
-       bw = p->u.ofdm.bandwidth;
-
-       if (bw == BANDWIDTH_7_MHZ || bw == BANDWIDTH_8_MHZ)
-               type |= F8MHZ;
-
        if (priv->ctrl.d2633)
                type |= D2633;
        else
                type |= D2620;
 
+       switch(fe->ops.info.type) {
+       case FE_QPSK:
+               break;
+       case FE_OFDM:
+               bw = p->u.ofdm.bandwidth;
+               break;
+       case FE_QAM:
+               bw = BANDWIDTH_6_MHZ;
+               type |= QAM;
+               break;
+       case FE_ATSC:
+               bw = BANDWIDTH_6_MHZ;
+               type |= ATSC| D2633;
+               break;
+       }
+
+       bw = p->u.ofdm.bandwidth;
+
+       /* FIXME:
+         There are two Scodes that will never be selected:
+               DTV78 ZARLINK456, DTV78 DIBCOM52
+         When it should opt for DTV78 instead of DTV7 or DTV8?
+       */
        switch (bw) {
        case BANDWIDTH_8_MHZ:
-               type |= DTV8;
+               type |= DTV8 | F8MHZ;
                break;
        case BANDWIDTH_7_MHZ:
-               type |= DTV7;
+               type |= DTV7 | F8MHZ;
                break;
        case BANDWIDTH_6_MHZ:
-               /* FIXME: Should allow select also ATSC */
-               type |= DTV6 | QAM;
+               type |= DTV6 ;
                break;
        default:
                tuner_err("error: bandwidth not supported.\n");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to