问题描述
我正在尝试将XDMA WDF驱动程序移植到AVStream以捕获1920x1080流 但是当ISR被召唤时,我总是会出现MAGIC_STOPPED矮人
EngineRingProgramDma()有什么问题吗?
void VideoPin::EngineRingProgramDma(KSSTREAM_POINTER* p_clone)
{
// Buffer allocated from AllocateCommonBuffer()
DMA_DESCRIPTOR* descriptor = (DMA_DESCRIPTOR*)_p_device->getBufVirtAdr();
PHYSICAL_ADDRESS nextDescLA = _p_device->getBufPhysAdr();
// fill descriptors
for (ULONG i = 0; i < p_clone->Offset->Count; ++i)
{
// fill Magic code to descriptor
descriptor[i].control = (0xAD4B0000 | XDMA_DESC_EOP_BIT | XDMA_DESC_COMPLETED_BIT);
descriptor[i].numBytes = p_clone->Offset->Mappings[i].ByteCount;
// source address are unused
// destination is host memory
PHYSICAL_ADDRESS dst = p_clone->Offset->Mappings[i].PhysicalAddress;
descriptor[i].dstAddrLo = dst.LowPart;
descriptor[i].dstAddrHi = dst.HighPart;
// next descriptor bus address
nextDescLA.QuadPart += sizeof(DMA_DESCRIPTOR);
descriptor[i].nextLo = nextDescLA.LowPart;
descriptor[i].nextHi = nextDescLA.HighPart;
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)