summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/dib3000mc.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/frontends/dib3000mc.c')
-rw-r--r--linux/drivers/media/dvb/frontends/dib3000mc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/frontends/dib3000mc.c b/linux/drivers/media/dvb/frontends/dib3000mc.c
index 3b303dbb6..66b30edad 100644
--- a/linux/drivers/media/dvb/frontends/dib3000mc.c
+++ b/linux/drivers/media/dvb/frontends/dib3000mc.c
@@ -558,6 +558,7 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe,
static int dib3000mc_fe_init(struct dvb_frontend* fe, int mobile_mode)
{
struct dib3000_state *state = fe->demodulator_priv;
+ int AGCtuner=(int)fe->misc_priv;
deb_info("init start\n");
state->timing_offset = 0;
@@ -583,10 +584,11 @@ static int dib3000mc_fe_init(struct dvb_frontend* fe, int mobile_mode)
/* mobile mode - portable reception */
wr_foreach(dib3000mc_reg_mobile_mode,dib3000mc_mobile_mode[1]);
-/* TUNER_PANASONIC_ENV57H12D5: */
+/* TUNER_PANASONIC_ENV57H12D5 or TUNER_MICROTUNE_MT2060. Sets agc_tuner accordingly */
wr_foreach(dib3000mc_reg_agc_bandwidth,dib3000mc_agc_bandwidth);
wr_foreach(dib3000mc_reg_agc_bandwidth_general,dib3000mc_agc_bandwidth_general);
- wr_foreach(dib3000mc_reg_agc,dib3000mc_agc_tuner[1]);
+ if (AGCtuner<0 || AGCtuner>=DIB3000MC_AGC_TUNER_COUNT) AGCtuner=1;
+ wr_foreach(dib3000mc_reg_agc,dib3000mc_agc_tuner[AGCtuner]);
wr(DIB3000MC_REG_UNK_110,DIB3000MC_UNK_110);
wr(26,0x6680);