[wdmaudiodev] APO with OutputDebugString

  • From: Joey Lag <itsjoeylag@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 20 May 2020 17:15:02 +0100

Greetings audio gurus!

I am reaching out to you as I am looking to incorporate a proprietary DSP 
algorithm within a windows driver. This is my first experience with windows 
driver development, and I have been doing some reading, in particular:
https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/introduction-to-wdm
 
<https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/introduction-to-wdm>
https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/wdm-audio-architecture--basic-concepts
 
<https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/wdm-audio-architecture--basic-concepts>
https://docs.microsoft.com/en-gb/windows/win32/learnwin32/module-2--using-com-in-your-windows-program
 
<https://docs.microsoft.com/en-gb/windows/win32/learnwin32/module-2--using-com-in-your-windows-program>
https://docs.microsoft.com/en-us/cpp/atl/active-template-library-atl-concepts?view=vs-2019
 
<https://docs.microsoft.com/en-us/cpp/atl/active-template-library-atl-concepts?view=vs-2019>

From my reading, I have understood that software DSP is handled in ATL 
COM-based objects known as audio processing objects which exist in the 
user-mode Audio Engine which communicates with the drivers on the kernel-side. 
As a result I have begun editing the SYSVAD example project, in particular the 
Swap APO. The DSP algorithm runs on a proprietary software framework, and to 
test whether everything works correctly I have created an identical channel 
swap example with it and incorporated it within the MFX swap apo example. My 
testing setup uses a virtual box VM as the target, through which I use vmmon 
with windbg for debugging (Setup based on the steps at 
https://www.youtube.com/watch?v=XUlbYRFFYf0&list=PLZ4EgN7ZCzJx2DRXTRUXRrB2njWnx1kA2
 
<https://www.youtube.com/watch?v=XUlbYRFFYf0&list=PLZ4EgN7ZCzJx2DRXTRUXRrB2njWnx1kA2>).
 Both host and target computers are 64-bit windows 10. 

I seem to be running into issues with this simple example - whenever I switch 
on the audio enhancements for the sysvad driver (which should apply the channel 
swap using our internal framework) a window pops up saying that “Windows has 
detected that audio enhancements for the following device are causing problems: 
[sysvad device name]. Audio enhancements for this device have been disabled. 
Would you like to reenable?”. As an initial step, I have included several 
“OutputDebugString” string calls to print some output to the debugger but this 
doesn’t seem to show through dbgview (run on target machine with administrator 
permissions with all capture types selected under capture menu). Any 
suggestions on what I have to do to see this output? I have also put in several 
OutputDebugString calls within the unaltered sysvad example and similarly I 
cannot obtain any debugging output. Also, I have added 
“DisableProtectedAudioDG” as a DWORD and set it to 1 in 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Audio but this has 
not helped.

Many thanks guys. I understand that you’re all volunteering to help on this 
mailing list, so any clarifications are much appreciated!

- Joey

Other related posts:

  • » [wdmaudiodev] APO with OutputDebugString - Joey Lag