[wdmaudiodev] Re: Windows 7 (only) WASAPI Exclusive Issue/Bug

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 31 Oct 2017 18:33:08 +0000

For issues on versions of Windows prior to Windows 10, please contact Microsoft 
Support directly. I can’t help you with those.

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of HpW-Works Support <support@xxxxxxxxxxxxx>
Sent: Tuesday, October 31, 2017 11:26:03 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Windows 7 (only) WASAPI Exclusive Issue/Bug


Hi Matthew

Hopefully may you file this to the DEV team otherwise a long run to get this 
fixed O;)

Best Regards
Hp. Widmer

HpW-Works Support

Mailto:support@xxxxxxxxxxxxx
Website:http://www.hpw-works.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.hpw-works.com&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C55b7f0dd6f5e4373720f08d5208ce177%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636450711829921455&sdata=HwFffWEO5T12OsNXVDJKYG4ETyJuDjYuzPSr0RnBGBU%3D&reserved=0>

Am 31. Oktober 2017 15:47:21 schrieb "Matthew van Eerde" 
<dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC):
This certainly sounds like a Windows bug to me, particularly in the WOW64 
emulation layer (probably ksthunk.sys)

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Support HpW-Works.com <support@xxxxxxxxxxxxx>
Sent: Tuesday, October 31, 2017 2:45:19 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Windows 7 (only) WASAPI Exclusive Issue/Bug

I investigated some more on that matter 😃

Summary:


  1.  Simple a bug using WASAPI Exclusive using a x86 app as Play-Exclusive

Result on Initialize: 0x8007007a and devices is also not initializaed to deal 
with Buffer dance 😃

  2.  Using amd64 Play-Exclusive does as a successful Buffer dance on all 
devices!


Some logs about:

x86:

x86>play-exclusive.exe --device "Speakers (RME Babyface)" --file 4khz.wav
Opening .wav file "4khz.wav"...
The default period for this device is 30000 hundred-nanoseconds, or 132 frames.
We ended up with a period of 29932 hns or 132 frames.
Successfully played all 44100 frames.

x86>play-exclusive.exe --device "Speakers (Lynx L22)" --file 4khz.wav
Opening .wav file "4khz.wav"...
The default period for this device is 30000 hundred-nanoseconds, or 132 frames.
IAudioClient::Initialize failed: hr = 0x8007007a
Thread returned failing HRESULT 0x8007007a

x86>play-exclusive.exe --device "Realtek Digital Output (Realtek High 
Definition Audio)" --file 4khz.wav
Opening .wav file "4khz.wav"...
The default period for this device is 30000 hundred-nanoseconds, or 132 frames.
IAudioClient::Initialize failed: hr = 0x8007007a
Thread returned failing HRESULT 0x8007007a

x86>play-exclusive.exe --device "SE790C-8 (NVIDIA High Definition Audio)" 
--file 4khz_48khz.wav
Opening .wav file "4khz_48khz.wav"...
Wave format in file is smaller than a WAVEFORMATEX; will zero-pad the last 2 
bytes.
The default period for this device is 30000 hundred-nanoseconds, or 144 frames.
IAudioClient::Initialize failed: hr = 0x8007007a
Thread returned failing HRESULT 0x8007007a


amd64:

amd64>play-exclusive.exe --device "Speakers (Lynx L22)" --file 4khz.wav
Opening .wav file "4khz.wav"...
The default period for this device is 30000 hundred-nanoseconds, or 132 frames.
Buffer size not aligned - doing the alignment dance.
Trying again with periodicity of 58050 hundred-nanoseconds, or 256 frames.
We ended up with a period of 58050 hns or 256 frames.
Successfully played all 44100 frames.

amd64>play-exclusive.exe --device "SE790C-8 (NVIDIA High Definition Audio)" 
--file 4khz_48khz.wav
Opening .wav file "4khz_48khz.wav"...
Wave format in file is smaller than a WAVEFORMATEX; will zero-pad the last 2 
bytes.
The default period for this device is 30000 hundred-nanoseconds, or 144 frames.
Buffer size not aligned - doing the alignment dance.
Trying again with periodicity of 33333 hundred-nanoseconds, or 160 frames.
We ended up with a period of 33333 hns or 160 frames.
Successfully played all 44100 frames.

amd64>play-exclusive.exe --device "Realtek Digital Output (Realtek High 
Definition Audio)" --file 4khz.wav
Opening .wav file "4khz.wav"...
The default period for this device is 30000 hundred-nanoseconds, or 132 frames.
Buffer size not aligned - doing the alignment dance.
Trying again with periodicity of 36281 hundred-nanoseconds, or 160 frames.
We ended up with a period of 36281 hns or 160 frames.
Successfully played all 44100 frames.

amd64>play-exclusive.exe --device "Speakers (RME Babyface)" --file 4khz.wav
Opening .wav file "4khz.wav"...
The default period for this device is 30000 hundred-nanoseconds, or 132 frames.
We ended up with a period of 29932 hns or 132 frames.
Successfully played all 44100 frames.

Or do I miss something?

BTW: NVIDIA requires 48khz Samplerate and 16bit as the format of the 4khz.wav 
file

Best Regards
Hp. Widmer

HpW-Works Support

Mailto:support@xxxxxxxxxxxxx
Website: 
http://www.hpw-works.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.hpw-works.com&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C10bfdb8039ac4f901f4c08d520446073%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636450400428399141&sdata=rrNgb2ECJ4kTskmqOnMfV5my3z64wA%2FE%2BWoJHSqQ0NU%3D&reserved=0>


