[wdmaudiodev] Re: Windows Vista SP1 and 24-bit audio

  • From: "Jeff Pages" <jeff@xxxxxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 20 Jun 2008 09:53:42 +1000

Hi Daniel,

Out of curiousity I just tried changing the dwChannelMask returned by DataRangeIntersection() in one of my drivers to KSAUDIO_SPEAKER_DIRECTOUT and I still see the 24-bit modes in the playback properties under SP1.

Jeff

----- Original Message ----- From: "Daniel E. Germann" <deg@xxxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Friday, June 20, 2008 9:24 AM
Subject: [wdmaudiodev] Re: Windows Vista SP1 and 24-bit audio


Well, I *finally* figured out the problem.  If you eliminate everything
else, whatever remains must be the bug (apologies to Sir Arthur Conan
Doyle).

If the pWaveFormatEx->dwChannelMask returned by DataRangeIntersection() is
set to KSAUDIO_SPEAKER_DIRECTOUT, no 24-bit formats show up in Windows Vista
SP1, as they did in earlier OS releases (including Windows Vista RTM).

Setting pWaveFormatEx->dwChannelMask to KSAUDIO_SPEAKER_STEREO makes the
24-bit formats reappear.

The WDK docs state that, "KSAUDIO_SPEAKER_DIRECTOUT represents a
configuration with no speakers and is defined in Ksmedia.h as zero. In this configuration, the audio device renders the first channel to the first port
on the device, the second channel to the second port on the device, and so
on."
[ms-help://MS.WDK.v10.6000/Audio_r/hh/Audio_r/aud-prop_d40f094e-44f9-4baa-8a
15-03e4fb369501.xml.htm]

I don't understand why specifying that the channels on an audio device are
not associated with any particular speaker locations would make any
difference in the bit-ness of audio Windows Vista SP1 would decide to
support for the device.  This audio card is used in multi-card
configurations where the audio is definitely NOT front left and front right
-- hence, our choice to use KSAUDIO_SPEAKER_DIRECTOUT.

Can anyone at Microsoft shed some light on this new behavior? It seems like
a bug to me.

For now, I guess we'll kludge the driver to return KSAUDIO_SPEAKER_STEREO on Windows Vista systems. But it would be nice if this were fixed (or at least
explained).

Will this behavior also be present in Windows Server 2008 (i.e., does it
have the Windows Vista SP1 audio stack)?

Best regards,
-Dan
--
Dan Germann
Digital Audio Labs


-----Original Message-----
From: "Jeff Pages" <jeff@xxxxxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Windows Vista SP1 and 24-bit audio
Date: Tue, 3 Jun 2008 09:07:13 +1000

Hi Dan,

If you'd like to send me your DataRangeIntersection handler off-list I'll
cast a quick eye over it and see if I can spot anything that might be
upsetting things.

Jeff

----- Original Message ----- From: "Daniel E. Germann" <deg@xxxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Saturday, May 31, 2008 7:31 AM
Subject: [wdmaudiodev] Re: Windows Vista SP1 and 24-bit audio


Hi, Jeff.

Thanks for the quick reply!  I made sure my DataRangeIntersection handler
replied "SUCCESS" when MaximumBitsPerSample came in as 24. Unfortunately,
there must be something else going on, because all the 24-bit formats are
still missing.

I tried returning the resultant wave format with both wBitsPerSample=24
and
wValidBitsPerSample=24, and also wBitsPerSample=32 and
wValidBitsPerSample=24.  Neither did the trick.  I'm making sure to
compute
nBlockAlign and nAvgBytesPerSecond properly, and I'm updating
DataFormat.SampleSize to nBlockAlign.

The debug output looks like what I'd expect.  One example is:

DataRangeIntersection(2)
DataRangeIntersection(2)
 client range PCM 96000-96000 kHz, 24-24 bits, 2 channels
 my range         96000-96000 kHz, 16-32 bits, 2 channels
 negotiated PCM 96000 kHz, 24/32 bits, stereo

That means that with the stated pClientDataRange and pMyDataRange as
input,
the resulting WaveFormat was nSamplesPerSec=96000, wBitsPerSample=32,
wValidBitsPerSample=24, and nChannels=2, and that the return was
STATUS_SUCCESS.

But 96 kHz, 24 bits/sample does not show up in the control panel.

Like I said before, this driver is working fine on everything from Windows
2000 SP3 to Windows Vista RTM.

Can anyone from Microsoft shed any light on this?  What changes
(validation,
error checking, ???) were made in Windows Vista SP1 that might prevent
24-bit data formats from showing up in a driver that's been working until
SP1 was installed?

Best regards,
-Dan
--
Dan Germann
Digital Audio Labs


-----Original Message-----
From: "Jeff Pages" <jeff@xxxxxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Windows Vista SP1 and 24-bit audio
Date: Fri, 30 May 2008 09:16:58 +1000

Hi Dan,

I had the same problem. Check your DataRangeIntersection handler and make
sure it's not rejecting PKSDATARANGE_AUDIO requests with
MaximumBitsPerSample set to 24. Although the WDK documentation (under "PCM High Bitdepth Stream Data Range") says that MaximumBitsPerSample is set to
the container size (in this case 32 bits), Vista doesn't.

In my case it appeared that the RTM build of Vista ignored my
STATUS_NO_MATCH return, but SP1 didn't and therefore disallowed all 24-bit
formats. Once I made my DataRangeIntersection handler accept a
MaximumBitsPerSample value of 24, everything was sweet.

Jeff Pages
Innes Corporation Pty Ltd


----- Original Message ----- From: "Daniel E. Germann" <deg@xxxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Friday, May 30, 2008 7:29 AM
Subject: [wdmaudiodev] Windows Vista SP1 and 24-bit audio


We've had several customers report that after installing Windows Vista
SP1,
all the 24-bit formats disappear from the Advanced tab for our devices in
the Sound control panel.  We checked, and sure enough, all the 24-bit
formats that used to be there with RTM are gone with SP1.

Is there anything that would have changed with SP1 that would cause this?

Thanks,

-Dan
--
Dan Germann
Digital Audio Labs

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

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: