aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-03-30 18:40:20 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:57 -0400
commitc735372f5df2dc7b67080881bdc613d199173abf (patch)
treeecf2f3c0343acfe33a40b805b14a5366ff65c2f5 /drivers/media/dvb
parent762250f884cb927c7f1da4e24052ec43e000d53f (diff)
V4L/DVB (7481): tda18271: fix standard map debug
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>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/frontends/tda18271-fe.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/media/dvb/frontends/tda18271-fe.c b/drivers/media/dvb/frontends/tda18271-fe.c
index 48ec5f08c3c9..b262100ae897 100644
--- a/drivers/media/dvb/frontends/tda18271-fe.c
+++ b/drivers/media/dvb/frontends/tda18271-fe.c
@@ -951,16 +951,19 @@ static int tda18271_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
951 951
952#define tda18271_update_std(std_cfg, name) do { \ 952#define tda18271_update_std(std_cfg, name) do { \
953 if (map->std_cfg.if_freq + \ 953 if (map->std_cfg.if_freq + \
954 map->std_cfg.agc_mode + map->std_cfg.std > 0) { \ 954 map->std_cfg.agc_mode + map->std_cfg.std + \
955 map->std_cfg.if_lvl + map->std_cfg.rfagc_top > 0) { \
955 tda_dbg("Using custom std config for %s\n", name); \ 956 tda_dbg("Using custom std config for %s\n", name); \
956 memcpy(&std->std_cfg, &map->std_cfg, \ 957 memcpy(&std->std_cfg, &map->std_cfg, \
957 sizeof(struct tda18271_std_map_item)); \ 958 sizeof(struct tda18271_std_map_item)); \
958 } } while (0) 959 } } while (0)
959 960
960#define tda18271_dump_std_item(std_cfg, name) do { \ 961#define tda18271_dump_std_item(std_cfg, name) do { \
961 tda_dbg("(%s) if freq = %d, agc_mode = %d, std = %d\n", \ 962 tda_dbg("(%s) if_freq = %d, agc_mode = %d, std = %d, " \
963 "if_lvl = %d, rfagc_top = 0x%02x\n", \
962 name, std->std_cfg.if_freq, \ 964 name, std->std_cfg.if_freq, \
963 std->std_cfg.agc_mode, std->std_cfg.std); \ 965 std->std_cfg.agc_mode, std->std_cfg.std, \
966 std->std_cfg.if_lvl, std->std_cfg.rfagc_top); \
964 } while (0) 967 } while (0)
965 968
966static int tda18271_dump_std_map(struct dvb_frontend *fe) 969static int tda18271_dump_std_map(struct dvb_frontend *fe)
@@ -969,20 +972,20 @@ static int tda18271_dump_std_map(struct dvb_frontend *fe)
969 struct tda18271_std_map *std = &priv->std; 972 struct tda18271_std_map *std = &priv->std;
970 973
971 tda_dbg("========== STANDARD MAP SETTINGS ==========\n"); 974 tda_dbg("========== STANDARD MAP SETTINGS ==========\n");
972 tda18271_dump_std_item(fm_radio, "fm"); 975 tda18271_dump_std_item(fm_radio, " fm ");
973 tda18271_dump_std_item(atv_b, "pal b"); 976 tda18271_dump_std_item(atv_b, "atv b ");
974 tda18271_dump_std_item(atv_dk, "pal dk"); 977 tda18271_dump_std_item(atv_dk, "atv dk");
975 tda18271_dump_std_item(atv_gh, "pal gh"); 978 tda18271_dump_std_item(atv_gh, "atv gh");
976 tda18271_dump_std_item(atv_i, "pal i"); 979 tda18271_dump_std_item(atv_i, "atv i ");
977 tda18271_dump_std_item(atv_l, "pal l"); 980 tda18271_dump_std_item(atv_l, "atv l ");
978 tda18271_dump_std_item(atv_lc, "pal l'"); 981 tda18271_dump_std_item(atv_lc, "atv l'");
979 tda18271_dump_std_item(atv_mn, "atv mn"); 982 tda18271_dump_std_item(atv_mn, "atv mn");
980 tda18271_dump_std_item(atsc_6, "atsc 6"); 983 tda18271_dump_std_item(atsc_6, "atsc 6");
981 tda18271_dump_std_item(dvbt_6, "dvbt 6"); 984 tda18271_dump_std_item(dvbt_6, "dvbt 6");
982 tda18271_dump_std_item(dvbt_7, "dvbt 7"); 985 tda18271_dump_std_item(dvbt_7, "dvbt 7");
983 tda18271_dump_std_item(dvbt_8, "dvbt 8"); 986 tda18271_dump_std_item(dvbt_8, "dvbt 8");
984 tda18271_dump_std_item(qam_6, "qam 6"); 987 tda18271_dump_std_item(qam_6, "qam 6 ");
985 tda18271_dump_std_item(qam_8, "qam 8"); 988 tda18271_dump_std_item(qam_8, "qam 8 ");
986 989
987 return 0; 990 return 0;
988} 991}
@@ -1125,7 +1128,7 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
1125 memcpy(&fe->ops.tuner_ops, &tda18271_tuner_ops, 1128 memcpy(&fe->ops.tuner_ops, &tda18271_tuner_ops,
1126 sizeof(struct dvb_tuner_ops)); 1129 sizeof(struct dvb_tuner_ops));
1127 1130
1128 if (tda18271_debug & DBG_MAP) 1131 if (tda18271_debug & (DBG_MAP | DBG_ADV))
1129 tda18271_dump_std_map(fe); 1132 tda18271_dump_std_map(fe);
1130 1133
1131 return fe; 1134 return fe;