Hi,
I am a novice in writing drivers. I am trying to write WaveRT audio driver for windows 7.
I am looking at the sample code for waveRT provided with win-ddk for ac97 audio device.
I understand that the IMiniportWaveRT stream interface requires us to implement AllocateAudioBuffer method. This method allocates a memory descriptor list using the AllocateContiguousPagesForMdl(since the device in the sample code does not support scatter-gather) method of PORTWAVERTSTREAM interface, an instance of which is passed to the driver while creating a new stream. After this memory allocation succeeds, BDL(buffer descriptor list) is programmed.
I have a few questions regarding the allocation scheme of audio buffer here:
- When exactly does the AllocateAudioBuffer callback method gets called?
- When does the memory allocated in AllocateAudioBuffer method gets mapped to the user’s address space? Is it done by the miniport driver or the port driver?
Thanks,