Skip to contentSkip to conversation

dvb: nxt200x: Add function for nxt200x to change pll input

PATCH In review Michael Krufky 1 participant 2 messages Nov 4, 2005 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 dvb: nxt200x: Add function for nxt200x to change pll input

From: Kirk Lapray <[email protected]>

- 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

 drivers/media/dvb/frontends/nxt200x.c |    9 +++++++--
 drivers/media/dvb/frontends/nxt200x.h |    3 +++
 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/media/dvb/frontends/nxt200x.c +7 -2
@@ -556,13 +556,18 @@ static int nxt200x_setup_frontend_parame
 			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;
drivers/media/dvb/frontends/nxt200x.h +3 -0
@@ -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);
 };
#1 lore raw
Quoted 40 lines · Michael Krufky

From: Kirk Lapray <[email protected]>

- 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

drivers/media/dvb/frontends/nxt200x.c |    9 +++++++--
drivers/media/dvb/frontends/nxt200x.h |    3 +++
2 files changed, 10 insertions(+), 2 deletions(-)
drivers/media/dvb/frontends/nxt200x.c +7 -2
@@ -556,13 +556,18 @@ static int nxt200x_setup_frontend_parame
 			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;

drivers/media/dvb/frontends/nxt200x.h struct nxt200x_config · line 50

Quoted 9 lines
drivers/media/dvb/frontends/nxt200x.h +3 -0
@@ -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);
 };

Before anybody says it, I am aware of the whitespace issue right here. It is all over dvb-kernel, and we will be fixing this all at once, in a later patch.

Thank you,

Michael Krufky