[wdmaudiodev] PcAddStreamResource IRQ question

  • From: Mike Audet <mike@xxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Mon, 16 Apr 2018 08:34:23 -0400

Hi everyone,

Does anyone know how to use the new PcAddStreamResource function to
register an IRQ?

The Interrupt stricture in PCSTREAMRESOURCE_DESCRIPTOR looks like this:

struct {
            ULONG Version;
            PVOID Generic;
} Interrupt;

I'm not sure what to assign to either Version or Generic.

I've searched online and in the archive, and I've only been able to find
sample code that relates to registering a thread.

I'm trying to make an ASIO driver more robust at a 32 sample buffer size.

Below is some code I've roughed in to my ConnectInterrupt routine.

Thanks so much!

Mike

roughed in code:

PCSTREAMRESOURCE_DESCRIPTOR_INIT(&ResourceDescriptor);
ResourceDescriptor.Pdo = DeviceExtension->PhysicalDeviceObject;
ResourceDescriptor.Type = ePcStreamResourceInterrupt;
ResourceDescriptor.Resource.Interrupt.Version = ???;//no idea at all....
ResourceDescriptor.Resource.Interrupt.Generic =
(PVOID)DeviceExtension->InterruptObject; //just a guess....is this right?
ResourceDescriptor.Resource.ResourceSet = NULL;
result = PcAddStreamResource(DeviceExtension->PhysicalDeviceObject,
NULL, &ResourceDescriptor, &DeviceExtension->irqResourceHandle);
if (!NT_SUCCESS(result))
{
       DbgPrint("Error calling PcAddStreamResource: %u", result);
}

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

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: