Author: janderwald
Date: Wed Apr 22 02:05:33 2009
New Revision: 40641
URL:
http://svn.reactos.org/svn/reactos?rev=40641&view=rev
Log:
- Implement KSPROPERTY_PIN_CTYPE, KSPROPERTY_PIN_DATAFLOW, KSPROPERTY_PIN_COMMUNICATION
for fast property handler
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c [iso-8859-1] Wed Apr
22 02:05:33 2009
@@ -217,6 +217,7 @@
{
PFNKSHANDLER PropertyHandler = NULL;
NTSTATUS Status = STATUS_UNSUCCESSFUL;
+ KSP_PIN * Pin;
ASSERT(Descriptor);
@@ -236,37 +237,64 @@
switch(Property->Id)
{
case KSPROPERTY_PIN_CTYPES:
+ (*(PULONG)Data) = Descriptor->Factory.PinDescriptorCount;
+ IoStatus->Information = sizeof(ULONG);
+ IoStatus->Status = Status = STATUS_SUCCESS;
+ break;
case KSPROPERTY_PIN_DATAFLOW:
+ Pin = (KSP_PIN*)Property;
+ if (Pin->PinId >= Descriptor->Factory.PinDescriptorCount)
+ {
+ IoStatus->Status = Status = STATUS_INVALID_PARAMETER;
+ IoStatus->Information = 0;
+ break;
+ }
+
+ *((KSPIN_DATAFLOW*)Data) =
Descriptor->Factory.KsPinDescriptor[Pin->PinId].DataFlow;
+ IoStatus->Information = sizeof(KSPIN_DATAFLOW);
+ IoStatus->Status = Status = STATUS_SUCCESS;
+ break;
+ case KSPROPERTY_PIN_COMMUNICATION:
+ Pin = (KSP_PIN*)Property;
+ if (Pin->PinId >= Descriptor->Factory.PinDescriptorCount)
+ {
+ IoStatus->Status = Status = STATUS_INVALID_PARAMETER;
+ IoStatus->Information = 0;
+ break;
+ }
+
+ *((KSPIN_COMMUNICATION*)Data) =
Descriptor->Factory.KsPinDescriptor[Pin->PinId].Communication;
+ IoStatus->Status = Status = STATUS_SUCCESS;
+ IoStatus->Information = sizeof(KSPIN_COMMUNICATION);
+ break;
+
+ case KSPROPERTY_PIN_GLOBALCINSTANCES:
+ Status = HandlePropertyInstances(IoStatus, Property, Data, Descriptor,
TRUE);
+ break;
+ case KSPROPERTY_PIN_CINSTANCES:
+ Status = HandlePropertyInstances(IoStatus, Property, Data, Descriptor,
FALSE);
+ break;
+ case KSPROPERTY_PIN_NECESSARYINSTANCES:
+ Status = HandleNecessaryPropertyInstances(IoStatus, Property, Data,
Descriptor);
+ break;
+
+ case KSPROPERTY_PIN_DATAINTERSECTION:
+ Status = HandleDataIntersection(IoStatus, Property, Data, DataLength,
Descriptor, SubDevice);
+ break;
+ case KSPROPERTY_PIN_PHYSICALCONNECTION:
+ case KSPROPERTY_PIN_CONSTRAINEDDATARANGES:
case KSPROPERTY_PIN_DATARANGES:
case KSPROPERTY_PIN_INTERFACES:
case KSPROPERTY_PIN_MEDIUMS:
- case KSPROPERTY_PIN_COMMUNICATION:
case KSPROPERTY_PIN_CATEGORY:
case KSPROPERTY_PIN_NAME:
case KSPROPERTY_PIN_PROPOSEDATAFORMAT:
- Status = KsFastPropertyHandler(FileObject, Property, PropertyLength, Data,
DataLength, IoStatus, PropertySetsCount, PropertySet);
- break;
- case KSPROPERTY_PIN_GLOBALCINSTANCES:
- Status = HandlePropertyInstances(IoStatus, Property, Data, Descriptor,
TRUE);
- break;
- case KSPROPERTY_PIN_CINSTANCES:
- Status = HandlePropertyInstances(IoStatus, Property, Data, Descriptor,
FALSE);
- break;
- case KSPROPERTY_PIN_NECESSARYINSTANCES:
- Status = HandleNecessaryPropertyInstances(IoStatus, Property, Data,
Descriptor);
- break;
-
- case KSPROPERTY_PIN_DATAINTERSECTION:
- Status = HandleDataIntersection(IoStatus, Property, Data, DataLength,
Descriptor, SubDevice);
- break;
- case KSPROPERTY_PIN_PHYSICALCONNECTION:
- case KSPROPERTY_PIN_CONSTRAINEDDATARANGES:
UNIMPLEMENTED
Status = STATUS_NOT_IMPLEMENTED;
break;
default:
UNIMPLEMENTED
- Status = STATUS_UNSUCCESSFUL;
+ Status = STATUS_NOT_IMPLEMENTED;
}
return Status;
}