Commit c0f4c0ad authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab

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: default avatarMichael Krufky <mkrufky@linuxtv.org>
CC: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent ecfceef7
...@@ -226,11 +226,16 @@ static int lgdt330x_init(struct dvb_frontend* fe) ...@@ -226,11 +226,16 @@ static int lgdt330x_init(struct dvb_frontend* fe)
0x4c, 0x14 0x4c, 0x14
}; };
static u8 flip_lgdt3303_init_data[] = { static u8 flip_1_lgdt3303_init_data[] = {
0x4c, 0x14, 0x4c, 0x14,
0x87, 0xf3 0x87, 0xf3
}; };
static u8 flip_2_lgdt3303_init_data[] = {
0x4c, 0x14,
0x87, 0xda
};
struct lgdt330x_state* state = fe->demodulator_priv; struct lgdt330x_state* state = fe->demodulator_priv;
char *chip_name; char *chip_name;
int err; int err;
...@@ -243,10 +248,19 @@ static int lgdt330x_init(struct dvb_frontend* fe) ...@@ -243,10 +248,19 @@ static int lgdt330x_init(struct dvb_frontend* fe)
break; break;
case LGDT3303: case LGDT3303:
chip_name = "LGDT3303"; chip_name = "LGDT3303";
if (state->config->clock_polarity_flip) { switch (state->config->clock_polarity_flip) {
err = i2c_write_demod_bytes(state, flip_lgdt3303_init_data, case 2:
sizeof(flip_lgdt3303_init_data)); err = i2c_write_demod_bytes(state,
} else { flip_2_lgdt3303_init_data,
sizeof(flip_2_lgdt3303_init_data));
break;
case 1:
err = i2c_write_demod_bytes(state,
flip_1_lgdt3303_init_data,
sizeof(flip_1_lgdt3303_init_data));
break;
case 0:
default:
err = i2c_write_demod_bytes(state, lgdt3303_init_data, err = i2c_write_demod_bytes(state, lgdt3303_init_data,
sizeof(lgdt3303_init_data)); sizeof(lgdt3303_init_data));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment