Commit b91a7cb0 authored by Manu Abraham's avatar Manu Abraham Committed by Mauro Carvalho Chehab

V4L/DVB (9462): Allow specifying clock per device

Optimizations galore: Blistering barnacles! The KNC1 and friends
like 90 Mhz clock much better rather than running at a higher
throttle, for almost similar hardware. he exact cause unknown,
possibly due to a lower voltage applied for the demod power supply.
Signed-off-by: default avatarManu Abraham <manu@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ef3052bc
...@@ -1534,6 +1534,7 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvbfe_pa ...@@ -1534,6 +1534,7 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvbfe_pa
struct stb0899_state *state = fe->demodulator_priv; struct stb0899_state *state = fe->demodulator_priv;
struct stb0899_params *i_params = &state->params; struct stb0899_params *i_params = &state->params;
struct stb0899_internal *internal = &state->internal; struct stb0899_internal *internal = &state->internal;
struct stb0899_config *config = state->config;
u32 SearchRange, gain; u32 SearchRange, gain;
...@@ -1575,9 +1576,9 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvbfe_pa ...@@ -1575,9 +1576,9 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvbfe_pa
} }
if (i_params->srate <= 5000000) if (i_params->srate <= 5000000)
stb0899_set_mclk(state, 76500000); stb0899_set_mclk(state, config->lo_clk);
else else
stb0899_set_mclk(state, 99000000); stb0899_set_mclk(state, config->hi_clk);
switch (state->delsys) { switch (state->delsys) {
case DVBFE_DELSYS_DVBS: case DVBFE_DELSYS_DVBS:
......
...@@ -117,6 +117,8 @@ struct stb0899_config { ...@@ -117,6 +117,8 @@ struct stb0899_config {
u8 out_rate_comp; u8 out_rate_comp;
u8 i2c_repeater; u8 i2c_repeater;
// int inversion; // int inversion;
int lo_clk;
int hi_clk;
u32 esno_ave; u32 esno_ave;
u32 esno_quant; u32 esno_quant;
......
...@@ -1127,6 +1127,9 @@ static struct stb0899_config knc1_dvbs2_config = { ...@@ -1127,6 +1127,9 @@ static struct stb0899_config knc1_dvbs2_config = {
.xtal_freq = 27000000, .xtal_freq = 27000000,
.inversion = IQ_SWAP_OFF, /* 1 */ .inversion = IQ_SWAP_OFF, /* 1 */
.lo_clk = 76500000,
.hi_clk = 90000000,
.esno_ave = STB0899_DVBS2_ESNO_AVE, .esno_ave = STB0899_DVBS2_ESNO_AVE,
.esno_quant = STB0899_DVBS2_ESNO_QUANT, .esno_quant = STB0899_DVBS2_ESNO_QUANT,
.avframes_coarse = STB0899_DVBS2_AVFRAMES_COARSE, .avframes_coarse = STB0899_DVBS2_AVFRAMES_COARSE,
......
...@@ -1312,6 +1312,9 @@ static struct stb0899_config tt3200_config = { ...@@ -1312,6 +1312,9 @@ static struct stb0899_config tt3200_config = {
.xtal_freq = 27000000, .xtal_freq = 27000000,
.inversion = IQ_SWAP_ON, /* 1 */ .inversion = IQ_SWAP_ON, /* 1 */
.lo_clk = 76500000,
.hi_clk = 99000000,
.esno_ave = STB0899_DVBS2_ESNO_AVE, .esno_ave = STB0899_DVBS2_ESNO_AVE,
.esno_quant = STB0899_DVBS2_ESNO_QUANT, .esno_quant = STB0899_DVBS2_ESNO_QUANT,
.avframes_coarse = STB0899_DVBS2_AVFRAMES_COARSE, .avframes_coarse = STB0899_DVBS2_AVFRAMES_COARSE,
......
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