none
About MSVAD in Windows 8 RRS feed

  • Question

  • I have build and install the MSVAD sample in Windows 8 X86,

    I can find the msvad device in device manager, but  when I open control panel->device and printers, I can't find the msvad audio device,why?

    Monday, March 11, 2013 1:56 AM

Answers

  • It seems to depend on the pin-bridge category.  If I change the category from KSNODETYPE_SPEAKER to KSNODETYPE_HEADPHONES:

      // KSPIN_TOPO_LINEOUT_DEST
      {
        0,
        0,
        0,                                              // InstanceCount
        NULL,                                           // AutomationTable
        {                                               // KsPinDescriptor
          0,                                            // InterfacesCount
          NULL,                                         // Interfaces
          0,                                            // MediumsCount
          NULL,                                         // Mediums
          SIZEOF_ARRAY(PinDataRangePointersBridge),     // DataRangesCount
          PinDataRangePointersBridge,                   // DataRanges
          KSPIN_DATAFLOW_OUT,                           // DataFlow
          KSPIN_COMMUNICATION_NONE,                     // Communication
          &KSNODETYPE_SPEAKER,    // Category  ---> Change to &KSNODETYPE_HEADPHONES <-------
          NULL,                                         // Name
          0                                             // Reserved
        }
      },

    I can see the device listed in devices and printers.

    Wednesday, March 13, 2013 3:56 PM

