]> err.no Git - linux-2.6/commitdiff
V4L/DVB (6672): Add support for radio
authorMauro Carvalho Chehab <mchehab@infradead.org>
Sat, 24 Nov 2007 13:20:15 +0000 (10:20 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:02:54 +0000 (19:02 -0200)
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tuner-xc2028.c
drivers/media/video/tuner-xc2028.h

index 94f367ab5718e24cd89f76f69feda3adc6b4933a..cef170cc2ad8a1c6c7e4ea75fcb80fd7ffc66f49 100644 (file)
@@ -891,6 +891,14 @@ static int xc2028_set_analog_freq(struct dvb_frontend *fe,
 
        tuner_dbg("%s called\n", __FUNCTION__);
 
+       if (p->mode == V4L2_TUNER_RADIO) {
+               type |= FM;
+               if (priv->ctrl.input1)
+                       type |= INPUT1;
+               return generic_set_freq(fe, (625l * p->frequency) / 10,
+                               T_ANALOG_TV, type, 0);
+       }
+
        /* if std is not defined, choose one */
        if (!p->std)
                p->std = V4L2_STD_MN;
index a59d00fb2a36a6c8e2539f099539c917888ca164..02e116b54592deb50be251c98363b6df46be1fa9 100644 (file)
@@ -15,8 +15,9 @@ struct xc2028_ctrl {
        char                    *fname;
        int                     max_len;
        unsigned int            scode_table;
-       unsigned int            mts  :1;
-       unsigned int            d2633:1;
+       unsigned int            mts   :1;
+       unsigned int            d2633 :1;
+       unsigned int            input1:1;
 };
 
 struct xc2028_config {