Linux has a very extensive tracing framework. And many subsystems use it to dump the debug message which can flood the console (or dmesg log) if used along with printks. I am working on an audio codec driver currently, and do not understand the DAPM at design level that much. So obviously it becomes difficult to understand the code. It it becomes even more difficult to debug that code. Fortuantely, DAPMs have tracing support and it can be activated using following commands.
# Create a debug dir if not present mkdir /debug # Mount the debugfs which contains a lot of tracers mount -t debugfs /dev/null /debug # Enable the DAPM related ASoC tracers echo 1 > /debug/tracing/events/asoc/snd_soc_dapm_connected/enable echo 1 > /debug/tracing/events/asoc/snd_soc_dapm_done/enable echo 1 > /debug/tracing/events/asoc/snd_soc_dapm_start/enable echo 1 > /debug/tracing/events/asoc/snd_soc_dapm_walk_done/enable echo 1 > /debug/tracing/events/asoc/snd_soc_dapm_widget_event_done/enable echo 1 > /debug/tracing/events/asoc/snd_soc_dapm_widget_event_start/enable echo 1 > /debug/tracing/events/asoc/snd_soc_dapm_widget_power/enable # Optionally, enable all ASoC tracers echo 1 > /debug/tracing/events/asoc/enable # Dump the tracer output cat /debug/tracing/trace
This helped a lot. Got this information from a link mentioned below: