Hi all.My USB audio device contains Extension Unit (XU), which is enumerated as KSNODE_TYPE_DEV_SPECIFIC by KS. I want to send Extension Unit Control Requests (USB Audio 1.0 spec., 5.2.2.6) from user mode API. I read "USB Audio Devices and Windows" (http://download.microsoft.com/download/5/7/7/577a5684-8a83-43ae-9272-ff260a9c20e2/USB_Audio_and_Windows.doc) and found two KS properties for use. 1. KSPROPSETID_TopologyNode, KSPROPERTY_TOPOLOGYNODE_ENABLE to turn XU on and off. 2. KSPROPSETID_Audio, KSPROPERTY_AUDIO_DEV_SPECIFIC to send XU control requests.
usbaudio.sys driver uses special struct for DEV_SPECIFIC property struct { KSNODEPROPERTY NodeProperty; ULONG DevSpecificId; ULONG DeviceInfo; ULONG Length; } KSNODEPROPERTY_AUDIO_DEV_SPECIFIC, *PKSNODEPROPERTY_AUDIO_DEV_SPECIFIC; My code is (NodeId=1): ..... pMoniker->BindToObject( NULL, NULL, IID_IBaseFilter, (void**)&pFilter ); ..... CComQIPtr<IKsControl> pCtrl = pFilter; ULONG ret; KSP_NODE nodeNameGet = { { KSPROPSETID_Topology, KSPROPERTY_TOPOLOGY_NAME, KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY },1,0 }; WCHAR name[64];hr = pCtrl->KsProperty( &nodeNameGet.Property, sizeof( nodeNameGet ), name, sizeof( name ), &ret );
// hr = S_OK, name[] is correctKSP_NODE nodePropGet = { { KSPROPSETID_TopologyNode, KSPROPERTY_TOPOLOGYNODE_ENABLE,
KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY },1,0 }; BOOL enabled;hr = pCtrl->KsProperty( &nodePropGet.Property, sizeof( nodePropGet ), &enabled, sizeof( enabled ), &ret );
hr = 0x80070490 Element not found. What's wrong? Any suggestions? Thanks in advance. ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.com/