Re: AVStream: DMA & Process() QUEUEing

From: Max Paklin (mpaklin_at_hotmail.com)
Date: 05/26/04


Date: Wed, 26 May 2004 13:09:19 -0700

It hurts your brain does it? They (MS) should've found a simple way to
describe what they do.
All those queues. In some cases I wish they gave me a way to NOT use their
queueing at all. Otherwise what I end up doing is creating my own queue
anyway (I need it!) and doing a lot of dancing around KS queue, which does
not good but annoys me.

This is how I understand KS queueing mechanism.
KS has a queue per pin. The queue can be in two states - empty or not empty.

You can tell KS to call your Process() dispatch entry point

1. when a frame is about to be queued and the queue is empty (default
behavior)

2. when a frame is about to be queued and the queue in NOT empty
(KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL)

3. never _automatically_ call your Process().
This is a special case when you don't want to see any processing unless you
specifically ask for it by calling KsPinAttemptProcessing(). Then - and only
then - your Process() will be called.
Use KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING for that.

-- Max.

"WDD" <anonymous@microsoft.com> wrote in message
news:u0qP%23c1QEHA.2876@TK2MSFTNGP09.phx.gbl...
> "Without specifying this flag of KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING,
> the process dispatch is only called when data arrives into a previously
> empty queue."
>
>
> Does this not mean???
>
> If you do NOT specify the flag
> KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING,(which I do NOT) the process
> dispatch is only called when data arrives into a previously empty queue.
>
>
>
>
> Max Paklin wrote:
> >>What I was getting at was that the Flag
> >>(KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL) states that the
> >>process dispatch is only called when data arrives into a previously
> >>empty queue.
> >
> >
> > Which DDK are you reading?
> > Mine says
> > "Indicates that processing should occur every time a data frame arrives
into
> > the queue. Without specifying this flag of
> > KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING, the process dispatch is only
called
> > when data arrives into a previously empty queue."
> >
> > When you specify KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL
processing
> > takes places every time a frame is queued.
> >
> >
> >
> >
> >>How can the QUEUE be empty when I have cloned stream pointers on a
Frames?
> >>
> >>Cloning increases the reference count of the Frame thus not allowing the
> >>frame to be cancelled, thus ensuring that the QUEUE is not empty.
> >
> >
> > It is NOT empty.
> > You misinterpreted KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL flag.
> > To get what you want you have to __NOT__ specify
> > KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL and __NOT__ specify
> > KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING on your pin.
> >
> >
> >
> >
> >>Put in what you mentioned to return STATUS_PENDING but just wondering
> >>why I get the second call to Process().
> >
> >
> > Because you asked for it. You get notified each time a frame is inserted
in
> > the queue.
> >
> > -- Max.
> >
> >



Relevant Pages

  • Re: Keyboard stops working after *lock [Was: 2.6.21-rc2-mm1]
    ... Periodic load table ... Skel QH link element ... queue is empty ...
    (Linux-Kernel)
  • Re: AVStream: DMA & Process() QUEUEing
    ... But If my DMA is not complete, I have clones referencing frames, does ... this not mean that the QUEUE is not empty? ... > In that case your Processroutine will be called when there is a frame ...
    (microsoft.public.development.device.drivers)
  • Re: Block-ram FIFO in Xilinx
    ... In a BlockRAM implementation, this does not make any sense, for width ... Remember, excessive depth or width has no impact, as long as the FIFO ... reliable generation of the Full and Empty flags at high clock rates. ... I would like to use the queue with different sizes of the data bus. ...
    (comp.arch.fpga)
  • Re: Do I need a RTOS?
    ... Avail slots are by nature empty correct? ... in the avail queue, as I earlier defined them to be. ... head-pointers are equal to each other, the avail-queue is full and the ... decide to execute them is another issue. ...
    (comp.arch.embedded)
  • Re: Oops in UHCI when encountering "host controller process error"
    ... the DMA pool allocations are all messed up. ... Skel QH link element ... queue is empty ...
    (Linux-Kernel)