Disclaimer: This post refers to the Qualcomm Snapdragon 8xx chipsets but likely applies to other vendors as well.

Summary: adb shell cat /sys/kernel/debug/adsprpc/<your process name>

Why?

On today’s mobile SoCs you typically see several flavours of DSPs including mDSP (modem), sDSP (sensor), cDSP (compute). The latter is increasingly used to accelerate user-space applications. Offloading to a DSP starts by calling the adsprpc driver. I was interested to see the offload in action and confirm which DSP I’m running on.

And debugfs Saves the Day Again

If you have debugfs(8) enabled (this is set in your kernels defconfig) you will have access to the /sys/kernel/debug/ directory on your device. Recent versions of the adsprpc driver conveniently register two debugfs operations (read and open). The read operation will print statistics on all open DSP connections. Once your application opens /dev/adsprpc-smd you will see an entry in the /sys/kernel/debug/adsprpc directory. Enjoy.

Tip: run watch adb shell cat /sys/kernel/debug/adsprpc/<your process name> for a real-time view of your DSP in action

Tip: adb shell cat /sys/kernel/debug/adsprpc/global will show you how many processes reference which DSP