http://bugs.winehq.org/show_bug.cgi?id=59830 Bug ID: 59830 Summary: mmdevapi: IConnector::GetDataFlow / GetDeviceIdConnectedTo return E_NOTIMPL Product: Wine Version: 11.10 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: mmdevapi Assignee: wine-bugs@list.winehq.org Reporter: brian@digital-traffic.net Distribution: --- Created attachment 81106 --> http://bugs.winehq.org/attachment.cgi?id=81106 Test program for reproduction Note: Report is AI Generated / Human Reviewed. SUMMARY IConnector::GetDataFlow and IConnector::GetDeviceIdConnectedTo return E_NOTIMPL instead of valid topology data. Windows returns S_OK with real values for the same calls. Both E_NOTIMPL values are outside the HRESULTs the methods are documented to return. Real-world impact: pro-audio applications that probe endpoint topology to validate an output (e.g. Denon Engine DJ 5.0.0) refuse to use the device. Reproduces on wine-staging 11.10 and on vanilla wine.git d88408468c33dd09c7b3cc9499d0b39ba8023e2f -- not staging-specific. STEPS TO REPRODUCE A standalone MinGW reproducer (test-topology.c, ~130 lines, attached) creates an IMMDeviceEnumerator, gets the default eRender/eConsole endpoint, activates IDeviceTopology, walks to the connector at index 0, and calls GetType, GetDataFlow and GetDeviceIdConnectedTo. The same binary runs on Wine and on Windows. Build (MinGW on Linux): x86_64-w64-mingw32-gcc -O2 -o test-topology.exe test-topology.c \ -lole32 -loleaut32 -luuid Run: wine ./test-topology.exe (Linux + Wine) .\test-topology.exe (Windows) Note on the two test environments below: these are NOT identical hardware. Wine runs on the Linux host; Windows runs as a KVM guest. The Wine-side E_NOTIMPL is unconditional in dlls/mmdevapi/devenum.c (lines 1787 and 1834 both "return E_NOTIMPL;" with no backend interaction), so the divergence is not backend-dependent. The Windows capture is a representative example of what a spec-compliant implementation returns on a real audio endpoint. Wine side: wine-staging 11.10, fresh 64-bit prefix on Arch Linux (kernel 7.0.9, Framework 16 / AMD Ryzen AI 9 HX 370, Radeon 890M iGPU), audio via PipeWire's pulseaudio compat to Wine's pulse driver. Default endpoint is the laptop's built-in HDA codec. Windows reference: Windows 11 25H2 (OS Build 26200.8037) in libvirt/KVM on the same host, virtio HD-audio device (stereo 48 kHz s32le), no DJ hardware attached. ACTUAL OUTPUT (Wine 11.10) == test-topology: Wine mmdevapi IConnector / IDeviceTopology probe == CoInitializeEx -> 0x00000000 (S_OK) CoCreateInstance(MMDeviceEnumerator) -> 0x00000000 (S_OK) GetDefaultAudioEndpoint(eRender,eConsole) -> 0x00000000 (S_OK) IMMDevice::Activate(IDeviceTopology) -> 0x00000000 (S_OK) -- IDeviceTopology probes -- IDeviceTopology::GetConnectorCount -> 0x00000000 (S_OK) connector_count = 1 IDeviceTopology::GetConnector(0) -> 0x00000000 (S_OK) -- IConnector probes (index 0) -- IConnector::GetType -> 0x00000000 (S_OK) ConnectorType = 1 <-- Physical_Internal (hardcoded) IConnector::GetDataFlow -> 0x80004001 (E_NOTIMPL) IConnector::GetDeviceIdConnectedTo -> 0x80004001 (E_NOTIMPL) EXPECTED OUTPUT (Windows 11 25H2 build 26200.8037, identical .exe, virtio HD-audio endpoint) -- IConnector probes (index 0) -- IConnector::GetType -> 0x00000000 (S_OK) ConnectorType = 2 <-- Physical_External IConnector::GetDataFlow -> 0x00000000 (S_OK) DataFlow = 0 <-- In IConnector::GetDeviceIdConnectedTo -> 0x00000000 (S_OK) device_id (connected-to) = {2}.\\?\hdaudio#func_01&ven_1af4&dev_0022&...\elineouttopo DIVERGENCE SUMMARY Per method -- Wine 11.10 vs Windows 11 25H2 (26200.8037) vs documented returns: IDeviceTopology::GetConnectorCount Wine: S_OK, count=1 (hardcoded) Windows: S_OK, count=1 Documented: S_OK / E_POINTER IDeviceTopology::GetConnector(0) Wine: S_OK, empty IConnector Windows: S_OK, real IConnector Documented: S_OK / E_POINTER / E_INVALIDARG IConnector::GetType Wine: S_OK, Physical_Internal (hardcoded) Windows: S_OK, Physical_External Documented: S_OK / E_POINTER IConnector::GetDataFlow *** spec violation *** Wine: E_NOTIMPL Windows: S_OK, In Documented: S_OK / E_POINTER (E_NOTIMPL is not listed) IConnector::GetDeviceIdConnectedTo *** spec violation *** Wine: E_NOTIMPL Windows: S_OK, full device-instance path Documented: S_OK / E_POINTER / E_NOTFOUND / E_OUTOFMEMORY (E_NOTIMPL is not listed) The two methods marked "spec violation" return an HRESULT not listed for them on learn.microsoft.com (see IConnector::GetDataFlow and IConnector::GetDeviceIdConnectedTo). The hardcoded Physical_Internal from GetType is wrong for the virtio HD-audio jack the guest is using, but is at least a spec-legal value. SOURCE POINTERS In dlls/mmdevapi/devenum.c at HEAD d88408468c3: Connector_GetType (devenum.c:1778) FIXME("...partial stub"); *pType = Physical_Internal; return S_OK; Connector_GetDataFlow (devenum.c:1787) FIXME("...stub"); return E_NOTIMPL; Connector_GetDeviceIdConnectedTo (devenum.c:1834) FIXME("...stub"); return E_NOTIMPL; DT_GetConnectorCount (devenum.c:1914) FIXME("...partial stub"); *pCount = 1; return S_OK; DT_GetConnector (devenum.c:1926) FIXME("...partial stub"); returns a freshly-Connector_Create()d empty object for nIndex == 0. Connector_Create (devenum.c:1857) allocates IConnectorImpl with only vtbl + ref; no plumbing of parent IMMDevice flow / id. Connector_GetConnectorIdConnectedTo, Connector_ConnectTo, Connector_Disconnect, Connector_IsConnected and Connector_GetConnectedTo are also pure stubs. They are out of scope for this report (Engine DJ did not call them during testing) but would also need real implementations for a complete IConnector. The existing test scaffold at dlls/mmdevapi/tests/mmdevenum.c:386 (test_connectors()) does not currently catch this -- it "passes" today because the connector count is treated as advisory and the test body short-circuits. REAL-WORLD IMPACT Denon Engine DJ 5.0.0 (Qt6/C++, WASAPI consumer): - App launches, UI renders, library catalogs, BPM analysis runs. - Engine probes WASAPI topology on its startup path. WINEDEBUG=+mmdevapi shows "fixme:mmdevapi:Connector_GetDeviceIdConnectedTo (...) - stub" firing immediately on app launch, before any user interaction. Engine's own log records "GetDeviceIdConnectedTo : Error: UNKNOWN ERROR" 9x during this probe. - Settings > Audio > Output: the Audio Device dropdown shows "No Output channels available". Every enumerated endpoint is rejected during the topology probe, so the user can't select any output at all. - On launch the symptom can also surface as "Mono output devices are not supported. Please select a stereo audio output device." -- same upstream cause; the endpoint is stereo, but the failed topology introspection made Engine treat it as unusable. - Attempting to load a track to a deck throws Engine's internal "EErrorCode 109 / Access denied" from TrackDeckControlLoadWorker::createReader. Confirmed via WINEDEBUG=+ntdll,+file,+seh trace that NO actual STATUS_ACCESS_DENIED is returned by Wine during the failure -- Engine's error code is a catch-all unrelated to filesystem ACLs. - Identical Engine DJ 5.0.0 in a Windows 11 25H2 VM on the same host (virtio HD-audio stereo endpoint, no DJ hardware attached -- same as the Wine run) loads tracks fine. The endpoints differ in driver path but are both 2-channel 48 kHz; Engine's own logs and the standalone reproducer above isolate the divergence to the mmdevapi topology calls, not to the audio endpoint itself. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.