[PATCH] dvb: nxt200x: Add function for nxt200x to change pll input
authorKirk Lapray <kirk.lapray@gmail.com>
Wed, 9 Nov 2005 05:36:02 +0000 (21:36 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 9 Nov 2005 15:56:06 +0000 (07:56 -0800)
- Added function for nxt200x to change pll input
- For VSB set to input 0, for QAM set to input 1
- will only be set for cards that have set_pll_input defined

Signed-off-by: Kirk Lapray <kirk.lapray@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/media/dvb/frontends/nxt200x.c
drivers/media/dvb/frontends/nxt200x.h

index 4cffe7ad9710950d6716d7cfebb0b94afea2d31e..bad0933eb7146663124339b366c53e47295bd4a8 100644 (file)
@@ -556,13 +556,18 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe,
                        if (state->config->set_ts_params)
                                state->config->set_ts_params(fe, 1);
 
-                       /* set to use cable input */
-                       buf[3] |= 0x08;
+                       /* set input */
+                       if (state->config->set_pll_input)
+                               state->config->set_pll_input(buf, 1);
                        break;
                case VSB_8:
                        /* Set non-punctured clock for VSB */
                        if (state->config->set_ts_params)
                                state->config->set_ts_params(fe, 0);
+
+                       /* set input */
+                       if (state->config->set_pll_input)
+                               state->config->set_pll_input(buf, 0);
                        break;
                default:
                        return -EINVAL;
index 8dc3f03ecdf7654ab2a8b4d715c73a2cd6f51f6f..1d9d70bc37efc06dadcc703423154cadc6243557 100644 (file)
@@ -42,6 +42,9 @@ struct nxt200x_config
        u8 pll_address;
        struct dvb_pll_desc *pll_desc;
 
+       /* used to set pll input */
+       int (*set_pll_input)(u8* buf, int input);
+
        /* need to set device param for start_dma */
        int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured);
 };