3

At first, I have to admit I'm new to HW Driver development.

Supposing that user can touch/press down a hardware key(such as brightness up) on a notebook keyboard with ACPI-based brightness hot keys on Windows 8.1, the system will receive an ACPI-based notification and increase the brightness of display and Show the On Screen Display which is a vertical bar displaying the brightness level on top-left on the screen.

Now we have to initiatively raise these ACIP-based notification to let system finish increasing/decreasing the brightness of display and show the On Screen Display(client requires this OSD) on the screen when our ACPI-filter driver receives a IRP sent from our application.

First I read "Integration with hardware buttons (hot keys)" but it doesn't release how to send these "ACPI_NOTIFY_INC_BRIGHTNESS_HOTKEY" or "ACPI_NOTIFY_DEC_BRIGHTNESS_HOTKEY" in kernel-mode driver.

So I find "Supporting Display Output and ACPI Events". It indicates DxgkDdiNotifyAcpiEvent is called to notify the display miniport driver about ACPI events. I don't know whether I've misunderstood that we can initiatively call this routine to raise the ACPI_NOTIFY_INC_BRIGHTNESS_HOTKEY to let system increase the brightness and show the On Screen Display.

I think I probably cannot call DxgkDdiNotifyAcpiEvent because hardly can I construct the "PVOID MiniportDeviceContext" required by DxgkDdiNotifyAcpiEvent.

Forgive my verbose explanation for my need and my research because of my poor English...

In a word, here is the whole flow :

  1. Our app uses CreateFile to open our ACPI-Filter driver in order to communicate with it.
  2. App uses DeviceIoControl to send an Irp to ACPI-Filter driver
  3. ACPI-Filter dirver receives the Irp and raises an ACPI-based notification to tell the system to increase/decrease the brightness of display and, what is the most important, show the On Screen Display(if ACPI_NOTIFY_INC_BRIGHTNESS_HOTKEY notification successfully informs the system, there's no need to concern this need because the system will display OSD on the screen)

When it comes to Step 3, can someone tell me how to accomplish it? A sample code is the most welcome.

Or, can it be done on UMDF?

According to what I've researched, the HID report is another way to meet this need but I think I should write the HID-minifilter driver from the beginning to the end, which there is no time to let to accomplish. Most important, I'm not familiar with these module.

Keith
  • 31
  • 3
  • I found [Evaluating ACPI Control Methods Synchronously](http://msdn.microsoft.com/en-us/library/windows/hardware/ff536140(v=vs.85).aspx). Is this useful? – KFL Sep 02 '14 at 07:55

0 Answers0