Streaming Minidriver for PCI Card (CAPTURING VIDEO, PCI)

Discussion in 'Windows Vista Drivers' started by Pawel, Oct 28, 2004.

  1. Pawel

    Pawel Guest

    Hi,

    I'm looking for solution of following problem:
    How to handle PCI device that captures video in Streaming Minidriver?

    I've wrote driver for linux, I've wrote a WDM driver for Windows that
    handles PCI card properly, but I'm unable write a Streaming Minidriver
    that handles this hardware.

    I modified "TestCap" example from DDK, and as far as I understand it
    SRB_INITIALIZE_HARDWARE is corresponding to AddDevice and PnP's
    IRP_MN_START_DEVICE.

    After restart of computer, system is loaded properly, and after few
    seconds
    it reboots. I can see all my three Memory Access Ranges.
    From examples found in internet I guess that they are already mapped
    into virtual memory, is it correct?

    If I'll finish this driver, I promise to develop a decent "How to
    write WDM Capture Minidrivers for PCI boards" tutorial.

    Thank you for any help,
    Pawel


    Here is what I have added to TestCap sample SRB_INITIALIZE_HARDWARE
    handler:

    (...)

    // removed from TestCap example:
    // if (ConfigInfo->NumberOfAccessRanges != 0) {
    // DbgLogError(("Testcap: illegal config info\n"));

    // pSrb->Status = STATUS_NO_SUCH_DEVICE;
    // return (FALSE);
    // }

    DbgLogInfo(("TestCap: Number of access ranges = %lx\n",
    ConfigInfo->NumberOfAccessRanges));
    DbgLogInfo(("TestCap: Memory Range = %lx\n",
    pHwDevExt->ioBaseLocal));
    DbgLogInfo(("TestCap: IRQ = %lx\n",
    ConfigInfo->BusInterruptLevel));

    if (ConfigInfo->NumberOfAccessRanges != 0) {
    pHwDevExt->ioBaseLocal =(PULONG)(ULONG_PTR)
    (ConfigInfo->AccessRanges[0].RangeStart.LowPart);
    }

    {
    // disable all interrupts
    unsigned long *addr =
    (unsigned long*) ( ((int) pHwDevExt->ioBaseLocal) +
    0x68);
    *addr = 0;
    }
     
    Pawel, Oct 28, 2004
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.