[wdmaudiodev] How to handle invalid MMDevApi requests?

  • From: Eugene Muzychenko <reg.wad@xxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Fri, 6 Sep 2019 23:19:36 +0200

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.

I already have reported these issues in June:

https://aka.ms/AA5bt9o - KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
specified, but FormatSize field contains 0x40 instead of at least 0x52.

https://aka.ms/AA5cp01 - The Flags, SampleSize and Reserved fields
contain invalid values (0x30002e, 0x610043, 0x740070, 0x720075 etc.),
KSDATAFORMAT_ATTRIBUTES is set in the Flags, but no valid attribute
list is present.

How to handle such invalid requests? They are issued dozens of times
for each endpoint. Failing them all, I see that my driver endpoints
often became inaccessible, or channel configuration list is empty, or
something else.

Attachment: MMDevApi_proposeformat_set_invalid_attr.png
Description: PNG image

Attachment: MMDevApi_proposeformat_set_invalid_size.png
Description: PNG image

Other related posts: