diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-28 01:06:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:14:05 -0400 |
commit | c0f4c0adfdb10747045fcc757a3e60ae1e1558f3 (patch) | |
tree | 99485a6610bd5bc052d14a89017d956497360af3 | |
parent | ecfceef742b816a5c8541a7d58fe215c38d4d859 (diff) |
V4L/DVB (8146): lgdt330x: add additional FEC control configuration option
Allow the following configuration, by passing clock_polarity_flip = 2:
Enable FEC automatic reset. Disable spectrum inversion.
Enable viterbi resynchronization. Set polarity indicator high.
Enable error flag insertion.
Thanks to Daniel Gimpelevich, for discovering that this configuration
is used on the AVerMedia AVerTVHD Volar.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
CC: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/dvb/frontends/lgdt330x.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/media/dvb/frontends/lgdt330x.c b/drivers/media/dvb/frontends/lgdt330x.c index f0195c8272f4..056387b41a8f 100644 --- a/drivers/media/dvb/frontends/lgdt330x.c +++ b/drivers/media/dvb/frontends/lgdt330x.c | |||
@@ -226,11 +226,16 @@ static int lgdt330x_init(struct dvb_frontend* fe) | |||
226 | 0x4c, 0x14 | 226 | 0x4c, 0x14 |
227 | }; | 227 | }; |
228 | 228 | ||
229 | static u8 flip_lgdt3303_init_data[] = { | 229 | static u8 flip_1_lgdt3303_init_data[] = { |
230 | 0x4c, 0x14, | 230 | 0x4c, 0x14, |
231 | 0x87, 0xf3 | 231 | 0x87, 0xf3 |
232 | }; | 232 | }; |
233 | 233 | ||
234 | static u8 flip_2_lgdt3303_init_data[] = { | ||
235 | 0x4c, 0x14, | ||
236 | 0x87, 0xda | ||
237 | }; | ||
238 | |||
234 | struct lgdt330x_state* state = fe->demodulator_priv; | 239 | struct lgdt330x_state* state = fe->demodulator_priv; |
235 | char *chip_name; | 240 | char *chip_name; |
236 | int err; | 241 | int err; |
@@ -243,10 +248,19 @@ static int lgdt330x_init(struct dvb_frontend* fe) | |||
243 | break; | 248 | break; |
244 | case LGDT3303: | 249 | case LGDT3303: |
245 | chip_name = "LGDT3303"; | 250 | chip_name = "LGDT3303"; |
246 | if (state->config->clock_polarity_flip) { | 251 | switch (state->config->clock_polarity_flip) { |
247 | err = i2c_write_demod_bytes(state, flip_lgdt3303_init_data, | 252 | case 2: |
248 | sizeof(flip_lgdt3303_init_data)); | 253 | err = i2c_write_demod_bytes(state, |
249 | } else { | 254 | flip_2_lgdt3303_init_data, |
255 | sizeof(flip_2_lgdt3303_init_data)); | ||
256 | break; | ||
257 | case 1: | ||
258 | err = i2c_write_demod_bytes(state, | ||
259 | flip_1_lgdt3303_init_data, | ||
260 | sizeof(flip_1_lgdt3303_init_data)); | ||
261 | break; | ||
262 | case 0: | ||
263 | default: | ||
250 | err = i2c_write_demod_bytes(state, lgdt3303_init_data, | 264 | err = i2c_write_demod_bytes(state, lgdt3303_init_data, |
251 | sizeof(lgdt3303_init_data)); | 265 | sizeof(lgdt3303_init_data)); |
252 | } | 266 | } |