Debugging an audio driver

The Audio DDK uses several constants to turn debugging messages on and off. The main one is ADO_DEBUG.

The standard Audio DDK makefiles define ADO_DEBUG if you've defined DEBUG in your environment. If you compile your driver with debugging options, ADO_DEBUG is defined as well to help you debug your logic.

If ADO_DEBUG is defined, several things happen:

If you've set ADO_DEBUG, you can also define the following macros to get specialized debug output:

If you define these macros, you'll see a message whenever a lock is changed. You'll probably need to define them only if you encounter a locking problem.

Note: If you've compiled your driver with ADO_DEBUG on, the driver won't run under the shipped io-audio, because the debugging code makes io-audio bigger, which can be a problem for embedded systems. If you want to run your driver in debug mode, use the io_audio_g that's shipped with the DDK.