How to set physical device location in AVStream minidriver

I have a virtual avstream minidriver.
my questions are:

  1. should a virtual driver specify the device location?
  2. For setting device location doing the following works but prevents the
    rotation functionality from working (but uses a fixed 0 rotation when
    setting no value. ). I need to set the physical device location and
    looking for a better way.

ACPI_PLD_BUFFER buf = { 0 };
buf.Revision = 0x2;
buf.Panel = panel;
PWSTR psymName = NULL;
IoGetDeviceInterfaces(&deviceGuid
,PhysicalDeviceObject,DEVICE_INTERFACE_INCLUDE_NONACTIVE,&psymName);
if (NT_SUCCESS(res) && (NULL != psymName))
{
RtlInitUnicodeString(&symbolicName, psymName);
res = IoSetDeviceInterfacePropertyData(&symbolicName,
&DEVPKEY_Device_PhysicalDeviceLocation,
LOCALE_NEUTRAL, PLUGPLAY_PROPERTY_PERSISTENT,
DEVPROP_TYPE_BINARY, sizeof(ACPI_PLD_BUFFER), (PVOID)&buf);
}

NtDev mm wrote:

I have a virtual avstream minidriver.
my questions are:

  1. should a virtual driver specify the device location?
  2. For setting device location doing the following works but prevents
    the rotation functionality from working (but uses a fixed 0 rotation
    when setting no value. ).

ACPI_PLD_BUFFER buf = { 0 };
buf.Revision = 0x2;
buf.Panel = panel;

A virtual device does not have a device location, nor does it need one.
I’m confused as to why you are using an ACPI structure here. How does
your PDO get created? Are you software-enumerated (ROOT\xxx or SW\xxx),
or are you triggered by a custom entry in an ACPI DSDT?

If you are software-enumerated, then you don’t need a physical location,
and you shouldn’t try to invent one. If you are ACPI-enumerated, then
you not really a “virtual driver” – you are driving an ACPI device.

I need to set the physical device location and looking for a better way.

Why do you need to set it? Who cares?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.