You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Capture from a Focusrite Scarlett 2i4 (1st Gen) USB audio interface with
the Windows WDM-KS hostapi times out on Windows 8.1
pa_stable_v190600_20161030 x86_64. It works when built for i686.
The Header.OptionsFlags field is zero when the packet is first given to
the device. The value is KSSTREAM_HEADER_OPTIONSF_DURATIONVALID |
KSSTREAM_HEADER_OPTIONSF_TIMEVALID when the device completes the packet.
Reusing this packet causes the event to be signalled again immediately
with DataUsed=0. The stream fails with paTimedOut once all packets have
failed in this way.
Clear the OptionsFlags field before reusing the packet. This makes the
driver happy.
Tested both x86_64 and i686 with the Focusrite Scarlett 2i4 USB driver
version 2.5.128.1.
Signed-off-by: Stefan Hajnoczi <...>
---
I am not familiar with the WDM-KS API and this patch is a result of
debugging from first principles rather than understanding the code. Why
it worked for 32-bit and failed for 64-bit remains a mystery to me.
Please review carefully.
---
src/hostapi/wdmks/pa_win_wdmks.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/hostapi/wdmks/pa_win_wdmks.c b/src/hostapi/wdmks/pa_win_wdmks.c
index 70a48d8..f95f1ba 100644
--- a/src/hostapi/wdmks/pa_win_wdmks.c
+++ b/src/hostapi/wdmks/pa_win_wdmks.c
@@ -6536,7 +6536,11 @@ static PaError PaPinCaptureSubmitHandler_WaveCyclic(PaProcessThreadInfo* pInfo,
pInfo->capturePackets[pInfo->captureTail & cPacketsArrayMask].packet = 0;
assert(packet != 0);
PA_HP_TRACE((pInfo->stream->hLog, "Capture submit: %u", eventIndex));
- packet->Header.DataUsed = 0; /* Reset for reuse */
+
+ /* Reset header for reuse */
+ packet->Header.DataUsed = 0;
+ packet->Header.OptionsFlags = 0;
+
ResetEvent(packet->Signal.hEvent);
result = PinRead(pInfo->stream->capture.pPin->handle, packet);
++pInfo->pending;
The text was updated successfully, but these errors were encountered:
Posted to mailing list 10/5/2020:
From: Stefan Hajnoczi
Capture from a Focusrite Scarlett 2i4 (1st Gen) USB audio interface with
the Windows WDM-KS hostapi times out on Windows 8.1
pa_stable_v190600_20161030 x86_64. It works when built for i686.
The Header.OptionsFlags field is zero when the packet is first given to
the device. The value is KSSTREAM_HEADER_OPTIONSF_DURATIONVALID |
KSSTREAM_HEADER_OPTIONSF_TIMEVALID when the device completes the packet.
Reusing this packet causes the event to be signalled again immediately
with DataUsed=0. The stream fails with paTimedOut once all packets have
failed in this way.
Clear the OptionsFlags field before reusing the packet. This makes the
driver happy.
Tested both x86_64 and i686 with the Focusrite Scarlett 2i4 USB driver
version 2.5.128.1.
The text was updated successfully, but these errors were encountered: