question

tampopo-7207 avatar image
0 Votes"
tampopo-7207 asked

Failed to give a name to a virtual speaker

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 SpeakerWaveMiniportPins[1].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-code-audio
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers