]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
tda10071: force modulation to QPSK on DVB-S
authorAntti Palosaari <crope@iki.fi>
Fri, 4 Jul 2014 08:44:39 +0000 (05:44 -0300)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 13 Sep 2014 22:41:37 +0000 (23:41 +0100)
commit db4175ae2095634dbecd4c847da439f9c83e1b3b upstream.

Only supported modulation for DVB-S is QPSK. Modulation parameter
contains invalid value for DVB-S on some cases, which leads driver
refusing tuning attempt. Due to that, hard code modulation to QPSK
in case of DVB-S.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/media/dvb/frontends/tda10071.c

index 0c37434d19e20adb34024b3421ce55cf94df34f9..ba7928491042564b31b17a3265f6d1122691f2a6 100644 (file)
@@ -644,6 +644,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe,
        struct dtv_frontend_properties *c = &fe->dtv_property_cache;
        int ret, i;
        u8 mode, rolloff, pilot, inversion, div;
+       fe_modulation_t modulation;
 
        dbg("%s: delivery_system=%d modulation=%d frequency=%d " \
                "symbol_rate=%d inversion=%d pilot=%d rolloff=%d", __func__,
@@ -677,10 +678,13 @@ static int tda10071_set_frontend(struct dvb_frontend *fe,
 
        switch (c->delivery_system) {
        case SYS_DVBS:
+               modulation = QPSK;
                rolloff = 0;
                pilot = 2;
                break;
        case SYS_DVBS2:
+               modulation = c->modulation;
+
                switch (c->rolloff) {
                case ROLLOFF_20:
                        rolloff = 2;
@@ -722,7 +726,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe,
 
        for (i = 0, mode = 0xff; i < ARRAY_SIZE(TDA10071_MODCOD); i++) {
                if (c->delivery_system == TDA10071_MODCOD[i].delivery_system &&
-                       c->modulation == TDA10071_MODCOD[i].modulation &&
+                       modulation == TDA10071_MODCOD[i].modulation &&
                        c->fec_inner == TDA10071_MODCOD[i].fec) {
                        mode = TDA10071_MODCOD[i].val;
                        dbg("%s: mode found=%02x", __func__, mode);