diff options
author | Antti Palosaari <crope@iki.fi> | 2012-09-17 16:53:04 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-27 14:14:15 -0400 |
commit | 7e688de0006dd02583332c14e07ab2560a92e37d (patch) | |
tree | 6ff30b53be596382d11ada6841216bc5cb54010a | |
parent | 8acc91cd68e8493ce892c39d9f94afd8bcf9be67 (diff) |
[media] rtl2832: add configuration for e4000 tuner
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb-frontends/rtl2832.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb-frontends/rtl2832.h | 1 | ||||
-rw-r--r-- | drivers/media/dvb-frontends/rtl2832_priv.h | 37 |
3 files changed, 42 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c index aaf0c29f0229..80c8e5f1182f 100644 --- a/drivers/media/dvb-frontends/rtl2832.c +++ b/drivers/media/dvb-frontends/rtl2832.c | |||
@@ -468,6 +468,10 @@ static int rtl2832_init(struct dvb_frontend *fe) | |||
468 | len = ARRAY_SIZE(rtl2832_tuner_init_tua9001); | 468 | len = ARRAY_SIZE(rtl2832_tuner_init_tua9001); |
469 | init = rtl2832_tuner_init_tua9001; | 469 | init = rtl2832_tuner_init_tua9001; |
470 | break; | 470 | break; |
471 | case RTL2832_TUNER_E4000: | ||
472 | len = ARRAY_SIZE(rtl2832_tuner_init_e4000); | ||
473 | init = rtl2832_tuner_init_e4000; | ||
474 | break; | ||
471 | default: | 475 | default: |
472 | ret = -EINVAL; | 476 | ret = -EINVAL; |
473 | goto err; | 477 | goto err; |
diff --git a/drivers/media/dvb-frontends/rtl2832.h b/drivers/media/dvb-frontends/rtl2832.h index c4a611868195..785a466eb065 100644 --- a/drivers/media/dvb-frontends/rtl2832.h +++ b/drivers/media/dvb-frontends/rtl2832.h | |||
@@ -49,6 +49,7 @@ struct rtl2832_config { | |||
49 | */ | 49 | */ |
50 | #define RTL2832_TUNER_TUA9001 0x24 | 50 | #define RTL2832_TUNER_TUA9001 0x24 |
51 | #define RTL2832_TUNER_FC0012 0x26 | 51 | #define RTL2832_TUNER_FC0012 0x26 |
52 | #define RTL2832_TUNER_E4000 0x27 | ||
52 | #define RTL2832_TUNER_FC0013 0x29 | 53 | #define RTL2832_TUNER_FC0013 0x29 |
53 | u8 tuner; | 54 | u8 tuner; |
54 | }; | 55 | }; |
diff --git a/drivers/media/dvb-frontends/rtl2832_priv.h b/drivers/media/dvb-frontends/rtl2832_priv.h index 5e68955a539c..7d97ce9d2193 100644 --- a/drivers/media/dvb-frontends/rtl2832_priv.h +++ b/drivers/media/dvb-frontends/rtl2832_priv.h | |||
@@ -302,4 +302,41 @@ static const struct rtl2832_reg_value rtl2832_tuner_init_fc0012[] = { | |||
302 | {DVBT_IF_AGC_MAN, 0x0}, | 302 | {DVBT_IF_AGC_MAN, 0x0}, |
303 | }; | 303 | }; |
304 | 304 | ||
305 | static const struct rtl2832_reg_value rtl2832_tuner_init_e4000[] = { | ||
306 | {DVBT_DAGC_TRG_VAL, 0x5a}, | ||
307 | {DVBT_AGC_TARG_VAL_0, 0x0}, | ||
308 | {DVBT_AGC_TARG_VAL_8_1, 0x5a}, | ||
309 | {DVBT_AAGC_LOOP_GAIN, 0x18}, | ||
310 | {DVBT_LOOP_GAIN2_3_0, 0x8}, | ||
311 | {DVBT_LOOP_GAIN2_4, 0x1}, | ||
312 | {DVBT_LOOP_GAIN3, 0x18}, | ||
313 | {DVBT_VTOP1, 0x35}, | ||
314 | {DVBT_VTOP2, 0x21}, | ||
315 | {DVBT_VTOP3, 0x21}, | ||
316 | {DVBT_KRF1, 0x0}, | ||
317 | {DVBT_KRF2, 0x40}, | ||
318 | {DVBT_KRF3, 0x10}, | ||
319 | {DVBT_KRF4, 0x10}, | ||
320 | {DVBT_IF_AGC_MIN, 0x80}, | ||
321 | {DVBT_IF_AGC_MAX, 0x7f}, | ||
322 | {DVBT_RF_AGC_MIN, 0x80}, | ||
323 | {DVBT_RF_AGC_MAX, 0x7f}, | ||
324 | {DVBT_POLAR_RF_AGC, 0x0}, | ||
325 | {DVBT_POLAR_IF_AGC, 0x0}, | ||
326 | {DVBT_AD7_SETTING, 0xe9d4}, | ||
327 | {DVBT_EN_GI_PGA, 0x0}, | ||
328 | {DVBT_THD_LOCK_UP, 0x0}, | ||
329 | {DVBT_THD_LOCK_DW, 0x0}, | ||
330 | {DVBT_THD_UP1, 0x14}, | ||
331 | {DVBT_THD_DW1, 0xec}, | ||
332 | {DVBT_INTER_CNT_LEN, 0xc}, | ||
333 | {DVBT_GI_PGA_STATE, 0x0}, | ||
334 | {DVBT_EN_AGC_PGA, 0x1}, | ||
335 | {DVBT_REG_GPE, 0x1}, | ||
336 | {DVBT_REG_GPO, 0x1}, | ||
337 | {DVBT_REG_MONSEL, 0x1}, | ||
338 | {DVBT_REG_MON, 0x1}, | ||
339 | {DVBT_REG_4MSEL, 0x0}, | ||
340 | }; | ||
341 | |||
305 | #endif /* RTL2832_PRIV_H */ | 342 | #endif /* RTL2832_PRIV_H */ |