Reply by Randy Yates June 29, 20052005-06-29
Mark Robinson <mark@simsol.co.uk> writes:

> Randy Yates wrote: >> >> When the application first starts a video capture, it calls >> GIO_submit() to obtain a buffer of data, but the function call isn't >> returning, i.e., it appears to block. The problem is, according to the >> documentation, the function should run synchronously when the last >> parameter of the function (the callback function address) is NULL, >> which it is. > > A call to GIO_submit makes a call into the driver's mdSubmitChan > function as defined in the IOM_Fxns structure for that driver. If the > submit function returns IOM_PENDING, then the GIO class driver will > block on a semaphore until the driver completes the IO packet. The > driver completes the packet (usually as a response to an interrupt, > DMA tcc, etc) by calling back into the class driver to post the > semaphore. > > If you have installed the ddk, the source for the GIO class driver > is in <install_dir>/ddk/src/class/gio and provides insight into how > the driver works. gio_sbmt.c is the source for GIO_submit and > gio_cbck.c is the callback function that the driver uses to complete > a pending packet. You can see from these functions how the > semaphore is used to block the calling thread.
Mark, Thank you so much for your response and the information. I realized a day after my post that I had the terminology wrong - "synchronous" means "blocking". It is good to hear you confirm that. I also used your tip about the GIO source code being in the DDK just today. Thanks again. --Randy -- % Randy Yates % "How's life on earth? %% Fuquay-Varina, NC % ... What is it worth?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://home.earthlink.net/~yatescr
Reply by Mark Robinson June 27, 20052005-06-27

Randy Yates wrote:
> > When the application first starts a video capture, it calls > GIO_submit() to obtain a buffer of data, but the function call isn't > returning, i.e., it appears to block. The problem is, according to the > documentation, the function should run synchronously when the last > parameter of the function (the callback function address) is NULL, > which it is.
A call to GIO_submit makes a call into the driver's mdSubmitChan function as defined in the IOM_Fxns structure for that driver. If the submit function returns IOM_PENDING, then the GIO class driver will block on a semaphore until the driver completes the IO packet. The driver completes the packet (usually as a response to an interrupt, DMA tcc, etc) by calling back into the class driver to post the semaphore. If you have installed the ddk, the source for the GIO class driver is in <install_dir>/ddk/src/class/gio and provides insight into how the driver works. gio_sbmt.c is the source for GIO_submit and gio_cbck.c is the callback function that the driver uses to complete a pending packet. You can see from these functions how the semaphore is used to block the calling thread. Cheers mark-r -- "Let's meet the panel. You couldn't ask for four finer comedians - so that answers your next question..." -- Humphrey Lyttleton
Reply by Randy Yates June 26, 20052005-06-26
I'm trying to debug a video decoder device driver on a DM642 system
that uses TI's class/IOM driver model under BIOS and in which the
class driver is GIO.

When the application first starts a video capture, it calls
GIO_submit() to obtain a buffer of data, but the function call isn't
returning, i.e., it appears to block. The problem is, according to the
documentation, the function should run synchronously when the last
parameter of the function (the callback function address) is NULL,
which it is.

Does anyone have any knowledge or experience in this area?

By the way, does anyone have a set of video port register values and
TVP5150 video decoder register values that will work when the decoder
input is NTSC and the interface operates in 8-bit BT656 mode?
-- 
%  Randy Yates                  % "And all that I can do
%% Fuquay-Varina, NC            %  is say I'm sorry, 
%%% 919-577-9882                %  that's the way it goes..."
%%%% <yates@ieee.org>           % Getting To The Point', *Balance of Power*, ELO
http://home.earthlink.net/~yatescr