Failed to give a name to a virtual speaker

tampopo 1 Reputation point
2022-05-19T06:43:14.7+00:00

I'm developing a virtual audio device (AUD) driver.
I'm investigating a sample program: simpleaudiosample.
The sample give a name to the virtual mic, but not to the virtual speaker.
I’ve been trying to give a name to the virtual speaker by reference to the virtual mic, but not going well yet.

In case of the virtual mic,

1) Add the name to the registry (SimpleAudioSample.inx)

[SIMPLEAUDIOSAMPLE_SA.AddReg]
HKR,%MEDIA_CATEGORIES%\%MicArray1CustomNameGUID%,Name,,%MicArray1CustomName%  <-- need to add this (lacking in sample)

[Strings]
MEDIA_CATEGORIES = "MediaCategories"
MicArray1CustomNameGUID = {6ae81ff4-203e-4fe1-88aa-f2d57775cd4a}
MicArray1CustomName= "Internal Microphone Array - Front"

2) Set MicArray1TopoMiniportPins[0].KsPinDescriptor.Name to the custom name GUID.

// {6ae81ff4-203e-4fe1-88aa-f2d57775cd4a}
DEFINE_GUID(MICARRAY1_CUSTOM_NAME,
    0x6ae81ff4, 0x203e, 0x4fe1, 0x88, 0xaa, 0xf2, 0xd5, 0x77, 0x75, 0xcd, 0x4a);

static
PCPIN_DESCRIPTOR MicArray1TopoMiniportPins[] =
{
    // KSPIN_TOPO_MIC_ELEMENTS
    {
      0,
      0,
      0,                                              // InstanceCount
      NULL,                                           // AutomationTable
      {                                               // KsPinDescriptor
        0,                                            // InterfacesCount
        NULL,                                         // Interfaces
        0,                                            // MediumsCount
        NULL,                                         // Mediums
        SIZEOF_ARRAY(MicArray1TopoPinDataRangePointersBridge),     // DataRangesCount
        MicArray1TopoPinDataRangePointersBridge,                   // DataRanges
        KSPIN_DATAFLOW_IN,                            // DataFlow
        KSPIN_COMMUNICATION_NONE,                     // Communication
        &KSNODETYPE_MICROPHONE_ARRAY,                 // Category
        &MICARRAY1_CUSTOM_NAME,                       // Name  <-- this
        0                                             // Reserved
      }
    },

    // KSPIN_TOPO_BRIDGE
    { ... }
};

In the same manner, I added the name to the registry and set SpeakerWaveMiniportPins1.KsPinDescriptor.Name to the custom name GUID, but the name was ignored.
Setting SpeakerWaveMiniportPins[0].KsPinDescriptor.Name produced the same result.

I investigated the difference between mic and speaker and emulated the codes for mic, but it was all in vain.

I struggled for a few days, but the issue has not been resolved.
Please help.

Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,611 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Camille Gonnet 1 Reputation point
    2022-11-03T08:02:47.607+00:00

    The line you added which was missing has an incorrect path.
    The path is
    HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%MicArray1CustomNameGUID%

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.