From: Stefan Ringel <[email protected]>

Signed-off-by: Stefan Ringel <[email protected]>
---
 drivers/media/common/tuners/mt2063.c |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/media/common/tuners/mt2063.c 
b/drivers/media/common/tuners/mt2063.c
index 6743ffe..5b4b1ec 100644
--- a/drivers/media/common/tuners/mt2063.c
+++ b/drivers/media/common/tuners/mt2063.c
@@ -2211,18 +2211,29 @@ static int mt2063_get_frequency(struct dvb_frontend 
*fe, u32 *freq)
        if (!state->init)
                return -ENODEV;
 
-       /*
-        * FIXME: This is an API abuse at DRX-K driver: in order to allow
-        * tda18271 to change the IF based on the standard, it uses this
-        * callback as "get_if_frequency".
-        */
-       *freq = state->reference * 1000;
+       *freq = state->frequency;
 
        dprintk(1, "frequency: %d\n", *freq);
 
        return 0;
 }
 
+static int mt2063_get_if_frequency(struct dvb_frontend *fe, u32 *freq)
+{
+       struct mt2063_state *state = fe->tuner_priv;
+
+       dprintk(2, "\n");
+
+       if (!state->init)
+               return -ENODEV;
+
+       *freq = state->AS_Data.f_out;
+
+       dprintk(1, "if frequency: %d\n", *freq);
+
+       return 0;
+}
+
 static int mt2063_get_bandwidth(struct dvb_frontend *fe, u32 *bw)
 {
        struct mt2063_state *state = fe->tuner_priv;
@@ -2253,6 +2264,7 @@ static struct dvb_tuner_ops mt2063_ops = {
        .set_analog_params = mt2063_set_analog_params,
        .set_params    = mt2063_set_params,
        .get_frequency = mt2063_get_frequency,
+       .get_if_frequency = mt2063_get_if_frequency,
        .get_bandwidth = mt2063_get_bandwidth,
        .release = mt2063_release,
 };
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to