[wdmaudiodev] Re: How to handle invalid MMDevApi requests?

  • From: "Gary Daniels" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Gary.Daniels" for DMARC)
  • To: Eugene Muzychenko <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 10 Sep 2019 20:25:44 +0000

The size of 0x40 is because the code is looking for an IAudioInputSelector and 
the searching algorithm is filtering components based on the major format and 
subformat. Based on comments in the code it is intentional that it is searching 
with just the KSDATAFORMAT. It is safe for you to fail these requests where the 
size is too small. I looked through the sample drivers and all of the current 
sample drivers also fail these requests. This is simply a case of some very old 
legacy code looking for something that, for the most part, doesn't exist 
anymore.

We are investigating the other issue with the valid size, but invalid flags, 
sample size, reserved, and alignment values.

Thanks,
Gary Daniels


Sent from Outlook<http://aka.ms/weboutlook>

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Eugene Muzychenko <reg.wad@xxxxxxxxxxxxxx>
Sent: Tuesday, September 10, 2019 5:33 AM
To: Eugene Muzychenko <wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: How to handle invalid MMDevApi requests?

In 1903 with today's updates (10.0.18362.295), MMDevApi continues to
call KS drivers with KSPROPSETID_Pin/KSPROPERTY_PIN_PROPOSEDATAFORMAT
and invalid KSDATAFORMAT size and flags from 
CAudioFormatSupport::SetProposedFormat.

BTW, it is observed in every Windows version above Vista that I have
(7 SP1, 8, 8.1, 10/1803, 10/1809, 10/1903). Most probably, it is true
for Vista too, but I don't have it.

Regards,
Eugene

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.wdmaudiodev.com%2F&amp;data=02%7C01%7CGary.Daniels%40microsoft.com%7Cabc8b35fa1ea45cc58af08d735eb24e6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637037156363758683&amp;sdata=UugRy6SwJXQKRIK7Qnau93j7pLRtAA3Lf6tv8WHS2TE%3D&amp;reserved=0

Other related posts: