Commit 173a64cb authored by Patrick Boettcher's avatar Patrick Boettcher Committed by Mauro Carvalho Chehab

[media] dib8000: enhancement

The intend of this patch is to improve the support of the dib8000.
Signed-off-by: default avatarOlivier Grenie <olivier.grenie@parrot.com>
Signed-off-by: default avatarPatrick Boettcher <patrick.boettcher@parrot.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1552fb34
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -33,6 +33,8 @@ struct dib8000_config { ...@@ -33,6 +33,8 @@ struct dib8000_config {
u8 output_mode; u8 output_mode;
u8 refclksel; u8 refclksel;
u8 enMpegOutput:1; u8 enMpegOutput:1;
struct dibx000_bandwidth_config *plltable;
}; };
#define DEFAULT_DIB8000_I2C_ADDRESS 18 #define DEFAULT_DIB8000_I2C_ADDRESS 18
...@@ -58,7 +60,7 @@ extern int dib8090p_get_dc_power(struct dvb_frontend *fe, u8 IQ); ...@@ -58,7 +60,7 @@ extern int dib8090p_get_dc_power(struct dvb_frontend *fe, u8 IQ);
extern u32 dib8000_ctrl_timf(struct dvb_frontend *fe, extern u32 dib8000_ctrl_timf(struct dvb_frontend *fe,
uint8_t op, uint32_t timf); uint8_t op, uint32_t timf);
extern int dib8000_update_pll(struct dvb_frontend *fe, extern int dib8000_update_pll(struct dvb_frontend *fe,
struct dibx000_bandwidth_config *pll); struct dibx000_bandwidth_config *pll, u32 bw, u8 ratio);
extern int dib8000_set_slave_frontend(struct dvb_frontend *fe, struct dvb_frontend *fe_slave); extern int dib8000_set_slave_frontend(struct dvb_frontend *fe, struct dvb_frontend *fe_slave);
extern int dib8000_remove_slave_frontend(struct dvb_frontend *fe); extern int dib8000_remove_slave_frontend(struct dvb_frontend *fe);
extern struct dvb_frontend *dib8000_get_slave_frontend(struct dvb_frontend *fe, int slave_index); extern struct dvb_frontend *dib8000_get_slave_frontend(struct dvb_frontend *fe, int slave_index);
...@@ -147,7 +149,7 @@ static inline u32 dib8000_ctrl_timf(struct dvb_frontend *fe, ...@@ -147,7 +149,7 @@ static inline u32 dib8000_ctrl_timf(struct dvb_frontend *fe,
return 0; return 0;
} }
static inline int dib8000_update_pll(struct dvb_frontend *fe, static inline int dib8000_update_pll(struct dvb_frontend *fe,
struct dibx000_bandwidth_config *pll) struct dibx000_bandwidth_config *pll, u32 bw, u8 ratio)
{ {
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return -ENODEV; return -ENODEV;
......
...@@ -193,7 +193,8 @@ enum frontend_tune_state { ...@@ -193,7 +193,8 @@ enum frontend_tune_state {
CT_DEMOD_STEP_8, CT_DEMOD_STEP_8,
CT_DEMOD_STEP_9, CT_DEMOD_STEP_9,
CT_DEMOD_STEP_10, CT_DEMOD_STEP_10,
CT_DEMOD_SEARCH_NEXT = 41, CT_DEMOD_STEP_11,
CT_DEMOD_SEARCH_NEXT = 51,
CT_DEMOD_STEP_LOCKED, CT_DEMOD_STEP_LOCKED,
CT_DEMOD_STOP, CT_DEMOD_STOP,
......
...@@ -1850,7 +1850,7 @@ static int dib8096p_agc_startup(struct dvb_frontend *fe) ...@@ -1850,7 +1850,7 @@ static int dib8096p_agc_startup(struct dvb_frontend *fe)
if ((adc_table->freq != 0xffffffff) && better_sampling_freq) { if ((adc_table->freq != 0xffffffff) && better_sampling_freq) {
pll.pll_ratio = adc_table->pll_loopdiv; pll.pll_ratio = adc_table->pll_loopdiv;
pll.pll_prediv = adc_table->pll_prediv; pll.pll_prediv = adc_table->pll_prediv;
dib8000_update_pll(fe, &pll); dib8000_update_pll(fe, &pll, fe->dtv_property_cache.bandwidth_hz / 1000, 0);
dib8000_ctrl_timf(fe, DEMOD_TIMF_SET, adc_table->timf); dib8000_ctrl_timf(fe, DEMOD_TIMF_SET, adc_table->timf);
} }
return 0; return 0;
......
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