From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Tsai Tzung-Dar ;(Redacted 
sender "tdtsai1973" for DMARC)
Sent: Dienstag, 31. Oktober 2017 04:03
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Windows 7 (only) WASAPI Exclusive Issue/Bug

Hi
What is the format of your "4khz.wav". Does NVIDIA and Realtek device support 
the format of your "4khz.wav"? Maybe the problem is the format of your 
"4khz.wav" is not support by NVIDA and Realtek devices so it get failed.


________________________________
寄件者: HpW-Works Support <support@xxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxx>>
收件者: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
寄件日期: 2017/10/31 (週二) 1:50 AM
主旨: [wdmaudiodev] Re: Windows 7 (only) WASAPI Exclusive Issue/Bug

Hi Matthew
Have this issue only on Win 7
. Lynx
. NVIDIA
. Reathek
But not on Win 10 using the equal Lynx driver, what me puzzles. This means 
within Win 7, since a while something is broken.
Will this be fixed on Win 7??
Best Regards
Hp. Widmer
HpW-Works Support
Mailto:support@xxxxxxxxxxxxx
Website:http://www.hpw-works.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.hpw-works.com%2F&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C10bfdb8039ac4f901f4c08d520446073%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636450400428399141&sdata=oyRHkWGR2cu0eDuMj7Rd%2Bdp94%2BP3OhZ2iHCgo8cf4Gg%3D&reserved=0>
Am 30. Oktober 2017 15:57:39 schrieb "Matthew van Eerde" 
<dmarc-noreply@xxxxxxxxxxxxx<mailto:dmarc-noreply@xxxxxxxxxxxxx>> (Redacted 
sender "Matthew.van.Eerde" for DMARC):
0x8007007a is HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER). It is likely that 
the driver is returning a failing NTSTATUS code from KsCreatePin which is being 
mapped to ERROR_INSUFFICIENT_BUFFER.

If you can get this to repro on Windows 10, please file a problem report in 
Feedback Hub with Audio Glitches tracing.
https://blogs.msdn.microsoft.com/matthew_van_eerde/2016/09/26/report-problems-with-logs-and-suggest-features-with-the-feedback-hub/<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblogs.msdn.microsoft.com%2Fmatthew_van_eerde%2F2016%2F09%2F26%2Freport-problems-with-logs-and-suggest-features-with-the-feedback-hub%2F&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C10bfdb8039ac4f901f4c08d520446073%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636450400428399141&sdata=OkMOvgj16JODwzZHOFYZR4OYUT%2FeR4yUMOze8LseIhI%3D&reserved=0>

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of Support HpW-Works.com 
<support@xxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxx>>
Sent: Monday, October 30, 2017 3:52:14 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Windows 7 (only) WASAPI Exclusive Issue/Bug


On 19. Oct I reported issues on Win 7 & WASAPI Exclusive and do not have any 
lights on this issue/bug!

I tested with the given “Play-Exclusive” CPP example given form Matthew van 
Eerde with equal failed/buggy driver initialize result.

Test 1 fails:

play-exclusive.exe --device "Speakers (Lynx L22)" --file 4khz.wav
Opening .wav file "4khz.wav"...
The default period for this device is 30000 hundred-nanoseconds, or 132 frames.
IAudioClient::Initialize failed: hr = 0x8007007a
Thread returned failing HRESULT 0x8007007a

Test 2 with different HW/Driver works:

play-exclusive.exe --device "Speakers (RME Babyface)" --file 4khz.wav
Opening .wav file "4khz.wav"...
The default period for this device is 30000 hundred-nanoseconds, or 132 frames.
We ended up with a period of 29932 hns or 132 frames.
Successfully played all 44100 frames.

Any help on this … 😃

Best Regards
Hp. Widmer

HpW-Works Support

Mailto:support@xxxxxxxxxxxxx
Website: 
http://www.hpw-works.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.hpw-works.com&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C0c7bc984a43e411cd65908d51f846a34%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636449575968183692&sdata=i8nb6rPrz5wDmLBbewnGqP%2FpaEvKza56aajr%2BU816u4%3D&reserved=0>


From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Support HpW-Works.com
Sent: Donnerstag, 19. Oktober 2017 10:21
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Windows 7 (only) WASAPI Exclusive Issues


Well,

Have some issues on Windows 7 / 64 bit and may get here some light on this 
WASAPI issues:


  1.  Using a Lynx L22 PCI Card and latest drivers (also older drivers 
releases): on WASAPI initialization I get an Error x8007007A, what is not 
presented/listed on MS/WSAPAI initialize :

[cid:part1840.15f73aee678.27af.9775a7808f3a7b7bf6cdb99725615b12@hpw-works.com]
The used sample size/hhns is always hold below the 500ms level…

BTW: No issue on Win10 & Win10 Creator update!!
  2.  I use on the Exclusive Events an 1 second timeout timer to control the 
message flow.
NOW using the RME ADI-2 Pro, the first event is given/fired approx. after 1.2 
.. 1.5 seconds … Follow on events (after the first event) are always within the 
1 second timeout.

The question rises is this a normal behavior on Win 7, while on Win 10 this has 
not be seen yet. This would mean, the first event timeout should be somewhat 
larger than the follow-on.


Best Regards
Hp. Widmer

HpW-Works Support

Mailto:support@xxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxx>
Website: 
http://www.hpw-works.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.hpw-works.com&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C0c7bc984a43e411cd65908d51f846a34%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636449575968183692&sdata=i8nb6rPrz5wDmLBbewnGqP%2FpaEvKza56aajr%2BU816u4%3D&reserved=0>


PNG image

Other related posts: