如何解决将XDMA驱动程序移植到AVStream但得到了MAGIC_STOPPED
我正在尝试将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 举报,一经查实,本站将立刻删除。