HiCan you provide you USB Audio Device's Configuration descriptor? I guest your
USB Audio Device report output terminal type is Headphone. Basically you can
not change Endpoint type by INF.
BR,Tzung-Dar Tsai
寄件者: Edward Abramian <edwabr123@xxxxxxxxx>
收件者: wdmaudiodev@xxxxxxxxxxxxx
寄件日期: 2016/12/13 (週二) 8:24 AM
主旨: [wdmaudiodev] Re: Multichannel audio USB support
<!--#yiv4319320413 _filtered #yiv4319320413 {font-family:"Cambria
Math";panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv4319320413
{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv4319320413
#yiv4319320413 p.yiv4319320413MsoNormal, #yiv4319320413
li.yiv4319320413MsoNormal, #yiv4319320413 div.yiv4319320413MsoNormal
{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri",
sans-serif;}#yiv4319320413 a:link, #yiv4319320413
span.yiv4319320413MsoHyperlink
{color:blue;text-decoration:underline;}#yiv4319320413 a:visited, #yiv4319320413
span.yiv4319320413MsoHyperlinkFollowed
{color:#954F72;text-decoration:underline;}#yiv4319320413 pre
{margin:0in;margin-bottom:.0001pt;font-size:10.0pt;font-family:"Courier
New";color:black;}#yiv4319320413 span.yiv4319320413HTMLPreformattedChar
{font-family:"Courier New";color:black;}#yiv4319320413
span.yiv4319320413EmailStyle19 {font-family:"Calibri",
sans-serif;color:#1F497D;}#yiv4319320413 .yiv4319320413MsoChpDefault
{font-size:10.0pt;} _filtered #yiv4319320413 {margin:1.0in 1.0in 1.0in
1.0in;}#yiv4319320413 div.yiv4319320413WordSection1 {}-->I am setting it as
KSNODETYPE_SPEAKER, but it doesn’t seem to have any effect. It still shows up
as headphones. Installed same inf for USB speaker, and it keeps its Configure
button enabled. Here below is my inf file for reference. Note that I don’t
copy and register my APO with inf, I have a separate installer for that.
[Version]Signature="$Windows
NT$"Class=MEDIAClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}provider=%ProviderName%DriverVer=11/11/2001,15.25.44.897CatalogFile=delta.cat
[Manufacturer]%MfgName%=MfgModelSection,NT$ARCH$
[MfgModelSection.NT$ARCH$]%USB\VID_0B0E&PID_A345&MI_00.DeviceDesc%=MYUSBAudio.SysFx,USB\VID_0B0E&PID_A345&MI_00%USB\VID_0C76&PID_1529&MI_00.DeviceDesc%=MYUSBAudio.SysFx,USB\VID_0C76&PID_1529&MI_00%USB\VID_0D8C&PID_0012&MI_00.DeviceDesc%=MYUSBAudio.SysFx,USB\VID_0D8C&PID_0012&MI_00%USB\VID_046D&PID_0A37&MI_00.DeviceDesc%=MYUSBAudio.SysFx,USB\VID_046D&PID_0A37&MI_00
[MYUSBAudio.SysFx]Include =ks.inf,wdmaudio.inf,wdma_usb.infNeeds
=KS.Registration,WDMAUDIO.Registration,USBAudioOEM.CopyFiles,USBAudioOEM.AddReg
[MYUSBAudio.SysFx.Interfaces]AddInterface=%KSCATEGORY_AUDIO%,"GLOBAL",MYUSBAudio.SysFx.PrimaryHeadphonesWaveAddInterface=%KSCATEGORY_RENDER%,"GLOBAL",MYUSBAudio.SysFx.PrimaryHeadphonesWaveAddInterface=%KSCATEGORY_AUDIO%,"GLOBAL",MYUSBAudio.SysFx.PrimaryHeadphonesTopoAddInterface=%KSCATEGORY_TOPOLOGY%,"GLOBAL",MYUSBAudio.SysFx.PrimaryHeadphonesTopo
[MYUSBAudio.SysFx.PrimaryHeadphonesWave]AddReg=MYUSBAudio.SysFx.PrimaryHeadphonesWave.AddReg
[MYUSBAudio.SysFx.PrimaryHeadphonesWave.AddReg]HKR,,FriendlyName,,%PrimarySpeakersWaveDeviceName%HKR,,CLSID,,%Proxy.CLSID%
[MYUSBAudio.SysFx.PrimaryHeadphonesTopo]AddReg=MYUSBAudio.PrimaryHeadphonesTopo.AddReg,SysFx.AddReg
[MYUSBAudio.PrimaryHeadphonesTopo.AddReg]HKR,,FriendlyName,,%PrimarySpeakersTopoDeviceName%HKR,,CLSID,,%Proxy.CLSID%HKR,"EP\\0",%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_SPEAKER%
[MYUSBAudio.SysFx.Services]Include=wdma_usb.infNeeds=USBAudio.NT.Services
[SysFx.AddReg]HKR,"FX\\0",%PKEY_ItemNameDisplay%,,%SYSFX_FriendlyName%HKR,"FX\\0",%PKEY_FX_StreamEffectClsid%,,%SYSFX_SFX_CLSID%HKR,"FX\\0",%PKEY_FX_EndpointEffectClsid%,,%SYSFX_EFX_CLSID%HKR,"FX\\0",%PKEY_SFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%HKR,"FX\\0",%PKEY_EFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%HKR,"FX\\0",%PKEY_SYSFX_Association%,,%KSNODETYPE_SPEAKER%
[Strings]; see audioenginebaseapo.idl for APO_FLAG enum
valuesSFX_APO_FLAG_DEFAULT = 0x0000000DMFX_APO_FLAG_DEFAULT =
0x0000000FEFX_APO_FLAG_DEFAULT = 0x0000000F ProviderName ="Company,
Corp."MfgName ="Company, Corp."SRCopyRight ="Copyright (c) Company,
Corp."DiskDescription="Installation Media"
USB\VID_0B0E&PID_A345&MI_00.DeviceDesc="HP USB Audio Device #1
(Company)"USB\VID_0C76&PID_1529&MI_00.DeviceDesc="HP USB Audio Device #2
(Company)"USB\VID_0D8C&PID_0012&MI_00.DeviceDesc="HP USB Audio Device #3
(Company)"USB\VID_046D&PID_0A37&MI_00.DeviceDesc="HP USB Audio Device #4
(Company)" MediaCategories="SYSTEM\CurrentControlSet\Control\MediaCategories"
KSNAME_WaveHeadphones
="WaveHeadphones"KSNAME_TopologyHeadphones="TopologyHeadphones"
PrimarySpeakersWaveDeviceName ="Company Speakers"PrimarySpeakersTopoDeviceName
="Company Speakers Topo"
PKEY_SYSFX_Association="{D04E05A6-594B-4FB6-A80D-01AF5EED7D1D},0"
PKEY_FX_StreamEffectClsid
="{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},5"PKEY_FX_ModeEffectClsid
="{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},6"PKEY_FX_EndpointEffectClsid="{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},7"
PKEY_ItemNameDisplay="{B725F130-47EF-101A-A5F1-02608C9EEBAC},10"
SYSFX_FriendlyName="Company Audio Enhancement"
SYSFX_SFX_CLSID="{50B77CE4-514E-4437-ACC8-2E3402C0787F}"SYSFX_MFX_CLSID="{808135F6-334E-4C33-8F35-042CFC3A1B5C}"SYSFX_EFX_CLSID="{E5F3D16C-9D98-4ECF-97D0-3FDAEAFC1073}"
SYSFX_TypeLib_CLSID="{854E2844-3053-4C07-80F8-119B4DB14BC6}"
SYSFX_SFX_FriendlyName="APOLFXSFX"SYSFX_MFX_FriendlyName="APOGFXMFX"SYSFX_EFX_FriendlyName="APOEFX"
SYSFX_SFX_CLASS_FriendlyName="APOSFX
Class"SYSFX_MFX_CLASS_FriendlyName="APOMFX
Class"SYSFX_EFX_CLASS_FriendlyName="APOEFX Class" KSCATEGORY_AUDIO
="{6994AD04-93EF-11D0-A3CC-00A0C9223196}"KSCATEGORY_RENDER
="{65E8773E-8F56-11D0-A3B9-00A0C9223196}"KSCATEGORY_CAPTURE
="{65E8773D-8F56-11D0-A3B9-00A0C9223196}"KSCATEGORY_REALTIME
="{EB115FFC-10C8-4964-831D-6DCB02E6F23F}"KSCATEGORY_TOPOLOGY
="{DDA54A40-1E4C-11D1-A050-405705C10000}"KSNODETYPE_ANY
="{00000000-0000-0000-0000-000000000000}"KSNODETYPE_SPEAKER
="{DFF21CE1-F70F-11D0-B917-00A0C9223196}"KSNODETYPE_HEADPHONES="{DFF21CE2-F70F-11D0-B917-00A0C9223196}"COMMUNICATION_SPEAKER="{DFF21CE6-F70F-11D0-B917-00A0C9223196}"
Proxy.CLSID="{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
PKEY_SFX_ProcessingModes_Supported_For_Streaming="{D3993A3F-99C2-4402-B5EC-A92A0367664B},5"PKEY_MFX_ProcessingModes_Supported_For_Streaming="{D3993A3F-99C2-4402-B5EC-A92A0367664B},6"PKEY_EFX_ProcessingModes_Supported_For_Streaming="{D3993A3F-99C2-4402-B5EC-A92A0367664B},7"
AUDIO_SIGNALPROCESSINGMODE_DEFAULT="{C18E2F7E-933D-4965-B7D1-1EEF228D2AF3}"AUDIO_SIGNALPROCESSINGMODE_MOVIE="{B26FEB0D-EC94-477C-9494-D1AB8E753F6E}"AUDIO_SIGNALPROCESSINGMODE_COMMUNICATIONS
= "{98951333-B9CD-48B1-A0A3-FF40682D73F7}"
PKEY_AudioEndpoint_Association="{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},2"
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Matthew van Eerde ;
(Redacted sender "Matthew.van.Eerde" for DMARC)
Sent: Monday, December 12, 2016 3:43 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Multichannel audio USB support What is the terminal
type in KSPIN_DESCRIPTOR.Category? From: Edward Abramian
Sent: Monday, December 12, 2016 3:22 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Multichannel audio USB support Bumping this thread
in case anyone knows how to enable “Configure” button for accessing Speaker
Setup control panel. In my driver based on wdma_usb.inf it’s grayed out. Any
hint will be appreciated. From: Edward Abramian [mailto:edwabr123@xxxxxxxxx] ;
Sent: Friday, December 2, 2016 4:37 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: RE: [wdmaudiodev] Re: Multichannel audio USB support Removing
APO_FLAG_SAMPLESPERFRAME_MUST_MATCH helped. Now I receive 6 channels in
IsInputFormatSupported. Thanks for helping with this. I noticed that
“Configure” button for my USB device is grayed out. So, I can’t select
preferable speaker configuration (Stereo, Quad, 5.1 etc) in Speaker Setup
control panel. I guess there should be something I need declare in my .inf to
make supported speaker configurations available for user to choose from? Thank
you again for your great help! From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Matthew van Eerde ;
(Redacted sender "Matthew.van.Eerde" for DMARC)
Sent: Friday, December 2, 2016 3:43 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Multichannel audio USB support Try using
TopoEdit.exe
https://msdn.microsoft.com/en-us/library/windows/desktop/ff485862(v=vs.85).aspx
Set a breakpoint on your IAudioProcessingObject::IsInputFormatSupported
implementation If you’re using CBaseAudioProcessingObject, you will need to
modify your flags. The default flags have APO_FLAG_SAMPLESPERFRAME_MUST_MATCH.
This will reject any attempt to pair an input format and an output format with
a different number of channels. // audioenginebaseapo.h enum APO_FLAG {
APO_FLAG_NONE = 0, APO_FLAG_INPLACE = 0x1,
APO_FLAG_SAMPLESPERFRAME_MUST_MATCH = 0x2,
APO_FLAG_FRAMESPERSECOND_MUST_MATCH = 0x4,
APO_FLAG_BITSPERSAMPLE_MUST_MATCH = 0x8, APO_FLAG_MIXER =
0x10, APO_FLAG_DEFAULT = ( (
APO_FLAG_SAMPLESPERFRAME_MUST_MATCH | APO_FLAG_FRAMESPERSECOND_MUST_MATCH ) |
APO_FLAG_BITSPERSAMPLE_MUST_MATCH ) } APO_FLAG; From: Edward
Abramian
Sent: Friday, December 2, 2016 3:36 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Multichannel audio USB support I keep receiving
stereo in my SFX even if I play 5.1 audio file. Is there something I need to
expose in my .inf file to tell Windows that my USB device supports multichannel
input? From: Edward Abramian [mailto:edwabr123@xxxxxxxxx] ;
Sent: Friday, December 2, 2016 2:38 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: RE: [wdmaudiodev] Re: Multichannel audio USB support Will do. Thanks!
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Matthew van Eerde ;
(Redacted sender "Matthew.van.Eerde" for DMARC)
Sent: Friday, December 2, 2016 2:04 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Multichannel audio USB support Also, make sure to
implement IAudioSystemEffects2::GetEffectsList and report
AUDIO_EFFECT_TYPE_VIRTUAL_SURROUND, AUDIO_EFFECT_TYPE_VIRTUAL_HEADPHONES,
and/or other effects types as appropriate so that apps are aware of the
processing you’re doing. From: Edward Abramian
Sent: Friday, December 2, 2016 1:39 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Multichannel audio USB support Thank you for
clarifying this for me. I will try you recommendations. Have a great
weekend!Edward From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Matthew van Eerde ;
(Redacted sender "Matthew.van.Eerde" for DMARC)
Sent: Friday, December 2, 2016 1:33 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Multichannel audio USB support I see, you want to
provide custom downmixing. You can do this by implementing an SFX APO that
supports both stereo and multichannel input, and always outputs stereo. Your
driver package will have an .inf and a .dll in it; no need for a custom .sys.
Media players will call IAudioClient::IsFormatSupported(…) with the source
content. If the source is multichannel, this will succeed, and your custom
downmixing will be in effect. (To be complete, I will mention that whether
IAudioClient::IsFormatSupported is called depends on the particular API the app
is using to stream. Some legacy APIs will open in the mix format regardless of
the source content. For those apps, your SFX will be opened in stereo mode.)
From: Edward Abramian
Sent: Friday, December 2, 2016 1:27 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Multichannel audio USB support The resulting audio
device will support multichannel input through downmixing it into stereo in
SFX. The downmixing is done the way it preserves sound localization by use of
binaural/HRTF techniques. So apps are free to choose multichannel output on
that device. From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Tim Roberts
Sent: Friday, December 2, 2016 1:22 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Multichannel audio USB support Edward Abramian
wrote:
To be clear on what exactly I need, let me describe it from the user
perspective. I want a USB audio device to show up as supporting multichannel
input, such as 5.1 or 7.1, so that user can configure it from Speaker Setup
control panel. Internally, per my understanding, this will mean downmixing
multichannel input into stereo in SFX to match USB headset stereo output.
If the hardware does not support 5.1 or 7.1, why would you want to pretend that
it does? That's just going to produce a confusing user experience. Apps will
assume they can exploit the additional channels.-- Tim Roberts,
timr@probo.comProvidenza & Boekelheide, Inc.