[USBAUDIO]
[reactos.git] / reactos / drivers / usb / usbaudio / filter.c
index 8aab471..93ad768 100644 (file)
@@ -25,9 +25,7 @@ GUID NodeTypeSubwoofer = { STATIC_KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER };
 GUID NodeTypeCapture = { STATIC_PINNAME_CAPTURE };
 GUID NodeTypePlayback = { STATIC_KSCATEGORY_AUDIO };
 GUID GUID_KSCATEGORY_AUDIO = { STATIC_KSCATEGORY_AUDIO };
-GUID GUID_KSDATAFORMAT_TYPE_AUDIO = { STATIC_KSDATAFORMAT_TYPE_AUDIO };
-GUID GUID_KSDATAFORMAT_SUBTYPE_PCM = { STATIC_KSDATAFORMAT_SUBTYPE_PCM };
-GUID GUID_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = { STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX };
+
 KSPIN_INTERFACE StandardPinInterface =
 {
      {STATIC_KSINTERFACESETID_Standard},
@@ -138,6 +136,7 @@ USBAudioFilterCreate(
     FilterContext->LowerDevice = Device->NextDeviceObject;
     Filter->Context = FilterContext;
 
+    DPRINT("USBAudioFilterCreate FilterContext %p LowerDevice %p DeviceExtension %p\n", FilterContext, FilterContext->LowerDevice, FilterContext->DeviceExtension);
     KsAddItemToObjectBag(Filter->Bag, FilterContext, ExFreePool);
     return STATUS_SUCCESS;
 }
@@ -367,9 +366,9 @@ UsbAudioGetDataRanges(
                     }
 
                     DataRangeAudio->DataRange.FormatSize = sizeof(KSDATARANGE_AUDIO);
-                    DataRangeAudio->DataRange.MajorFormat = GUID_KSDATAFORMAT_TYPE_AUDIO;
-                    DataRangeAudio->DataRange.SubFormat = GUID_KSDATAFORMAT_SUBTYPE_PCM;
-                    DataRangeAudio->DataRange.Specifier = GUID_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX;
+                    DataRangeAudio->DataRange.MajorFormat = KSDATAFORMAT_TYPE_AUDIO;
+                    DataRangeAudio->DataRange.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
+                    DataRangeAudio->DataRange.Specifier = KSDATAFORMAT_SPECIFIER_WAVEFORMATEX;
                     DataRangeAudio->MaximumChannels = 1;
                     DataRangeAudio->MinimumBitsPerSample = StreamingFormatDescriptor->bBitResolution;
                     DataRangeAudio->MaximumBitsPerSample = StreamingFormatDescriptor->bBitResolution;
@@ -449,8 +448,12 @@ USBAudioPinBuildDescriptors(
                 Pins[Index].PinDescriptor.DataFlow = KSPIN_DATAFLOW_IN;
             }
 
+
+            Pins[Index].Flags = KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY | KSFILTER_FLAG_CRITICAL_PROCESSING;
+
             /* irp sinks / sources can be instantiated */
             Pins[Index].InstancesPossible = 1;
+            Pins[Index].InstancesNecessary = 1;
         }
         else
         {