13 Replies Latest reply on Aug 10, 2020 11:59 PM by GaK_4661021

    CX3: Extension unit command fails sometime with random behavior




      We have implemented custom command for CX3 UVC application. We have 11 such custom commands. Below is the descriptor in firmware,


      /* Extension Unit Descriptor */

          0x1C,                               /* Descriptor size */

          CX3_CS_INTRFC_DESCR,                /* Class specific interface desc type */

          0x06,                               /* Extension Unit Descriptor type */

          0x03,                               /* ID of this terminal */

          0x0C, 0x89, 0xB6, 0xAC,         /* GUID specific to AN75779 firmware. Obtained from Visual studio */

          0xB3, 0xA3, 0x60, 0x40,

          0x8B, 0x9A, 0xDF, 0x34,

          0xEE, 0xF3, 0x9A, 0x2E,

          0x0B,                               /* Number of controls in this terminal */

          0x01,                               /* Number of input pins in this terminal */

          0x02,                               /* Source ID : 2 : Connected to Proc Unit */

          0x03,                               /* Size of controls field for this terminal : 3 bytes */

          0xFF, 0x07, 0x00,                   /* No controls supported */




      Below is the host application function we are using (Referenced from UVC Extension unit ).

      HRESULT SetGetExtensionUnit(GUID xuGuid, DWORD dwExtensionNode, ULONG xuPropertyId, ULONG flags, void* data, int len, ULONG* readCount)


      GUID pNodeType;

      IUnknown* unKnown;

      IKsControl* ks_control = NULL;

      IKsTopologyInfo* pKsTopologyInfo = NULL;

      KSP_NODE kspNode;


      HRESULT hr = mSource->QueryInterface(__uuidof(IKsTopologyInfo), (void**)&pKsTopologyInfo);

      CHECK_HR_RESULT(hr, "IMFMediaSource::QueryInterface(IKsTopologyInfo)");


      hr = pKsTopologyInfo->get_NodeType(dwExtensionNode, &pNodeType);

      CHECK_HR_RESULT(hr, "IKsTopologyInfo->get_NodeType(...)");


      hr = pKsTopologyInfo->CreateNodeInstance(dwExtensionNode, IID_IUnknown, (LPVOID*)&unKnown);

      CHECK_HR_RESULT(hr, "ks_topology_info->CreateNodeInstance(...)");


      hr = unKnown->QueryInterface(__uuidof(IKsControl), (void**)&ks_control);

      CHECK_HR_RESULT(hr, "ks_topology_info->QueryInterface(...)");


      kspNode.Property.Set = xuGuid;              // XU GUID

      kspNode.NodeId = (ULONG)dwExtensionNode;   // XU Node ID

      kspNode.Property.Id = xuPropertyId;         // XU control ID

      kspNode.Property.Flags = flags;             // Set/Get request

      hr = ks_control->KsProperty((PKSPROPERTY)&kspNode, sizeof(kspNode), (PVOID)data, len, readCount);

      CHECK_HR_RESULT(hr, "ks_control->KsProperty(...)");




      return hr;



      We are facing a random issue with the above development. Most of the time, we are able to sent set/get commands on every control command of the extension unit but sometimes it fails with only one control command. If we observe failure with the particular control command then it is persistent for every retry unless we reflash the firmware on the CX3 side. Can you please help with this?