[wdmaudiodev] Re: Are hardware peak meters supported on Windows 8?

  • From: Matthew van Eerde <Matthew.van.Eerde@xxxxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 6 Jun 2012 16:33:30 +0000

One possible cause for a return of E_INVALIDARG could indicate that there is a 
mismatch between the number of channels supported by the peak meter property 
and the number of channels in the device format (WAVEFORMATEX.nChannels).  It 
looks like from your description below that the number of channels supported by 
the peak meter is one.  How many channels are in the device format?

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Jeff Pages
Sent: Tuesday, June 5, 2012 11:24 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Are hardware peak meters supported on Windows 8?

I've since discovered mention of KSPROPERTY_AUDIO_PEAKMETER2 which, according 
to its documentation:

"The KSPROPERTY_AUDIO_PEAKMETER2 property is almost identical to the 
KSPROPERTY_AUDIO_PEAKMETER property. The KSPROPERTY_AUDIO_PEAKMETER2 property 
was introduced with Windows 8 and later operating systems to provide improved 
hardware metering of a pin topology. The legacy KSPROPERTY_AUDIO_PEAKMETER 
property has been retained for backward compatibility."

I've tried implementing a property handler for this in my driver, and
IAudioMeterInformation::QueryHardwareSupport() now shows the 
ENDPOINT_HARDWARE_SUPPORT_METER bit set. However, while in the debugger I can 
see it reading the left and right peaks and returning STATUS_SUCCESS,
IAudioMeterInformation::GetPeakValue() and
IAudioMeterInformation::GetChannelsPeakValues() both return an error value of 
0x80000057 (invalid parameter).

Curiously, when my property handler is first called,
PropertyRequest->ValueSize is 16, then it calls it again with this set 
PropertyRequest->to 4
(sizeof(LONG) as expected). Is there some undocumented behaviour here? And what 
does "**almost** identical to the KSPROPERTY_AUDIO_PEAKMETER property"
mean? What's the difference?

For the record, in the KSPROPERTY_TYPE_BASICSUPPORT call, I return the 
following in the KSPROPERTY_DESCRIPTION field:

PKSPROPERTY_DESCRIPTION PropDesc =
(PKSPROPERTY_DESCRIPTION)PropertyRequest->Value;
PropDesc->AccessFlags       = KSPROPERTY_TYPE_BASICSUPPORT |
KSPROPERTY_TYPE_GET;
PropDesc->DescriptionSize   = sizeof(KSPROPERTY_DESCRIPTION) +
                                      sizeof(KSPROPERTY_MEMBERSHEADER) +
                                        sizeof(KSPROPERTY_BOUNDS_LONG);
PropDesc->PropTypeSet.Set   = KSPROPTYPESETID_General;
PropDesc->PropTypeSet.Id    = VT_I4;
PropDesc->PropTypeSet.Flags = 0;
PropDesc->MembersListCount  = 1;
PropDesc->Reserved          = 0;

and for the KSPROPERTY_MEMBERSHEADER field,

PKSPROPERTY_MEMBERSHEADER Members = (PKSPROPERTY_MEMBERSHEADER)(PropDesc + 1);
Members->MembersFlags   = KSPROPERTY_MEMBER_RANGES;
Members->MembersSize    = sizeof(KSPROPERTY_BOUNDS_LONG);
Members->MembersCount   = 1;
Members->Flags          = 0;

and for the KSPROPERTY_BOUNDS_LONG field,

PKSPROPERTY_BOUNDS_LONG Range = (PKSPROPERTY_BOUNDS_LONG)(Members + 1);
Range->SignedMinimum = -32768;
Range->SignedMaximum = 32767;

Is there anything I'm doing wrong in this? I'm doing the same for
KSPROPERTY_AUDIO_PEAKMETER2 in the Windows 8 driver as I do for 
KSPROPERTY_AUDIO_PEAKMETER in Windows 7, which works fine.

Jeff


-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Jeff Pages
Sent: Friday, 1 June 2012 2:02 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Are hardware peak meters supported on Windows 8?

I've just installed the latest Windows 8 Release Preview, but it looks like 
hardware peak meters are still not being recognised, with 
IAudioMeterInformation::QueryHardwareSupport not setting the 
ENDPOINT_HARDWARE_SUPPORT_METER bit, and the GetPeakValue and 
GetChannelsPeakValues functions using the software-based metering instead of 
our card's peak meter nodes.

Jeff


-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Jeff Pages
Sent: Monday, 5 March 2012 2:05 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Are hardware peak meters supported on Windows 8?

Thanks Matthew. Looking at it with the debugger, it appears my peak meter 
property handler isn't being called at all in Windows 8.

Jeff


-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Matthew van Eerde
Sent: Saturday, 3 March 2012 9:52 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Are hardware peak meters supported on Windows 8?

Thank you.  We will look into this further.

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Jeff Pages
Sent: Friday, March 02, 2012 11:41 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Are hardware peak meters supported on Windows 8?

Hi Matthew,

The peak meter values are now coming from the OS.

Jeff

----- Original Message -----
From: "Matthew van Eerde" <Matthew.van.Eerde@xxxxxxxxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Saturday, March 03, 2012 4:46 AM
Subject: [wdmaudiodev] Re: Are hardware peak meters supported on Windows 8?


> Is the problem limited to QueryHardwareSupport?  Or is your peak meter 
> handler no longer getting called, and the peak meter values are now 
> coming

> from the OS?
>
> -----Original Message-----
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Jeff Pages
> Sent: Thursday, March 01, 2012 5:44 PM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Re: Are hardware peak meters supported on 
> Windows 8?
>
> The devices are our own range of sound cards 
> (http://www.innescorp.com.au/categories/72_professional_pci_sound_card
> s)
> and
> radio broadcast capture cards
> (http://www.innescorp.com.au/categories/73_radio_capture_cards). The 
> peak meter nodes support the KSPROPERTY_AUDIO_PEAKMETER and 
> KSPROPERTY_AUDIO_CPU_RESOURCES requests as per the WDK documentation 
> and, as I said, work fine on the earlier versions of Windows.
>
> Jeff
>
>
> -----Original Message-----
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Cheng-mean Liu
> (SOCCER)
> Sent: Friday, 2 March 2012 12:28 PM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Re: Are hardware peak meters supported on 
> Windows 8?
>
> That sounds like a bug to me.
>
> What audio device are you using?
>
> -----Original Message-----
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Jeff Pages
> Sent: Thursday, March 01, 2012 4:21 PM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Are hardware peak meters supported on Windows 8?
>
> Most of our cards have hardware peak meters in their topology, which 
> work fine on XP, Vista and Windows 7, but on the Windows 8 Consumer 
> Preview they are ignored, with 
> IAudioMeterInformation::QueryHardwareSupport not setting the 
> ENDPOINT_HARDWARE_SUPPORT_METER bit. Is this by design, a bug, or is 
> there some trick to making them work?
>
> Jeff
>
> ******************
>
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.com/
>
>
>
> ******************
>
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.com/
>
>
> ******************
>
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.com/
>
>
>
> ******************
>
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.com/
> 

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

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

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/



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

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

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/


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

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

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/


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

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

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/


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

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

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/



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

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

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: