summaryrefslogtreecommitdiff
path: root/avstream/avshws/device.cpp
diff options
context:
space:
mode:
authorJoel Corley <[email protected]>2018-12-11 17:43:11 -0800
committerJoel Corley <[email protected]>2018-12-11 17:43:11 -0800
commit5a1b50c6e9a3297a96a3f7a5cfa35410ce5e57b7 (patch)
tree00094c46f533c38a4b716b5532758bb20d3c744e /avstream/avshws/device.cpp
parent9d23d436df72766a24a4791acd916c7faf106d48 (diff)
Remove broken X86-specific DMA code.
Add project support for ARM & ARM64 targets.
Diffstat (limited to 'avstream/avshws/device.cpp')
-rw-r--r--avstream/avshws/device.cpp82
1 files changed, 0 insertions, 82 deletions
diff --git a/avstream/avshws/device.cpp b/avstream/avshws/device.cpp
index 93376be4..44fc9704 100644
--- a/avstream/avshws/device.cpp
+++ b/avstream/avshws/device.cpp
@@ -343,88 +343,6 @@ Return Value:
delete m_HardwareSimulation;
}
}
-#if defined(_X86_)
- //
- // DMA operations illustrated in this sample are applicable only for 32bit platform.
- //
- INTERFACE_TYPE InterfaceBuffer;
- ULONG InterfaceLength;
- DEVICE_DESCRIPTION DeviceDescription;
-
- if (NT_SUCCESS (Status)) {
- //
- // Set up DMA...
- //
- // Ordinarilly, we'd be using InterfaceBuffer or
- // InterfaceTypeUndefined if !NT_SUCCESS (IfStatus) as the
- // InterfaceType below; however, for the purposes of this sample,
- // we lie and say we're on the PCI Bus. Otherwise, we're using map
- // registers on x86 32 bit physical to 32 bit logical and this isn't
- // what I want to show in this sample.
- //
- //
- // NTSTATUS IfStatus =
-
- IoGetDeviceProperty (
- m_Device -> PhysicalDeviceObject,
- DevicePropertyLegacyBusType,
- sizeof (INTERFACE_TYPE),
- &InterfaceBuffer,
- &InterfaceLength
- );
-
- //
- // Initialize our fake device description. We claim to be a
- // bus-mastering 32-bit scatter/gather capable piece of hardware.
- //
- DeviceDescription.Version = DEVICE_DESCRIPTION_VERSION;
- DeviceDescription.DmaChannel = ((ULONG) ~0);
- DeviceDescription.InterfaceType = PCIBus;
- DeviceDescription.DmaWidth = Width32Bits;
- DeviceDescription.DmaSpeed = Compatible;
- DeviceDescription.ScatterGather = TRUE;
- DeviceDescription.Master = TRUE;
- DeviceDescription.Dma32BitAddresses = TRUE;
- DeviceDescription.AutoInitialize = FALSE;
- DeviceDescription.MaximumLength = (ULONG) -1;
-
- //
- // Get a DMA adapter object from the system.
- //
- m_DmaAdapterObject = IoGetDmaAdapter (
- m_Device -> PhysicalDeviceObject,
- &DeviceDescription,
- &m_NumberOfMapRegisters
- );
-
- if (!m_DmaAdapterObject) {
- Status = STATUS_UNSUCCESSFUL;
- }
-
- }
-
- if (NT_SUCCESS (Status)) {
- //
- // Initialize our DMA adapter object with AVStream. This is
- // **ONLY** necessary **IF** you are doing DMA directly into
- // capture buffers as this sample does. For this,
- // KSPIN_FLAG_GENERATE_MAPPINGS must be specified on a queue.
- //
-
- //
- // The (1 << 20) below is the maximum size of a single s/g mapping
- // that this hardware can handle. Note that I have pulled this
- // number out of thin air for the "fake" hardware.
- //
- KsDeviceRegisterAdapterObject (
- m_Device,
- m_DmaAdapterObject,
- (1 << 20),
- sizeof (KSMAPPING)
- );
-
- }
-#endif
}
return Status;