[HDAUDBUS] Wait until the correct number of responses was received. CORE-15465
authorThomas Faber <thomas.faber@reactos.org>
Wed, 27 Feb 2019 14:02:38 +0000 (15:02 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Thu, 28 Feb 2019 09:27:06 +0000 (10:27 +0100)
commit1001e6089fecaa1b13c4d91a162d956742c4134e
treea093ad0b749f90cf15dcb187f9501aa9da95ff45
parent8530ae99509ae81041fdbc98b336467a84f88243
[HDAUDBUS] Wait until the correct number of responses was received. CORE-15465

We previously only gave the device a hard-coded amount of time to respond,
which could lead to interpreting the contents of uninitialized memory as
a response. This would lead to an unreasonably large number of audio function
groups being detected.

A KSEMAPHORE mirrors what Haiku uses here, though it may not be the optimal
synchronization primitive for this case under Windows.
drivers/wdm/audio/hdaudbus/fdo.cpp
drivers/wdm/audio/hdaudbus/hdaudbus.h