[wdmaudiodev] Other strangeness in PortCls and AudioDG

  • From: Eugene Muzychenko <reg.wad@xxxxxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Sat, 28 Jul 2018 21:45:16 +0200

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:
http://www.wdmaudiodev.com/

Other related posts: