[USBAUDIO]
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Sat, 24 Sep 2016 08:35:25 +0000 (08:35 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Sat, 24 Sep 2016 08:35:25 +0000 (08:35 +0000)
- add pin dispatch routines

svn path=/trunk/; revision=72785

reactos/drivers/usb/usbaudio/filter.c
reactos/drivers/usb/usbaudio/pin.c
reactos/drivers/usb/usbaudio/usbaudio.h

index d314f00..b58652e 100644 (file)
@@ -78,6 +78,21 @@ static KSFILTER_DISPATCH USBAudioFilterDispatch =
     NULL
 };
 
+static KSPIN_DISPATCH UsbAudioPinDispatch =
+{
+    USBAudioPinCreate,
+    USBAudioPinClose,
+    USBAudioPinProcess,
+    USBAudioPinReset,
+    USBAudioPinSetDataFormat,
+    USBAudioPinSetDeviceState,
+    NULL,
+    NULL,
+    NULL,
+    NULL
+};
+
+
 NTSTATUS
 BuildUSBAudioFilterTopology(
     PKSDEVICE Device)
@@ -382,6 +397,9 @@ USBAudioPinBuildDescriptors(
         {
             /* irp sink pins*/
             TerminalDescriptor = UsbAudioGetStreamingTerminalDescriptorByIndex(DeviceExtension->ConfigurationDescriptor, Index);
+            ASSERT(TerminalDescriptor != NULL);
+
+            Pins[Index].Dispatch = &UsbAudioPinDispatch;
             Pins[Index].PinDescriptor.InterfacesCount = 1;
             Pins[Index].PinDescriptor.Interfaces = &StandardPinInterface;
             Pins[Index].PinDescriptor.MediumsCount = 1;
@@ -499,7 +517,6 @@ USBAudioCreateFilterContext(
         return Status;
     }
 
-    DbgBreakPoint();
     /* build topology */
     Status = BuildUSBAudioFilterTopology(Device);
     if (!NT_SUCCESS(Status))
index 1d8279e..5de275e 100644 (file)
@@ -9,3 +9,66 @@
 
 #include "usbaudio.h"
 
+NTSTATUS
+NTAPI
+USBAudioPinCreate(
+    _In_ PKSPIN Pin,
+    _In_ PIRP Irp)
+{
+    UNIMPLEMENTED
+    return STATUS_SUCCESS;
+}
+
+NTSTATUS
+NTAPI
+USBAudioPinClose(
+    _In_ PKSPIN Pin,
+    _In_ PIRP Irp)
+{
+    UNIMPLEMENTED
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+
+NTSTATUS
+NTAPI
+USBAudioPinProcess(
+    _In_ PKSPIN Pin)
+{
+    UNIMPLEMENTED
+    return STATUS_SUCCESS;
+}
+
+
+VOID
+NTAPI
+USBAudioPinReset(
+    _In_ PKSPIN Pin)
+{
+    UNIMPLEMENTED
+}
+
+NTSTATUS
+NTAPI
+USBAudioPinSetDataFormat(
+    _In_ PKSPIN Pin,
+    _In_opt_ PKSDATAFORMAT OldFormat,
+    _In_opt_ PKSMULTIPLE_ITEM OldAttributeList,
+    _In_ const KSDATARANGE* DataRange,
+    _In_opt_ const KSATTRIBUTE_LIST* AttributeRange)
+{
+    UNIMPLEMENTED
+    return STATUS_SUCCESS;
+}
+
+
+NTSTATUS
+NTAPI
+USBAudioPinSetDeviceState(
+    _In_ PKSPIN Pin,
+    _In_ KSSTATE ToState,
+    _In_ KSSTATE FromState)
+{
+    UNIMPLEMENTED
+    return STATUS_SUCCESS;
+}
index 74a393c..2957a70 100644 (file)
@@ -222,3 +222,44 @@ USBAudioPnPSetPower(
   _In_ DEVICE_POWER_STATE To,
   _In_ DEVICE_POWER_STATE From
 );
+
+/* pin.c*/
+
+NTSTATUS
+NTAPI
+USBAudioPinCreate(
+    _In_ PKSPIN Pin,
+    _In_ PIRP Irp);
+
+NTSTATUS
+NTAPI
+USBAudioPinClose(
+    _In_ PKSPIN Pin,
+    _In_ PIRP Irp);
+
+NTSTATUS
+NTAPI
+USBAudioPinProcess(
+    _In_ PKSPIN Pin);
+
+VOID
+NTAPI
+USBAudioPinReset(
+    _In_ PKSPIN Pin);
+
+NTSTATUS
+NTAPI
+USBAudioPinSetDataFormat(
+    _In_ PKSPIN Pin,
+    _In_opt_ PKSDATAFORMAT OldFormat,
+    _In_opt_ PKSMULTIPLE_ITEM OldAttributeList,
+    _In_ const KSDATARANGE* DataRange,
+    _In_opt_ const KSATTRIBUTE_LIST* AttributeRange);
+
+NTSTATUS
+NTAPI
+USBAudioPinSetDeviceState(
+    _In_ PKSPIN Pin,
+    _In_ KSSTATE ToState,
+    _In_ KSSTATE FromState);
+