[wdmaudiodev] Re: Win7: not appearing as system audio device

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: 若水 <shlikewater@xxxxxxxxx>, "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Thu, 26 May 2016 15:26:50 +0000


if the pin define is wrong, is this the reason that I cannot find the device 
in sound management

That is one potential explanation, yes. Another potential explanation is that 
your filter factory is not in KSCATEGORY_AUDIO.

Rather than writing a driver from scratch, I would suggest starting by using an 
existing working sample, and then modify it to do what you need.

https://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx

Since you need support for Windows 7, the universal driver sample won’t work 
for you, but there should be some audio samples in the WDK 8.1 kit that will 
work on Windows 7.

https://code.msdn.microsoft.com/windowshardware/Windows-Driver-Kit-WDK-81-cf35e953

From: 若水<mailto:shlikewater@xxxxxxxxx>
Sent: Thursday, May 26, 2016 3:51 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Win7: not appearing as system audio device

Hello, I am developing my avstream audio driver for win7 system. After I 
installed the driver, it can not appear as system audio device. The device 
initializing is good.I can find the device at device management (please refer 
to the device.png). However, I cannot find the device in sound management 
(please refer to the sound.png). The following is the pin define. I don't know 
if it is right. And, if the pin define is wrong, is this the reason that I 
cannot find the device in sound management?
const KSPIN_DESCRIPTOR_EX CapturePinDescriptor[CAPTUREPINDESCRIPTORCOUNT] = {
//Audio Render Pin Output, spk
{
&CapturePinDispatch,   //Dispatch Table
NULL, //&CapturePinAutoTable,  //Automation Table
//KSPIN_DESCRIPTOR
{
DEFINE_KSPIN_DEFAULT_INTERFACES, //Interfaces (NULL, 0 == default)
DEFINE_KSPIN_DEFAULT_MEDIUMS, //Mediums size (NULL, 0 == default)
SIZEOF_ARRAY(PinDataFormatRanges), //Range count
PinDataFormatRanges, //Ranges
KSPIN_DATAFLOW_IN, //Dataflow
KSPIN_COMMUNICATION_BOTH, //Communication
&KSCATEGORY_RENDER, //KSCATEGORY_AUDIO, //&KSNODETYPE_SPEAKER, 
//&KSCATEGORY_RENDER, //Category
&PinSpkName, //Name
0 //Reserved
},
//Flags
KSPIN_FLAG_USE_STANDARD_TRANSPORT |
KSPIN_FLAG_FIXED_FORMAT |
KSPIN_FLAG_RENDERER,
1, //Instances possible
1, //Instances necessary
&PinAllocatorFraming, //Allocator Framing
reinterpret_cast<PFNKSINTERSECTHANDLEREX>
(CCapturePin::IntersectHandler)
},
//Audio Capture Pin Input, mic
{
&CapturePinDispatch,   //Dispatch Table
NULL, //Automation Table
//KSPIN_DESCRIPTOR
{
DEFINE_KSPIN_DEFAULT_INTERFACES, //Interfaces (NULL, 0 == default)
DEFINE_KSPIN_DEFAULT_MEDIUMS, //Mediums size (NULL, 0 == default)
SIZEOF_ARRAY(PinDataFormatRanges), //Range count
PinDataFormatRanges, //Ranges
KSPIN_DATAFLOW_OUT, //Dataflow
KSPIN_COMMUNICATION_BOTH, //Communication
&KSCATEGORY_CAPTURE, //Category
&PinMicName, //Name
0 //Reserved
},
//Flags
KSPIN_FLAG_USE_STANDARD_TRANSPORT |
KSPIN_FLAG_FIXED_FORMAT,
1, //Instances possible
1, //Instances necessary
&PinAllocatorFraming, //Allocator Framing
reinterpret_cast<PFNKSINTERSECTHANDLEREX>
(CCapturePin::IntersectHandler)
}
};


Other related posts: