AvStream mini driver : KS toplogy test fails

DTM test KS Topology Test fails with my driver. FOllowing is the error

====
Node[01] (KSNODETYPE_VOLUME)
Property Descriptor[00] (KSPROPERTY_AUDIO_VOLUMELEVEL)
IOCTL called with an output buffer size of 0.
IOCTL called with an output buffer size of 1.
IOCTL called with an output buffer size of 2.
IOCTL called with an output buffer size of 6.
IOCTL called with an output buffer size of 8.
FAIL: Node[01] KSNODETYPE_VOLUME - Property[00] KSPROPERTY_AUDIO_VOLUMELEVEL: KSPROPERTY_MEMBERSHEADER.Flags has KSPROPERTY_MEMBER_FLAG_BASICSUPPORT_MULTICHANNEL set and must return the number of channels in KSPROPERTY_MEMBERSHEADER.MembersCount

We set the no of channels to 2, but still I am facing this problem.

DEFINE_KSPROPERTY_TABLE (gVolumeProperties)
{
DEFINE_KSPROPERTY_ITEM
(
KSPROPERTY_AUDIO_VOLUMELEVEL, // property item
AudioVolumeLevel, // get property handler
sizeof(KSNODEPROPERTY_AUDIO_CHANNEL),
sizeof(LONG), // minimum buffer length for returned data
AudioVolumeLevel, // get property handler
&VolumeValues, // values
0, // related properties
NULL,
NULL, // no raw serialization handler
sizeof(LONG) // Serialized size
)
};

KSPROPERTY_VALUES VolumeValues =
{
{
STATICGUIDOF (KSPROPTYPESETID_General),
VT_I4,
0
},
SIZEOF_ARRAY (VolumeMembersList),
VolumeMembersList
};

KSPROPERTY_MEMBERSLIST VolumeMembersList =
{
{
{
KSPROPERTY_MEMBER_STEPPEDRANGES, //MembersFlags
sizeof (VolumeRangeAndStep[0]), //MembersSize
2, //MembersCount
KSPROPERTY_MEMBER_FLAG_BASICSUPPORT_MULTICHANNEL //Flags
},
(PVOID) VolumeRangeAndStep,
},
{
{
KSPROPERTY_MEMBER_VALUES,
sizeof (VolumeDefault),
2,
KSPROPERTY_MEMBER_FLAG_DEFAULT
},
(PVOID) &VolumeDefault,
}
};

Could any one help how to solve this problem.

Thanks
GSB

xxxxx@yahoo.co.in wrote:

DTM test KS Topology Test fails with my driver. FOllowing is the error

====
Node[01] (KSNODETYPE_VOLUME)
Property Descriptor[00] (KSPROPERTY_AUDIO_VOLUMELEVEL)
IOCTL called with an output buffer size of 0.
IOCTL called with an output buffer size of 1.
IOCTL called with an output buffer size of 2.
IOCTL called with an output buffer size of 6.
IOCTL called with an output buffer size of 8.
FAIL: Node[01] KSNODETYPE_VOLUME - Property[00] KSPROPERTY_AUDIO_VOLUMELEVEL: KSPROPERTY_MEMBERSHEADER.Flags has KSPROPERTY_MEMBER_FLAG_BASICSUPPORT_MULTICHANNEL set and must return the number of channels in KSPROPERTY_MEMBERSHEADER.MembersCount

What are you returning as the DescriptionSize element of the
KSPROPERTY_DESCRIPTION structure in you basic support topology handler?

This field needs to be set to:

sizeof(KSPROPERTY_DESCRIPTION) + sizeof(KSPROPERTY_MEMBERSHEADER) +
nChannels * sizeof(KSPROPERTY_STEPPING_LONG));

This is true even if the request buffer is not big enough to contain the
data.

IIRC I think this leads to the DTM failure you are seeing.

BTW You will get more audio experts if you use the wdmaudiodev mailing list.

Mike

Mike Pumford, Senior Software Engineer
MPC Data Limited
e-mail: xxxxx@mpc-data.co.uk web: www.mpc-data.co.uk
tel: +44 (0) 1225 710600 fax: +44 (0) 1225 710601
ddi: +44 (0) 1225 710635

Thanks for the response.

We are not using portcls primitives in our driver. Instead we use the APIs/structures of KS eg: KSNODE_DESCRIPTOR,KSTOPOLOGY_CONNECTION, DEFINE_KSFILTER_DESCRIPTOR. By using this approach, we need not write the basic support handler, which means size of KSPROPERTY_DESCRIPTION will be managed internally by KS . It is abstracted in the KS APIs.

I think the size is not an issue, because it is taking the flags defined like KSPROPERTY_MEMBER_FLAG_BASICSUPPORT_MULTICHANNEL properly.

xxxxx@yahoo.co.in wrote:

We are not using portcls primitives in our driver. Instead we use the APIs/structures of KS eg: KSNODE_DESCRIPTOR,KSTOPOLOGY_CONNECTION, DEFINE_KSFILTER_DESCRIPTOR. By using this approach, we need not write the basic support handler, which means size of KSPROPERTY_DESCRIPTION will be managed internally by KS . It is abstracted in the KS APIs.

Sorry, but this is wrong. AVStream will use your data structures to
report the presence or absence of the various properties, but the
handling of GET and SET requests is entirely up to you.

In fact, the data structure you showed us has AudioVolumeLevel as the
handler function for this property. That’s YOUR code, and that’s almost
certainly where the problem lies.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks for the response. We were not returning error in AudioVolumeLevel support function for the unsupported channels. The testcase passes now.