Re: 1394 talk/listen DMA buffer alignment requirements? by Raj
Raj
Thu Feb 17 10:53:05 CST 2005
I observed the problem you explained( Isoch complete callback not called)
in Windows 2000 SP4. SP4 is better than other service packs of 2000. I dont
know when it can happen and how to reproduce or how to solve. You can test it
by having some kind of loop with different packet sizes and different buffer
sizes.
You will observe test loop doesnot work 24 hours for Windows 2000.
I didnt observe the problem in XP SP1. Try XP and make sure it is not your
driver problem and then fight your way in 2000.
Thanks,
Raj
"Philip Lukidis" wrote:
> "Raj" <Raj@discussions.microsoft.com> wrote in message
> news:5A3DE63F-4D06-4919-85A3-85D4491B8F05@microsoft.com...
> > I am not confident on 1394 Isoch in Win 2000. In Windows XP it works fine.
> > Use data length as multiples of 4.
> >
> >
> [snip]
> Hello Raj, thanks for replying.
> Many people say so, but so far, at least with SP4 (which we require our
> clients), I did not bump into serious issues. All my lengths are quadlet
> aligned.
>
> However, (my device is an audio device), at 96k sampling I run into
> problems. On one customer's machine, WinXP SP2, talk DMA callbacks stop
> being called. Listen callbacks never stop being called. I cannot at all
> reproduce this here. Have you ever seen talk callbacks simply stop being
> called?
>
> My talk packet setup is fairly straightforward:
>
> -I allocate my talk bandwidth: 1394_header_size + data size per packet.
> -I allocate my talk channel.
> -I allocate my talk resource:
> -packet based DMA, talk based resource.
> -400 Mbps.
> -nNumberOfBuffers: x+1 number of buffers.
> -nMaxBytesPerFrame: 1394_header_size + data size.
> -nMaxBufferSize:
> nMaxBytesPerFrame*m_currentNumberOfPacketsPerTalkDescriptor.
> -no quadlets stripped.
> -I setup my x talk descriptors:
> -create the descriptors, and their buffers and MDLs. MDLs are
> created via IoAllocateMdl, and MmBuildMdlForNonPagedPool.
> -The descriptor is formatted as follows:
> -nMaxBytesPerFrame data size **(not including 1394_header
> size). This follows from the fact that
> I do not allocate buffer for the 1394 header in my
> descriptor buffer (OHCI does this I guess), and
> the docs say: "On writes, the data in the buffer is
> split into isochronous packets of this size".
> So it follows that the descriptor's
> nMaxBytesPerFrame should not include the 1394 header.
> -fulFlags: DESCRIPTOR_PRIORITY_TIME_DELIVERY for now as a
> test.
> -ulTag: 1.
> -ulLength: MmGetMdlByteCount(pMdl).
>
> If you have any idea how talk DMA can suddenly cease (i.e. talk callbacks
> stop being called, please let me know).
>
> thanks,
>
> Philip Lukidis
>
>
>