All replies

  • What about panel->Sound, do you see any msvad's devices in there?

    And in device manager's Audio inputs and outputs, do you see any msvad's in there?

    msvad sample installs several audio endpoints (capture (3+) and render devices (3+)).

    Monday, March 11, 2013 3:21 PM
  • Yes, I only install the MSVAD(Simple) Sample.

    I can find the device in both  panel->Sound and device manager's Audio inputs and outputs.

    but It can not be found in control panel->device and printers.

    why?

    Tuesday, March 12, 2013 9:17 AM
  • Yes, I only install the MSVAD(Simple) Sample.

    I can find the device in both  panel->Sound and device manager's Audio inputs and outputs.

    but It can not be found in control panel->device and printers.

    why?


    Wednesday, March 13, 2013 2:28 AM
  • It seems to depend on the pin-bridge category.  If I change the category from KSNODETYPE_SPEAKER to KSNODETYPE_HEADPHONES:

      // KSPIN_TOPO_LINEOUT_DEST
      {
        0,
        0,
        0,                                              // InstanceCount
        NULL,                                           // AutomationTable
        {                                               // KsPinDescriptor
          0,                                            // InterfacesCount
          NULL,                                         // Interfaces
          0,                                            // MediumsCount
          NULL,                                         // Mediums
          SIZEOF_ARRAY(PinDataRangePointersBridge),     // DataRangesCount
          PinDataRangePointersBridge,                   // DataRanges
          KSPIN_DATAFLOW_OUT,                           // DataFlow
          KSPIN_COMMUNICATION_NONE,                     // Communication
          &KSNODETYPE_SPEAKER,    // Category  ---> Change to &KSNODETYPE_HEADPHONES <-------
          NULL,                                         // Name
          0                                             // Reserved
        }
      },

    I can see the device listed in devices and printers.

    Wednesday, March 13, 2013 3:56 PM
  • More info,

    - I didn't realize that in the test above I had also added the KSPROPERTY_JACK_CONTAINERID property. the category above selects the icon used in the UI. the category ID moves the device out of the system container ID.

    - all devices without a container id are put together in the system container (double-click that container, you should see under the h/w tab the list of all devices).

    - It is not recommended for end-user to manage the audio devices via 'device and printers'. for example if you try to remove an audio device, the device is still visible via sound control panel.

    • Proposed as answer by Egidio [MSFT] Wednesday, March 13, 2013 9:54 PM
    • Marked as answer by Doron Holan [MSFT] Thursday, March 14, 2013 12:25 AM
    • Unmarked as answer by ZSLi Thursday, March 14, 2013 8:33 AM
    • Unproposed as answer by ZSLi Thursday, March 14, 2013 8:35 AM
    Wednesday, March 13, 2013 9:54 PM
  • Hi,Dear Egidio:

           Would you please tell me how to add the  KSPROPERTY_JACK_CONTAINERID property?

           I could not find any document about how to add KSPROPERTY_JACK_CONTAINERID property.

    thanks.

    Thursday, March 14, 2013 8:35 AM
  • On filter props:

        {
            &KSPROPSETID_Jack,
            KSPROPERTY_JACK_CONTAINERID,
            KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
            PropertyHandler
        },

     

    Handlers:

    NTSTATUS
    PropertyHandler(
        _In_ PPCPROPERTY_REQUEST      PropertyRequest
    )
    /*++

    Routine Description:

      Redirects property request to miniport object

    Arguments:

      PropertyRequest -

    Return Value:

      NT status code.

    --*/
    {
        PAGED_CODE();

        ASSERT(PropertyRequest);

        // PropertryRequest structure is filled by portcls.
        // MajorTarget is a pointer to miniport object for miniports.
        //
        NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST;

        if (IsEqualGUIDAligned(*PropertyRequest->PropertyItem->Set, KSPROPSETID_Jack))
        {
            if (PropertyRequest->PropertyItem->Id == KSPROPERTY_JACK_CONTAINERID)
            {
                ntStatus = PropertyHandler_JackContainerId(PropertyRequest);
            }
        }

        return ntStatus;
    }


    NTSTATUS
    PropertyHandler_JackContainerId
    (
        _In_ PPCPROPERTY_REQUEST      PropertyRequest
    )
    /*++

    Routine Description:

      Handles ( KSPROPSETID_Jack, KSPROPERTY_JACK_CONTAINERID )

    Arguments:

      PropertyRequest -

    Return Value:

      NT status code.

    --*/
    {
        PAGED_CODE();

        ASSERT(PropertyRequest);

        NTSTATUS                ntStatus    = STATUS_INVALID_DEVICE_REQUEST;
        PCMiniportTopology      miniport    = (PCMiniportTopology)PropertyRequest->MajorTarget;
        ULONG                   nPinId      = (ULONG)-1;
       
        if (PropertyRequest->InstanceSize >= sizeof(ULONG))
        {
            nPinId = *(PULONG(PropertyRequest->Instance));

            if (nPinId == KSPIN_TOPO_LINEOUT_DEST)
            {
                if (PropertyRequest->Verb & KSPROPERTY_TYPE_BASICSUPPORT)
                {
                    ntStatus =
                        PropertyHandler_BasicSupport
                        (
                            PropertyRequest,
                            KSPROPERTY_TYPE_BASICSUPPORT | KSPROPERTY_TYPE_GET,
                            VT_ILLEGAL
                        );
                }
                else
                {
                    ULONG cbNeeded = sizeof(GUID);

                    if (PropertyRequest->ValueSize == 0)
                    {
                        PropertyRequest->ValueSize = cbNeeded;
                        ntStatus = STATUS_BUFFER_OVERFLOW;
                    }
                    else if (PropertyRequest->ValueSize < cbNeeded)
                    {
                        ntStatus = STATUS_BUFFER_TOO_SMALL;
                    }
                    else
                    {
                        if (PropertyRequest->Verb & KSPROPERTY_TYPE_GET)
                        {                       
                            GUID* guid = (GUID *)PropertyRequest->Value;
                           
                            *guid = <container - id - guid - here>

                            ntStatus = STATUS_SUCCESS;
                        }
                    }
                }
            }
        }

        return ntStatus;
    }

    Friday, March 15, 2013 1:13 AM
  • Dear Egidio:

           I can find the MSVAD device in Device and printers after add the KSPROPERTY_JACK_CONTAINERID property.

           thanks a lot.

    Friday, March 15, 2013 2:54 AM