[wdmaudiodev] Re: Other strangeness in PortCls and AudioDG

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 30 Jul 2018 16:13:48 +0000

KSPROPERTY_RTAUDIO_BUFFER (without notification) requests are rounded up to the 
nearest multiple of lcm(PAGE_SIZE, WaveFormatEx.nBlockAlign).



________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Eugene Muzychenko <reg.wad@xxxxxxxxxxxxxx>
Sent: Saturday, July 28, 2018 12:45:16 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Other strangeness in PortCls and AudioDG

Processing KSPROPERTY_RTAUDIO_BUFFER/GET property request, PortCls
calls IMiniportWaveRTStream::AllocateAudioBuffer with
RequestedBufferSize significantly increased. For example, 1920 or 3840
are replaced with 4096.

Such behavior is observed since Win 7 up to Win 10.

In KSPROPERTY_RTAUDIO_BUFFER_WITH_NOTIFICATION processing, requested size is
not changed.

Is there any reason to alter requested buffer size specified by the
client?

Another strangeness found in AudioDG: if the driver returns actual
buffer size greater than requested in
KSPROPERTY_RTAUDIO_BUFFER_WITH_NOTIFICATION, AudioDG immediately
closes pin instance and returns "unspecified error" to its client.

Observed since Win 7 up to Win 10 too.

There is a little difference between Win 7 and Win 10: in further
requests, AudioDG in Win 10 passes the same requested buffer size
(usually 1920 for 48000/16 stereo streams), while AudioDG in Win 7 may
pass the value it previously receives in ActualBufferSize.

In MS docs, a driver is free to increase or even decrease requested
buffer size. Of course, frame alignment requirements are met. For
example, if AudioDG requests 1920 bytes for a 48000/16 stereo stream
but the driver returns 2048 or 4096, AudioDG fails.

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

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://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.wdmaudiodev.com%2F&amp;data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C70650be801434ffa5a8108d5f4c2bce9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636684039605579037&amp;sdata=rro%2B%2FRd8wQPuNZM88wsRSCNfC5zfmd3Bi4XHFWg9QSc%3D&amp;reserved=0

Other related posts: