[wdmaudiodev] Re: Disable wasapi loopback capture from WDM Audio Driver

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 17 Aug 2018 12:05:04 +0000

You should not offer a KSNODETYPE_AUDIO_LOOPBACK pin unless you are prepared to 
deliver functional audio loopback data.


  *   I don't want wasapi and any other api to capture system audio. As 
confidental data is being streamed

Do you mean DRM? I will assume yes. If the answer is no, please elaborate.

The usual solution is for the app who owns the “confidential data” to use the 
PlayReady APIs. This allows setting various policies about turning on HDCP and 
disabling loopback etc. There is a PlayReady sample app here:
https://code.msdn.microsoft.com/windowsapps/PlayReady-samples-for-124a3738

If you’re curious, under the covers PlayReady calls into the 
IMFOutputTrustAuthority APIs. There’s a sample of how to manipulate the 
PEACTION_PLAY policies like HDCP here:
https://blogs.msdn.microsoft.com/matthew_van_eerde/2009/11/10/how-to-turn-on-hdcp-or-scms-in-an-audio-playback-app/

To control loopback, the app would set PEACTION_EXTRACT policies instead. The 
sample does not show how to do this exactly, but it is similar.

So I think you should remove the KSNODETYPE_AUDIO_LOOPBACK pin and tell whoever 
the app is to use PlayReady.

If you have other reasons to provide hardware loopback (e.g., because you 
support offload), then in addition to the app using PlayReady, your driver 
needs to implement KSPROPERTY_AUDIOENGINE_LOOPBACK_PROTECTION as described here:
https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/ksproperty-audioengine-loopback-protection

There are tests in the HLK which will validate this.

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of eno rocky <binoddummy@xxxxxxxxx>
Sent: Thursday, August 16, 2018 9:51:37 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Disable wasapi loopback capture from WDM Audio Driver


Hi,

I am trying to create custom virtual audio driver from sysvad sample. In which 
I don't want wasapi and any other api to capture system audio. As confidental 
data is being streamed. Even though the loopback pin is disabled, wasapi is 
able to capture it as explained in 
https://docs.microsoft.com/en-us/windows/desktop/CoreAudio/loopback-recording<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fdesktop%2FCoreAudio%2Floopback-recording&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C0ebe03cd2555478eae2408d603fd2f87%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636700783383410900&sdata=z69VMUK7nA5AEqZMXRqddEws1X10sM5dN5z9TLANfHU%3D&reserved=0>
 .

I am able to give silent buffer with KSNODETYPE_AUDIO_LOOPBACK pin for win8.1 
and win10  but its not working for win7 and win8 cause 
KSNODETYPE_AUDIO_LOOPBACK pin  is not available for them ( as per i have 
understood).

Is there any way to prevent wasapi or any other capturer from capturing stream 
through driver itself?

Thank you,

Other related posts: