[wdmaudiodev] Re: Windows APO Format Negotiation IsInputSupported continues to offer rejected 96k sample rate

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 9 Nov 2018 20:12:42 +0000

I didn’t know the answer so I asked dev – this is what they said

An APO cannot influence the format with which the endpoint runs. If the APO is 
shipping with the device, it needs to support all the formats supported by the 
device. So he can either:

-          Ensure that the device only supports 44.1 or 48

-          Add support to 96K to his APO

-          Add resampling support into his APO so that he can continue to 
process in 48 or 44.1, but resample back to 96K before outputting audio data.

I will add that resampling is very expensive, whether it is done inside the APO 
or outside, so bear performance considerations in mind.

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Culann mac Cabe <culann@xxxxxxxxxx>
Sent: Friday, November 9, 2018 8:35:01 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Windows APO Format Negotiation IsInputSupported 
continues to offer rejected 96k sample rate

Hello wdmaudiodev!

I am developing an APO Driver, specifically an "LFX" APO (I need to be 
compatible with Win7).  The key points of this APO are:

  *
  *   I am using WDK 10.1.17.110
  *   My APO is registered with APO_FLAG_FRAMESPERSECOND_MUST_MATCH | 
APO_FLAG_BITSPERSAMPLE_MUST_MATCH
  *   DSP processing of multiple channels in to produce 2 out.
  *   I make calls to a DSP library which runs at 44.1k or 48k
  *   The USB heaphone I am targetting runs at 96k

I am finding unusual behaviours in relation to IsInputFormatSupported() 
compared to what I have read in the MS documentation.  Simply put, I have 
implemented IsInputFormatSupported() as follows:

  *   I return S_FALSE if the input channel count is not what I suuprt, and I 
suggest 2
  *   I return S_FALSE if the input sample rate is not 44.1k or 48k, and I 
suggest 48k

According to the documentation, given that my output format is 96k, I would 
expect to be presented with 96k to start with and then, after I reject that and 
suggest 48k I would expect to be offered 48k, which I would accept and then 
we'd all happily move to LockForProcess().

However, what I am finding (on my Win 10 PC) is that Windows repeatedly offers 
me 96k and then, after I reject it, gives up, disabling my APO.

I have 2 questions:

  1.  Does anyone have any tips or observations on my scenario as described 
above
  2.  I override IsOutputFormatSupported() in my APO but note that it is never 
called - is this expected and, if so, can I just get rid of the overrride?

Thanks!
Culann

Other related posts: