]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (7481): tda18271: fix standard map debug
authorMichael Krufky <mkrufky@linuxtv.org>
Sun, 30 Mar 2008 22:40:20 +0000 (19:40 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:07:57 +0000 (14:07 -0300)
Show IF level and rf agc top settings in standard map dumps.

Dump standard map during attach if DBG_MAP or DBG_ADV is set.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/frontends/tda18271-fe.c

index 48ec5f08c3c90515a2ca9ca6360813732cc3e5a7..b262100ae897db7b8806f89658c2bf9cad658e45 100644 (file)
@@ -951,16 +951,19 @@ static int tda18271_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
 
 #define tda18271_update_std(std_cfg, name) do {                                \
        if (map->std_cfg.if_freq +                                      \
-               map->std_cfg.agc_mode + map->std_cfg.std > 0) {         \
+               map->std_cfg.agc_mode + map->std_cfg.std +              \
+               map->std_cfg.if_lvl + map->std_cfg.rfagc_top > 0) {     \
                tda_dbg("Using custom std config for %s\n", name);      \
                memcpy(&std->std_cfg, &map->std_cfg,                    \
                        sizeof(struct tda18271_std_map_item));          \
        } } while (0)
 
 #define tda18271_dump_std_item(std_cfg, name) do {                     \
-       tda_dbg("(%s) if freq = %d, agc_mode = %d, std = %d\n",         \
+       tda_dbg("(%s) if_freq = %d, agc_mode = %d, std = %d, "          \
+               "if_lvl = %d, rfagc_top = 0x%02x\n",                    \
                name, std->std_cfg.if_freq,                             \
-               std->std_cfg.agc_mode, std->std_cfg.std);               \
+               std->std_cfg.agc_mode, std->std_cfg.std,                \
+               std->std_cfg.if_lvl, std->std_cfg.rfagc_top);           \
        } while (0)
 
 static int tda18271_dump_std_map(struct dvb_frontend *fe)
@@ -969,20 +972,20 @@ static int tda18271_dump_std_map(struct dvb_frontend *fe)
        struct tda18271_std_map *std = &priv->std;
 
        tda_dbg("========== STANDARD MAP SETTINGS ==========\n");
-       tda18271_dump_std_item(fm_radio, "fm");
-       tda18271_dump_std_item(atv_b,  "pal b");
-       tda18271_dump_std_item(atv_dk, "pal dk");
-       tda18271_dump_std_item(atv_gh, "pal gh");
-       tda18271_dump_std_item(atv_i,  "pal i");
-       tda18271_dump_std_item(atv_l,  "pal l");
-       tda18271_dump_std_item(atv_lc, "pal l'");
+       tda18271_dump_std_item(fm_radio, "  fm  ");
+       tda18271_dump_std_item(atv_b,  "atv b ");
+       tda18271_dump_std_item(atv_dk, "atv dk");
+       tda18271_dump_std_item(atv_gh, "atv gh");
+       tda18271_dump_std_item(atv_i,  "atv i ");
+       tda18271_dump_std_item(atv_l,  "atv l ");
+       tda18271_dump_std_item(atv_lc, "atv l'");
        tda18271_dump_std_item(atv_mn, "atv mn");
        tda18271_dump_std_item(atsc_6, "atsc 6");
        tda18271_dump_std_item(dvbt_6, "dvbt 6");
        tda18271_dump_std_item(dvbt_7, "dvbt 7");
        tda18271_dump_std_item(dvbt_8, "dvbt 8");
-       tda18271_dump_std_item(qam_6,  "qam 6");
-       tda18271_dump_std_item(qam_8,  "qam 8");
+       tda18271_dump_std_item(qam_6,  "qam 6 ");
+       tda18271_dump_std_item(qam_8,  "qam 8 ");
 
        return 0;
 }
@@ -1125,7 +1128,7 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
        memcpy(&fe->ops.tuner_ops, &tda18271_tuner_ops,
               sizeof(struct dvb_tuner_ops));
 
-       if (tda18271_debug & DBG_MAP)
+       if (tda18271_debug & (DBG_MAP | DBG_ADV))
                tda18271_dump_std_map(fe);
 
        return fe;