]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/frontends/dvb-pll.c
Merge by hand (conflicts in sr.c)
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / frontends / dvb-pll.c
index f73b5f48e23591b83aa39102040d52c48325c4f9..536c35d969b7dca1c19a2d1bc3052f1cf8c241d4 100644 (file)
@@ -55,7 +55,7 @@ struct dvb_pll_desc dvb_pll_thomson_dtt7610 = {
 };
 EXPORT_SYMBOL(dvb_pll_thomson_dtt7610);
 
-static void thomson_dtt759x_bw(u8 *buf, int bandwidth)
+static void thomson_dtt759x_bw(u8 *buf, u32 freq, int bandwidth)
 {
        if (BANDWIDTH_7_MHZ == bandwidth)
                buf[3] |= 0x10;
@@ -82,17 +82,44 @@ struct dvb_pll_desc dvb_pll_lg_z201 = {
        .name  = "LG z201",
        .min   = 174000000,
        .max   = 862000000,
-       .count = 5,
+       .count = 6,
        .entries = {
                {          0, 36166667, 166666, 0xbc, 0x03 },
-               {  443250000, 36166667, 166666, 0xbc, 0x01 },
-               {  542000000, 36166667, 166666, 0xbc, 0x02 },
-               {  830000000, 36166667, 166666, 0xf4, 0x02 },
-               {  999999999, 36166667, 166666, 0xfc, 0x02 },
+               {  157500000, 36166667, 166666, 0xbc, 0x01 },
+               {  443250000, 36166667, 166666, 0xbc, 0x02 },
+               {  542000000, 36166667, 166666, 0xbc, 0x04 },
+               {  830000000, 36166667, 166666, 0xf4, 0x04 },
+               {  999999999, 36166667, 166666, 0xfc, 0x04 },
        },
 };
 EXPORT_SYMBOL(dvb_pll_lg_z201);
 
+struct dvb_pll_desc dvb_pll_microtune_4042 = {
+       .name  = "Microtune 4042 FI5",
+       .min   =  57000000,
+       .max   = 858000000,
+       .count = 3,
+       .entries = {
+               { 162000000, 44000000, 62500, 0x8e, 0xa1 },
+               { 457000000, 44000000, 62500, 0x8e, 0x91 },
+               { 999999999, 44000000, 62500, 0x8e, 0x31 },
+       },
+};
+EXPORT_SYMBOL(dvb_pll_microtune_4042);
+
+struct dvb_pll_desc dvb_pll_thomson_dtt7611 = {
+       .name  = "Thomson dtt7611",
+       .min   =  44000000,
+       .max   = 958000000,
+       .count = 3,
+       .entries = {
+               { 157250000, 44000000, 62500, 0x8e, 0x39 },
+               { 454000000, 44000000, 62500, 0x8e, 0x3a },
+               { 999999999, 44000000, 62500, 0x8e, 0x3c },
+       },
+};
+EXPORT_SYMBOL(dvb_pll_thomson_dtt7611);
+
 struct dvb_pll_desc dvb_pll_unknown_1 = {
        .name  = "unknown 1", /* used by dntv live dvb-t */
        .min   = 174000000,
@@ -146,7 +173,7 @@ EXPORT_SYMBOL(dvb_pll_env57h1xd5);
 /* Philips TDA6650/TDA6651
  * used in Panasonic ENV77H11D5
  */
-static void tda665x_bw(u8 *buf, int bandwidth)
+static void tda665x_bw(u8 *buf, u32 freq, int bandwidth)
 {
        if (bandwidth == BANDWIDTH_8_MHZ)
                buf[3] |= 0x08;
@@ -178,7 +205,7 @@ EXPORT_SYMBOL(dvb_pll_tda665x);
 /* Infineon TUA6034
  * used in LG TDTP E102P
  */
-static void tua6034_bw(u8 *buf, int bandwidth)
+static void tua6034_bw(u8 *buf, u32 freq, int bandwidth)
 {
        if (BANDWIDTH_7_MHZ != bandwidth)
                buf[3] |= 0x08;
@@ -198,6 +225,73 @@ struct dvb_pll_desc dvb_pll_tua6034 = {
 };
 EXPORT_SYMBOL(dvb_pll_tua6034);
 
+/* Infineon TUA6034
+ * used in LG Innotek TDVS-H062F
+ */
+struct dvb_pll_desc dvb_pll_tdvs_tua6034 = {
+       .name  = "LG/Infineon TUA6034",
+       .min   =  54000000,
+       .max   = 863000000,
+       .count = 3,
+       .entries = {
+               {  160000000, 44000000, 62500, 0xce, 0x01 },
+               {  455000000, 44000000, 62500, 0xce, 0x02 },
+               {  999999999, 44000000, 62500, 0xce, 0x04 },
+       },
+};
+EXPORT_SYMBOL(dvb_pll_tdvs_tua6034);
+
+/* Philips FMD1216ME
+ * used in Medion Hybrid PCMCIA card and USB Box
+ */
+static void fmd1216me_bw(u8 *buf, u32 freq, int bandwidth)
+{
+       if (bandwidth == BANDWIDTH_8_MHZ && freq >= 158870000)
+               buf[3] |= 0x08;
+}
+
+struct dvb_pll_desc dvb_pll_fmd1216me = {
+       .name = "Philips FMD1216ME",
+       .min = 50870000,
+       .max = 858000000,
+       .setbw = fmd1216me_bw,
+       .count = 7,
+       .entries = {
+               { 143870000, 36213333, 166667, 0xbc, 0x41 },
+               { 158870000, 36213333, 166667, 0xf4, 0x41 },
+               { 329870000, 36213333, 166667, 0xbc, 0x42 },
+               { 441870000, 36213333, 166667, 0xf4, 0x42 },
+               { 625870000, 36213333, 166667, 0xbc, 0x44 },
+               { 803870000, 36213333, 166667, 0xf4, 0x44 },
+               { 999999999, 36213333, 166667, 0xfc, 0x44 },
+       }
+};
+EXPORT_SYMBOL(dvb_pll_fmd1216me);
+
+/* ALPS TDED4
+ * used in Nebula-Cards and USB boxes
+ */
+static void tded4_bw(u8 *buf, u32 freq, int bandwidth)
+{
+       if (bandwidth == BANDWIDTH_8_MHZ)
+               buf[3] |= 0x04;
+}
+
+struct dvb_pll_desc dvb_pll_tded4 = {
+       .name = "ALPS TDED4",
+       .min = 47000000,
+       .max = 863000000,
+       .setbw = tded4_bw,
+       .count = 4,
+       .entries = {
+               { 153000000, 36166667, 166667, 0x85, 0x01 },
+               { 470000000, 36166667, 166667, 0x85, 0x02 },
+               { 823000000, 36166667, 166667, 0x85, 0x08 },
+               { 999999999, 36166667, 166667, 0x85, 0x88 },
+       }
+};
+EXPORT_SYMBOL(dvb_pll_tded4);
+
 /* ----------------------------------------------------------- */
 /* code                                                        */
 
@@ -231,7 +325,7 @@ int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf,
        buf[3] = desc->entries[i].cb2;
 
        if (desc->setbw)
-               desc->setbw(buf, bandwidth);
+               desc->setbw(buf, freq, bandwidth);
 
        if (debug)
                printk("pll: %s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n",