diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-01-20 13:18:35 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-01-21 06:12:51 -0500 |
commit | b91b8fa02482a5a18f598ee5d2cd42970051731b (patch) | |
tree | da542ee46f4cb76f9cec21a811a5afa69d68e91c /sound/soc/soc-dapm.c | |
parent | 6aceabb459c07a3fb4873c8306de8143c56241b2 (diff) |
ASoC: Remove console DAPM debug code
The same information is now visible via debugfs and with large modern
devices dumping everything to the console can be very resource
intensive, causing more harm than good.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 80 |
1 files changed, 3 insertions, 77 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index de22c2f1842e..d8e93749321e 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -44,13 +44,6 @@ | |||
44 | #include <sound/soc-dapm.h> | 44 | #include <sound/soc-dapm.h> |
45 | #include <sound/initval.h> | 45 | #include <sound/initval.h> |
46 | 46 | ||
47 | /* debug */ | ||
48 | #ifdef DEBUG | ||
49 | #define dump_dapm(codec, action) dbg_dump_dapm(codec, action) | ||
50 | #else | ||
51 | #define dump_dapm(codec, action) | ||
52 | #endif | ||
53 | |||
54 | /* dapm power sequences - make this per codec in the future */ | 47 | /* dapm power sequences - make this per codec in the future */ |
55 | static int dapm_up_seq[] = { | 48 | static int dapm_up_seq[] = { |
56 | [snd_soc_dapm_pre] = 0, | 49 | [snd_soc_dapm_pre] = 0, |
@@ -1063,66 +1056,6 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event) | |||
1063 | return 0; | 1056 | return 0; |
1064 | } | 1057 | } |
1065 | 1058 | ||
1066 | #ifdef DEBUG | ||
1067 | static void dbg_dump_dapm(struct snd_soc_codec* codec, const char *action) | ||
1068 | { | ||
1069 | struct snd_soc_dapm_widget *w; | ||
1070 | struct snd_soc_dapm_path *p = NULL; | ||
1071 | int in, out; | ||
1072 | |||
1073 | printk("DAPM %s %s\n", codec->name, action); | ||
1074 | |||
1075 | list_for_each_entry(w, &codec->dapm_widgets, list) { | ||
1076 | |||
1077 | /* only display widgets that effect routing */ | ||
1078 | switch (w->id) { | ||
1079 | case snd_soc_dapm_pre: | ||
1080 | case snd_soc_dapm_post: | ||
1081 | case snd_soc_dapm_vmid: | ||
1082 | continue; | ||
1083 | case snd_soc_dapm_mux: | ||
1084 | case snd_soc_dapm_value_mux: | ||
1085 | case snd_soc_dapm_output: | ||
1086 | case snd_soc_dapm_input: | ||
1087 | case snd_soc_dapm_switch: | ||
1088 | case snd_soc_dapm_hp: | ||
1089 | case snd_soc_dapm_mic: | ||
1090 | case snd_soc_dapm_spk: | ||
1091 | case snd_soc_dapm_line: | ||
1092 | case snd_soc_dapm_micbias: | ||
1093 | case snd_soc_dapm_dac: | ||
1094 | case snd_soc_dapm_adc: | ||
1095 | case snd_soc_dapm_pga: | ||
1096 | case snd_soc_dapm_mixer: | ||
1097 | case snd_soc_dapm_mixer_named_ctl: | ||
1098 | case snd_soc_dapm_supply: | ||
1099 | case snd_soc_dapm_aif_in: | ||
1100 | case snd_soc_dapm_aif_out: | ||
1101 | if (w->name) { | ||
1102 | in = is_connected_input_ep(w); | ||
1103 | dapm_clear_walk(w->codec); | ||
1104 | out = is_connected_output_ep(w); | ||
1105 | dapm_clear_walk(w->codec); | ||
1106 | printk("%s: %s in %d out %d\n", w->name, | ||
1107 | w->power ? "On":"Off",in, out); | ||
1108 | |||
1109 | list_for_each_entry(p, &w->sources, list_sink) { | ||
1110 | if (p->connect) | ||
1111 | printk(" in %s %s\n", p->name ? p->name : "static", | ||
1112 | p->source->name); | ||
1113 | } | ||
1114 | list_for_each_entry(p, &w->sinks, list_source) { | ||
1115 | if (p->connect) | ||
1116 | printk(" out %s %s\n", p->name ? p->name : "static", | ||
1117 | p->sink->name); | ||
1118 | } | ||
1119 | } | ||
1120 | break; | ||
1121 | } | ||
1122 | } | ||
1123 | } | ||
1124 | #endif | ||
1125 | |||
1126 | #ifdef CONFIG_DEBUG_FS | 1059 | #ifdef CONFIG_DEBUG_FS |
1127 | static int dapm_widget_power_open_file(struct inode *inode, struct file *file) | 1060 | static int dapm_widget_power_open_file(struct inode *inode, struct file *file) |
1128 | { | 1061 | { |
@@ -1254,10 +1187,8 @@ static int dapm_mux_update_power(struct snd_soc_dapm_widget *widget, | |||
1254 | path->connect = 0; /* old connection must be powered down */ | 1187 | path->connect = 0; /* old connection must be powered down */ |
1255 | } | 1188 | } |
1256 | 1189 | ||
1257 | if (found) { | 1190 | if (found) |
1258 | dapm_power_widgets(widget->codec, SND_SOC_DAPM_STREAM_NOP); | 1191 | dapm_power_widgets(widget->codec, SND_SOC_DAPM_STREAM_NOP); |
1259 | dump_dapm(widget->codec, "mux power update"); | ||
1260 | } | ||
1261 | 1192 | ||
1262 | return 0; | 1193 | return 0; |
1263 | } | 1194 | } |
@@ -1285,10 +1216,8 @@ static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget, | |||
1285 | break; | 1216 | break; |
1286 | } | 1217 | } |
1287 | 1218 | ||
1288 | if (found) { | 1219 | if (found) |
1289 | dapm_power_widgets(widget->codec, SND_SOC_DAPM_STREAM_NOP); | 1220 | dapm_power_widgets(widget->codec, SND_SOC_DAPM_STREAM_NOP); |
1290 | dump_dapm(widget->codec, "mixer power update"); | ||
1291 | } | ||
1292 | 1221 | ||
1293 | return 0; | 1222 | return 0; |
1294 | } | 1223 | } |
@@ -1404,9 +1333,7 @@ static int snd_soc_dapm_set_pin(struct snd_soc_codec *codec, | |||
1404 | */ | 1333 | */ |
1405 | int snd_soc_dapm_sync(struct snd_soc_codec *codec) | 1334 | int snd_soc_dapm_sync(struct snd_soc_codec *codec) |
1406 | { | 1335 | { |
1407 | int ret = dapm_power_widgets(codec, SND_SOC_DAPM_STREAM_NOP); | 1336 | return dapm_power_widgets(codec, SND_SOC_DAPM_STREAM_NOP); |
1408 | dump_dapm(codec, "sync"); | ||
1409 | return ret; | ||
1410 | } | 1337 | } |
1411 | EXPORT_SYMBOL_GPL(snd_soc_dapm_sync); | 1338 | EXPORT_SYMBOL_GPL(snd_soc_dapm_sync); |
1412 | 1339 | ||
@@ -2163,7 +2090,6 @@ int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, | |||
2163 | 2090 | ||
2164 | dapm_power_widgets(codec, event); | 2091 | dapm_power_widgets(codec, event); |
2165 | mutex_unlock(&codec->mutex); | 2092 | mutex_unlock(&codec->mutex); |
2166 | dump_dapm(codec, __func__); | ||
2167 | return 0; | 2093 | return 0; |
2168 | } | 2094 | } |
2169 | EXPORT_SYMBOL_GPL(snd_soc_dapm_stream_event); | 2095 | EXPORT_SYMBOL_GPL(snd_soc_dapm_stream_event); |