mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-11-12 14:57:20 +00:00
[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user