[media] dvb: add support for Thomson DTT7520X
authorPatrice Chotard <patrice.chotard@sfr.fr>
Tue, 31 Jul 2012 18:31:20 +0000 (15:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Aug 2012 02:26:37 +0000 (23:26 -0300)
Add support for Thomson DTT7520X pll needed by
ngene card Terratec Cynergy 2400i DT

Signed-off-by: Patrice Chotard <patricechotard@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/dvb-pll.c
drivers/media/dvb/frontends/dvb-pll.h

index 1ab34838221c0b14d09bdfec5bb67bbce382bd1c..6d8fe884323714f89392ecf221e81f3c6b8b0214 100644 (file)
@@ -116,6 +116,31 @@ static struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
        },
 };
 
+static void thomson_dtt7520x_bw(struct dvb_frontend *fe, u8 *buf)
+{
+       u32 bw = fe->dtv_property_cache.bandwidth_hz;
+       if (bw == 8000000)
+               buf[3] ^= 0x10;
+}
+
+static struct dvb_pll_desc dvb_pll_thomson_dtt7520x = {
+       .name  = "Thomson dtt7520x",
+       .min   = 185000000,
+       .max   = 900000000,
+       .set   = thomson_dtt7520x_bw,
+       .iffreq = 36166667,
+       .count = 7,
+       .entries = {
+               {  305000000, 166667, 0xb4, 0x12 },
+               {  405000000, 166667, 0xbc, 0x12 },
+               {  445000000, 166667, 0xbc, 0x12 },
+               {  465000000, 166667, 0xf4, 0x18 },
+               {  735000000, 166667, 0xfc, 0x18 },
+               {  835000000, 166667, 0xbc, 0x18 },
+               {  999999999, 166667, 0xfc, 0x18 },
+       },
+};
+
 static struct dvb_pll_desc dvb_pll_lg_z201 = {
        .name  = "LG z201",
        .min   = 174000000,
@@ -513,6 +538,7 @@ static struct dvb_pll_desc *pll_list[] = {
        [DVB_PLL_UNDEFINED]              = NULL,
        [DVB_PLL_THOMSON_DTT7579]        = &dvb_pll_thomson_dtt7579,
        [DVB_PLL_THOMSON_DTT759X]        = &dvb_pll_thomson_dtt759x,
+       [DVB_PLL_THOMSON_DTT7520X]       = &dvb_pll_thomson_dtt7520x,
        [DVB_PLL_LG_Z201]                = &dvb_pll_lg_z201,
        [DVB_PLL_UNKNOWN_1]              = &dvb_pll_unknown_1,
        [DVB_PLL_TUA6010XS]              = &dvb_pll_tua6010xs,
index 086964344c38bd180d0fe6f798d918f48d7edada..4de754f76ce95d8b7183f76117579c7e0d128b54 100644 (file)
@@ -27,6 +27,7 @@
 #define DVB_PLL_SAMSUNG_TBDU18132      16
 #define DVB_PLL_SAMSUNG_TBMU24112      17
 #define DVB_PLL_TDEE4                 18
+#define DVB_PLL_THOMSON_DTT7520X       19
 
 /**
  * Attach a dvb-pll to the supplied frontend structure.