summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-26 15:02:25 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-04 14:36:48 -0300
commit7abc7a54dad585311252a07c8edfa3840537a3e9 (patch)
tree91dcea783b19cbf6cee10c3b21d4f1c3a31fb24d /drivers/media/dvb-frontends
parenta6530ce54b6081c168329e18839005b486eaf90e (diff)
[media] drx-j: be sure to use tuner's IF
Instead of just hardcoding an IF value of 5MHz, use the one provided by the tuner, with can be different for QAM and VSB. Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r--drivers/media/dvb-frontends/drx39xyj/drxj.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c
index c9608e627cca..ccd847e10797 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drxj.c
+++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c
@@ -20171,11 +20171,21 @@ static int drx39xxj_set_frontend(struct dvb_frontend *fe)
/* Bring the demod out of sleep */
drx39xxj_set_powerstate(fe, 1);
- /* Now make the tuner do it's thing... */
if (fe->ops.tuner_ops.set_params) {
+ u32 int_freq;
+
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
+
+ /* Set tuner to desired frequency and standard */
fe->ops.tuner_ops.set_params(fe);
+
+ /* Use the tuner's IF */
+ if (fe->ops.tuner_ops.get_if_frequency) {
+ fe->ops.tuner_ops.get_if_frequency(fe, &int_freq);
+ demod->my_common_attr->intermediate_freq = int_freq / 1000;
+ }
+
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);
}