V4L/DVB (6657): Fix standard selection for PAL/M, PAL/N, PAL/Nc and NTSC
authorMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 22 Nov 2007 14:47:18 +0000 (11:47 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:02:37 +0000 (19:02 -0200)
Those standards use 6 MHz firmware.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tuner-xc2028.c

index 429e81be697e334b5bf26f939b63126bdc458454..911831442b593fe3f01b289ccfadb844609d12ca 100644 (file)
@@ -910,12 +910,18 @@ static int xc2028_set_tv_freq(struct dvb_frontend *fe,
                              struct analog_parameters *p)
 {
        struct xc2028_data *priv = fe->tuner_priv;
+       fe_bandwidth_t bw;
+
+       /* FIXME: Maybe there are more 6 MHz video standards */
+       if (p->std & V4L2_STD_MN)
+               bw = BANDWIDTH_6_MHZ;
+       else
+               bw = BANDWIDTH_8_MHZ;
 
        tuner_dbg("%s called\n", __FUNCTION__);
 
        return generic_set_tv_freq(fe, 62500l * p->frequency, T_ANALOG_TV,
-                                  p->std, BANDWIDTH_8_MHZ);
-                                  /* XXX Are some analog standards 6MHz? */
+                                  p->std, bw);
 }
 
 static int xc2028_set_params(struct dvb_frontend *fe,