[idd] audio: add mediated broker control endpoint

Expose a private, versioned control device that lets the IDD discover
and claim the active audio adapter without using the public PortCls
endpoints.

Restrict access to SYSTEM and UMDF hosts, track adapter and binding
generations, and keep broker failure optional. Reserve data-plane
capabilities without advertising them until PCM queues are available.
This commit is contained in:
Geoffrey McRae
2026-09-01 22:42:05 +10:00
parent 7c24b585af
commit c261fa053f
7 changed files with 1281 additions and 5 deletions

View File

@@ -19,6 +19,7 @@
*/
#include "Adapter.h"
#include "BrokerDevice.h"
#include "Formats.h"
#include "MiniportTopology.h"
#include "MiniportWaveRT.h"
@@ -237,6 +238,17 @@ NTSTATUS StartAudioDevice(
status = PcRegisterPhysicalConnection(deviceObject, topologyCapture,
kCaptureTopologyBridgePin, waveCapture, kCaptureWaveBridgePin);
if (NT_SUCCESS(status))
{
const NTSTATUS brokerStatus =
BrokerDeviceAttachAdapter(deviceObject, adapter);
if (!NT_SUCCESS(brokerStatus))
{
LGAUDIO_TRACE_ERROR("broker adapter unavailable: 0x%08X",
brokerStatus);
}
}
SafeRelease(waveCapture);
SafeRelease(topologyCapture);
SafeRelease(waveRender);