]> err.no Git - linux-2.6/blobdiff - drivers/media/dvb/frontends/dvb-pll.c
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[linux-2.6] / drivers / media / dvb / frontends / dvb-pll.c
index 288ecb29425e598dbc83ba66963c518cb8d0e77e..ea058153ebfa3dfd8e88660662fd7e4fa3f9ee50 100644 (file)
@@ -48,10 +48,6 @@ static int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "enable verbose debug messages");
 
-static unsigned int input[DVB_PLL_MAX] = { [ 0 ... (DVB_PLL_MAX-1) ] = 0 };
-module_param_array(input, int, NULL, 0644);
-MODULE_PARM_DESC(input,"specify rf input choice, 0 for autoselect (default)");
-
 static unsigned int id[DVB_PLL_MAX] =
        { [ 0 ... (DVB_PLL_MAX-1) ] = DVB_PLL_UNDEFINED };
 module_param_array(id, int, NULL, 0644);
@@ -80,7 +76,6 @@ struct dvb_pll_desc {
 /* ----------------------------------------------------------- */
 /* descriptions                                                */
 
-
 static struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
        .name  = "Thomson dtt7579",
        .min   = 177000000,
@@ -96,7 +91,6 @@ static struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
        },
 };
 
-
 static void thomson_dtt759x_bw(struct dvb_frontend *fe, u8 *buf,
                               const struct dvb_frontend_parameters *params)
 {
@@ -137,7 +131,6 @@ static struct dvb_pll_desc dvb_pll_lg_z201 = {
        },
 };
 
-
 static struct dvb_pll_desc dvb_pll_unknown_1 = {
        .name  = "unknown 1", /* used by dntv live dvb-t */
        .min   = 174000000,
@@ -246,7 +239,6 @@ static struct dvb_pll_desc dvb_pll_tua6034 = {
        },
 };
 
-
 /* ALPS TDED4
  * used in Nebula-Cards and USB boxes
  */
@@ -289,7 +281,6 @@ static struct dvb_pll_desc dvb_pll_tdhu2 = {
        }
 };
 
-
 /* Samsung TBMV30111IN / TBMV30712IN1
  * used in Air2PC ATSC - 2nd generation (nxt2002)
  */
@@ -326,8 +317,6 @@ static struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {
        },
 };
 
-
-
 static void opera1_bw(struct dvb_frontend *fe, u8 *buf,
                      const struct dvb_frontend_parameters *params)
 {
@@ -354,6 +343,51 @@ static struct dvb_pll_desc dvb_pll_opera1 = {
        }
 };
 
+static void samsung_dtos403ih102a_set(struct dvb_frontend *fe, u8 *buf,
+                      const struct dvb_frontend_parameters *params)
+{
+       struct dvb_pll_priv *priv = fe->tuner_priv;
+       struct i2c_msg msg = {
+               .addr = priv->pll_i2c_address,
+               .flags = 0,
+               .buf = buf,
+               .len = 4
+       };
+       int result;
+
+       if (fe->ops.i2c_gate_ctrl)
+               fe->ops.i2c_gate_ctrl(fe, 1);
+
+       result = i2c_transfer(priv->i2c, &msg, 1);
+       if (result != 1)
+               printk(KERN_ERR "%s: i2c_transfer failed:%d",
+                       __func__, result);
+
+       buf[2] = 0x9e;
+       buf[3] = 0x90;
+
+       return;
+}
+
+/* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */
+static struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {
+       .name   = "Samsung DTOS403IH102A",
+       .min    =  44250000,
+       .max    = 858000000,
+       .iffreq =  36125000,
+       .count  = 8,
+       .set    = samsung_dtos403ih102a_set,
+       .entries = {
+               { 135000000, 62500, 0xbe, 0x01 },
+               { 177000000, 62500, 0xf6, 0x01 },
+               { 370000000, 62500, 0xbe, 0x02 },
+               { 450000000, 62500, 0xf6, 0x02 },
+               { 466000000, 62500, 0xfe, 0x02 },
+               { 538000000, 62500, 0xbe, 0x08 },
+               { 826000000, 62500, 0xf6, 0x08 },
+               { 999999999, 62500, 0xfe, 0x08 },
+       }
+};
 
 /* ----------------------------------------------------------- */
 
@@ -372,6 +406,7 @@ static struct dvb_pll_desc *pll_list[] = {
        [DVB_PLL_SAMSUNG_TBMV]           = &dvb_pll_samsung_tbmv,
        [DVB_PLL_PHILIPS_SD1878_TDA8261] = &dvb_pll_philips_sd1878_tda8261,
        [DVB_PLL_OPERA1]                 = &dvb_pll_opera1,
+       [DVB_PLL_SAMSUNG_DTOS403IH102A]  = &dvb_pll_samsung_dtos403ih102a,
 };
 
 /* ----------------------------------------------------------- */
@@ -617,20 +652,6 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
                       id[priv->nr] == pll_desc_id ?
                                "insmod option" : "autodetected");
        }
-       if ((debug) || (input[priv->nr] > 0)) {
-               printk("dvb-pll[%d]", priv->nr);
-               if (i2c != NULL)
-                       printk(" %d-%04x", i2c_adapter_id(i2c), pll_addr);
-               printk(": tuner rf input will be ");
-               switch (input[priv->nr]) {
-               case 0:
-                       printk("autoselected\n");
-                       break;
-               default:
-                       printk("set to input %d (insmod option)\n",
-                              input[priv->nr]);
-               }
-       }
 
        return fe;
 }