I am running Windows 10 Pro 64bit
On 20 May 2020, at 17:22, Matthew van Eerde (Redacted sender
"Matthew.van.Eerde" for DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:
What version of Windows are you running in your VM?
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on
behalf of Joey Lag <itsjoeylag@xxxxxxxxx>
Sent: Wednesday, May 20, 2020 9:15:02 AM
To: wdmaudiodev@xxxxxxxxxxxxx <wdmaudiodev@xxxxxxxxxxxxx>
Subject: [EXTERNAL] [wdmaudiodev] APO with OutputDebugString
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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Fkernel%2Fintroduction-to-wdm&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C5364da9202a24215042808d7fcd90c97%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637255881501203911&sdata=vYXt6lyFpY3zETKvDl2m%2BQgXBSH1nMhtwTfeP1QdGtI%3D&reserved=0>
https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/wdm-audio-architecture--basic-concepts
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Faudio%2Fwdm-audio-architecture--basic-concepts&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C5364da9202a24215042808d7fcd90c97%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637255881501213907&sdata=ghJyvDNYwYFQv80sq5aG1t6y8Uo53QczsKlDBSVoVDY%3D&reserved=0>
https://docs.microsoft.com/en-gb/windows/win32/learnwin32/module-2--using-com-in-your-windows-program
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-gb%2Fwindows%2Fwin32%2Flearnwin32%2Fmodule-2--using-com-in-your-windows-program&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C5364da9202a24215042808d7fcd90c97%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637255881501223905&sdata=uKiY1cTV4QwY%2FBWIb3XCT9syFrw9aZwr5khDwCxjR%2Fs%3D&reserved=0>
https://docs.microsoft.com/en-us/cpp/atl/active-template-library-atl-concepts?view=vs-2019
<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcpp%2Fatl%2Factive-template-library-atl-concepts%3Fview%3Dvs-2019&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C5364da9202a24215042808d7fcd90c97%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637255881501223905&sdata=Ds5D%2BdCcp414Y%2FpNG6VZgK1eZ5YqPQ9mpVIXOLbxe50%3D&reserved=0>
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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DXUlbYRFFYf0%26list%3DPLZ4EgN7ZCzJx2DRXTRUXRrB2njWnx1kA2&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C5364da9202a24215042808d7fcd90c97%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637255881501233900&sdata=VsTVwXekOu7kmFSsSzi1lQJbwxROQ9jFfD1o8wGT3GU%3D&reserved=0>).
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