[wdmaudiodev] Re: VAD woes on Win 10

  • From: Robert Bielik <Robert.Bielik@xxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 15 May 2017 07:04:27 +0000

A bit too hasty there, KSPROPERTY_PIN_PROPOSEDATAFORMAT handler works fine. But 
still, if I change the #channels or samplerates supported, the "Advanced" tab 
of the device disappears. Even if I use KSEVENT_PINCAPS_FORMATCHANGE on the 
IPortEvents::GenerateEventList of the Portcls WaveCyclic miniport. Surely I 
must be doing something wrong, I just don't have a clue what to try next...

Regards
/Robert

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-
bounce@xxxxxxxxxxxxx] On Behalf Of Robert Bielik
Sent: den 14 maj 2017 15:20
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: VAD woes on Win 10

One of my problems seems to be related to handling of
KSPROPERTY_PIN_PROPOSEDATAFORMAT, whenever it is called, I never get
back the requested buffer size, i.e. when returning
STATUS_BUFFER_OVERFLOW I set  PropertyRequest->ValueSize to
sizeof(KSDATAFORMAT_WAVEFORMATEX) which is 82 bytes (per msvad
example code), however, I only get back 64 bytes (in  PropertyRequest-
ValueSize) after that call (??)

So my main problem I think is that KSPROPERTY_TYPE_SET or
KSPROPERTY_TYPE_GET handler never gets called due to the problem above.

Regards
/Robert

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-
bounce@xxxxxxxxxxxxx] On Behalf Of Robert Bielik
Sent: den 12 maj 2017 15:51
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: VAD woes on Win 10

To answer your original question, you cannot put a wildcard in the
.inf, but you can dynamically add KSCATEGORY_AUDIO interfaces by
calling IoRegisterDeviceInterface. Since you’re a portcls miniport
you will want to use PcRegisterSubdevice which does some of the
dirty work
for you.

I do use PcRegisterSubdevice (in InstallSubdevice, as from the msvad
example), but using the "Wave_XXXX" name fails to give me any audio
device in control panel, is there anything else I need to do ?

There appears to be no sample for
KSEVENT_PINCAPS_FORMATCHANGE.
It is
important to note that KSEVENT_PINCAPS_JACKINFOCHANGE is raised
on
the
pin factory that sits on the hardware end of the signal path (the
one with the jack descriptions) but KSEVENT_PINCAPS_FORMATCHANGE
should be
raised on the pin factory that sits on the software end of the
signal path (the one where KsCreatePin gets called.)

Ok, the PPORTEVENTS interface pointer is queried in
CMiniportWaveCyclicMSVAD::Init, so I hope that is the correct place to do it
?

Can you also file a problem report for the lack of a sample and
share that as a direct link?

I did, however, I missed the "copy link" feature. Sorry 😊

Regards
/R




From: Robert Bielik <mailto:Robert.Bielik@xxxxxxxxx>
Sent: Friday, May 12, 2017 6:23 AM
To: wdmaudiodev@xxxxxxxxxxxxx <mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: VAD woes on Win 10



Hi Matthew,

Then I probably am using it incorrectly. Are there any example
sources using KSEVENTSETID_PinCapsChange/
KSEVENT_PINCAPS_FORMATCHANGE ? The
sysvad example uses only KSEVENT_PINCAPS_JACKINFOCHANGE.

Regards
/R

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-
bounce@xxxxxxxxxxxxx] On Behalf Of Matthew van Eerde
Sent: den 12 maj 2017 15:19
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: VAD woes on Win 10

KSEVENTSETID_PinCapsChange should work. If it doesn't, please file
a problem report in the Feedback Hub and share a direct link.






https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblogs.


msdn.microsoft.com%2Fmatthew_van_eerde%2F2016%2F09%2F26%2Frepo


rt&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7Cdff2278857


444a8ca73108d4993a10f1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0


%7C636301922059868725&sdata=f1Le%2BFI%2B0NzcBlG5lylO20DDs3FBFEWf
GJsJxLpcbEc%3D&reserved=0


<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblog
s

.msdn.microsoft.com%2Fmatthew_van_eerde%2F2016%2F09%2F26%2Frep


ort&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7Cdff227885


7444a8ca73108d4993a10f1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C


0%7C636301922059868725&sdata=f1Le%2BFI%2B0NzcBlG5lylO20DDs3FBFEW
fGJsJxLpcbEc%3D&reserved=0>
-problems-with-logs-and-suggest-features-with-the-feedback-hub/



From: Robert Bielik <mailto:Robert.Bielik@xxxxxxxxx>
Sent: Friday, May 12, 2017 6:16 AM
To: wdmaudiodev@xxxxxxxxxxxxx <mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] FW: VAD woes on Win 10



Hi all,

I'm trying to get my VAD to work on Win 10, it is based on the old
msvad WaveCyclic example (using Portcls).

