[wdmaudiodev] Re: My driver doesn't work on Vista RC2!

  • From: "Jeff Pages" <jeff@xxxxxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 3 Nov 2006 16:02:08 +1100

Further to this, when I click on the Playback Devices - Properties - Advanced tab, in the debugger I see my DataRangeIntersection function being called for all the different combinations of channels, sampling rates and bit depths, but after it's finished the Default Format dropdown list is greyed out, showing just "2 channel, 16 bit 44,100 Hz" and clicking on Test produces a popup that says "Failed to play test tone". Under RC1 the list was fully populated with all the available sampling rates, and the test button worked.


If I try to do the same thing on a recording channel, it goes into an infinite loop, opening a stream, setting its state to KSSTATE_ACQUIRE, KSSTATE_PAUSE, KSSSTATE_ACQUIRE, KSSTATE_STOP then closing the stream again. This didn't happen under RC1 - everything just worked!

My DataRangeIntersection function is a direct copy from the one in the AC97 WavePCI sample in the Vista RC1 WDK.

I was also wondering if there might have been something funny with my pin descriptor tables but they all look the same as the ones in the AC97 sample.

There's obviously something about my driver that RC2 is spitting the dummy about, but I can't see it. Does anyone know what changed in the audio subsystem between RC1 and RC2 that might be causing this?

Any other suggestions perhaps?

Jeff

----- Original Message ----- From: "Jeff Pages" <barefeet@xxxxxxxxxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Thursday, November 02, 2006 7:25 PM
Subject: [wdmaudiodev] Re: My driver doesn't work on Vista RC2!


I'm not seeing any calls to my DataIntersectionHandler at all - what I outlined was the sum total of all activity.

Jeff

----- Original Message ----- From: "Eugene Muzychenko" <emuzychenko@xxxxxxxxx>
To: "Jeff Pages" <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Thursday, November 02, 2006 7:07 PM
Subject: [wdmaudiodev] Re: My driver doesn't work on Vista RC2!


Hello Jeff!

4. The stream's MappingAvailable function is called. In response I call
IPortWavePciStream::GetMapping and receive one mapping. A second call to
GetMapping returns STATUS_NOT_FOUND.
5. The stream's MappingAvailable function is called again, and in response I call IPortWavePciStream::GetMapping and receive another mapping. A second
call to GetMapping returns STATUS_NOT_FOUND.
6. The stream's RevokeMapping function is called twice, once for each of the
mappings obtained.
7. The stream's SetState function is called with state KSSTATE_ACQUIRE.
8. The stream's SetState function is called with state KSSTATE_STOP.
9. The stream object is released.

I often see such behavior under Windows 2k/XP, and under Vista RC2
too. I think some upper audio layer (kmixer, sysaudio, DirectSound and/or
MME) performs a kind of testing. A first stream is created, data
buffer IRPs are passed causing MappingAvailable to be called, then a
stream is destroyed. But next streams are created and used
successfully.

My first observation is that the call to my MappingAvailable function at
step 4 seems odd, since according to the WDK documentation, this function should only be called if a previous call to IPortWavePciStream::GetMapping
failed.

As I know, MappingAvailable is called in response to
IOCTL_KS_READ_STREAM/IOCTL_KS_WRITE_STREAM IPRs if portcls mapping
list is empty. So it is called when first data IRP is received.

I don't believe this unsolicited call to MappingAvailable is causing
the problem, but it's unexpected. If I ignore it instead of acquiring
mappings

MappingAvailable is only a notification function, no more. You may
respond by calling GetMapping or may not, it must not alter portcls
behavior.

My second observation is that the system never tries to set the stream state
to KSSTATE_RUN. Instead, after I've acquired those two mappings, it just
immediately revokes them and releases the stream.

It seems like a kind of testing.

If my calling application is using the wave API, waveOutOpen returns
MMSYSERR_ERROR. If it is a DirectSound application, everything succeeds
until I call Play on my buffer which then returns E_POINTER.

Try to protocol data intersection requests and their results. Maybe
RC2 try to open "wider" stream for kmixer than RC1 and 2k/XP.

Regards,
Eugene

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

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: