[media] cxd2820r: TS clock inversion in config
authorCrazyCat <crazycat69@narod.ru>
Tue, 3 Jun 2014 17:19:07 +0000 (14:19 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 22 Jul 2014 12:47:05 +0000 (09:47 -0300)
TS clock inversion in config.

Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/dvb-frontends/cxd2820r.h
drivers/media/dvb-frontends/cxd2820r_c.c
drivers/media/dvb-frontends/cxd2820r_t.c
drivers/media/dvb-frontends/cxd2820r_t2.c

index 82b3d93718f8923adc428f6e953a4362f8658fc4..6095dbcf785091ddc8009134b04e905483e19ec1 100644 (file)
@@ -52,6 +52,12 @@ struct cxd2820r_config {
         */
        u8 ts_mode;
 
+       /* TS clock inverted.
+        * Default: 0
+        * Values: 0, 1
+        */
+       bool ts_clock_inv;
+
        /* IF AGC polarity.
         * Default: 0
         * Values: 0, 1
index 5c6ab4921bf11d2004ed77e9240b2452fbbb3974..0f4657e01cdeaa07d8f5b9b2c3e58b237e6058a1 100644 (file)
@@ -45,6 +45,7 @@ int cxd2820r_set_frontend_c(struct dvb_frontend *fe)
                { 0x1008b, 0x07, 0xff },
                { 0x1001f, priv->cfg.if_agc_polarity << 7, 0x80 },
                { 0x10070, priv->cfg.ts_mode, 0xff },
+               { 0x10071, !priv->cfg.ts_clock_inv << 4, 0x10 },
        };
 
        dev_dbg(&priv->i2c->dev, "%s: frequency=%d symbol_rate=%d\n", __func__,
index fa184ca2dd687de442b38db531ab108038b77b27..9b5a45b907bcfca70f8e31ace191be9447da865c 100644 (file)
@@ -46,6 +46,7 @@ int cxd2820r_set_frontend_t(struct dvb_frontend *fe)
                { 0x00088, 0x01, 0xff },
 
                { 0x00070, priv->cfg.ts_mode, 0xff },
+               { 0x00071, !priv->cfg.ts_clock_inv << 4, 0x10 },
                { 0x000cb, priv->cfg.if_agc_polarity << 6, 0x40 },
                { 0x000a5, 0x00, 0x01 },
                { 0x00082, 0x20, 0x60 },
index 2ba130e245b63d3f7b4fa5a33298129f0c654c49..9c0c4f42175c5d3f9289a81e0fdbc90fc3b169c1 100644 (file)
@@ -47,6 +47,7 @@ int cxd2820r_set_frontend_t2(struct dvb_frontend *fe)
                { 0x02083, 0x0a, 0xff },
                { 0x020cb, priv->cfg.if_agc_polarity << 6, 0x40 },
                { 0x02070, priv->cfg.ts_mode, 0xff },
+               { 0x02071, !priv->cfg.ts_clock_inv << 6, 0x40 },
                { 0x020b5, priv->cfg.spec_inv << 4, 0x10 },
                { 0x02567, 0x07, 0x0f },
                { 0x02569, 0x03, 0x03 },