In essence the problem is that the device, named "Wave", can
change its capabilities (#channels, samplerates aso) through a
control interface. But with the new and fancy caching of
capabilities in Windows 10 (which I have no clue what the use is
for), whenever I change the caps from the first registered caps,
Sound control panel will not display the "Advanced" tab for the
device (where samplerates
are selected), thereby rendering it useless.

One way to tell Windows that the caps has changed, is through the
KSEVENTSETID_PinCapsChange event. I post this whenever I bring up
the device, but alas, Windows does not seem to requery the
capabilities. There seems to be a bug in this mechanism acc. to
these sources

(https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgi
th
u

b.com%2Feiz%2FSynchronousAudioRouter%2Fblob%2Fmaster%2FSynchron


ou&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7Cdff2278857


444a8ca73108d4993a10f1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0


%7C636301922059868725&sdata=3%2Fb7VetMM%2FYMuFNSXmQCmTy6eI2
hAQJPS0fnSyFXxv8%3D&reserved=0
sAudioRouter/control.cpp#L702) anyway.

So, the workaround seems to be to change the "Wave" name
whenever
the
caps change. So, I thought I'd make a naming scheme "Wave_XXXX"
where XXXX is a hash combination of #channels + all supported
samplerates. But if
I
do this, Sound control panel doesn't show my device at all,
probably
because
the "Wave" name that is also specified in the .inf file:
[Strings]
...
KSNAME_Wave="Wave"
KSNAME_Topology="Topology"

[DevInst.<arch>.Interfaces]



AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,DevInst.I.To
pology



AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,DevInst.I.Wave

is not matched in the driver. So, the question is, how do I
programmatically do an "AddInterface" with the "Wave_XXXX" name so
it can popup in the Sound control panel ? Or is it possible to
have AddInterface in the .inf file with a wildcard ?

Regards
/Robert

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-
request@xxxxxxxxxxxxx?subject=subscribe <mailto:wdmaudiodev-
request@xxxxxxxxxxxxx?subject=subscribe>
<mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe>
Unsubscribe:  mailto:wdmaudiodev-
request@xxxxxxxxxxxxx?subject=unsubscribe <mailto:wdmaudiodev-
request@xxxxxxxxxxxxx?subject=unsubscribe>
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:



https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.


wdmaudiodev.com%2F&data=02%7C01%7CMatthew.van.Eerde%40microsof


t.com%7Cdff2278857444a8ca73108d4993a10f1%7C72f988bf86f141af91ab2d7c


d011db47%7C1%7C0%7C636301922059868725&sdata=AZl2BlTzTf3m%2BDPlqZ
YgobkbFBW%2Bw7cS9Xk84LEV8EM%3D&reserved=0


<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.


wdmaudiodev.com%2F&data=02%7C01%7CMatthew.van.Eerde%40microsof


t.com%7Cdff2278857444a8ca73108d4993a10f1%7C72f988bf86f141af91ab2d7c


d011db47%7C1%7C0%7C636301922059868725&sdata=AZl2BlTzTf3m%2BDPlqZ
YgobkbFBW%2Bw7cS9Xk84LEV8EM%3D&reserved=0>



******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-
request@xxxxxxxxxxxxx?subject=subscribe
<mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe>
Unsubscribe:  mailto:wdmaudiodev-
request@xxxxxxxxxxxxx?subject=unsubscribe <mailto:wdmaudiodev-
request@xxxxxxxxxxxxx?subject=unsubscribe>
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:


https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.


wdmaudiodev.com%2F&data=02%7C01%7CMatthew.van.Eerde%40microsof


t.com%7Cdff2278857444a8ca73108d4993a10f1%7C72f988bf86f141af91ab2d7c


d011db47%7C1%7C0%7C636301922059868725&sdata=AZl2BlTzTf3m%2BDPlqZ
YgobkbFBW%2Bw7cS9Xk84LEV8EM%3D&reserved=0



 0   U ]  ,z  ٞ Ơzf   0vf v*z  y b  (  n +   j)m  fj b ׯ  z _ 祊 l  ,   
r .n +    ˛
m隊[h ٚ بu  z     y b  (
.n7   칻 & 2 ^  h f   0vf v*z  u ڶ  ~   +-   Q ` @ 81    i  0  fj b ׯr


 

  V v      fz  隊[h ٚ بu ߭祊 l     &ޙ         ^     -~   +-     y l   & 
R{.n +   j)m  fj
b ׯ  z _ 祊 l  ,   rۧ   r  x z      [h ٚ بu  ׫j +   zX   + DK   0   V  zm  
        ^  &
X3P2 EZu�޲Ǭ>�-��,j�j)m�fj�b�ׯ~���+-���J��r��zf���0vf�v*z�ު笵��zX���+�˛��-

Other related posts: