This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM6467T dual NTSC capture

Other Parts Discussed in Thread: TVP5147M1, TVP5151, TVP5150, TVP5147

I'm on to my next product generation.  Thanks to all who helped me before.

I'm currently capturing a single NTSC input (TVP5147M1), then giving it to channel 0 of a DM6467T, just like the encodedecode demo.  For my next generation, I need to add a SECOND NTSC input, and feed it into channel 1 of the same DM6467T.  I'm running Arago Linux on the DM6467T and using the Codec Engine, all like the encodedecode demo.

Note that I need to capture these two NTSC inputs simultaneously.  I'll be merging them inside the DSP.  The following is NOT my situation, but imagine it is.  Imagine I have one live image with a green poster, and another live image I want to insert into the first image's green poster.  Thus, I need to capture both NTSC inputs simultaneoulsy.

QUESTION 1: Is the V4L2 software going to handle this with without changes, or am I going to have to start beating up on that software again?  I need to make a budgetary software schedule, and I need an idea of how big a pain this is going to be!  Bottom line, does V4L2 support dual capture?

QUESTION 2: I think I may change from the TVP5147M1 to the TVP5151, mostly just to save power.  Any comments?  I find a TVP5150 driver, and I think the TVP5151 is related, so I hope it wouldn't be too difficult to upgrade.  Comments appreciated.

QUESTION 3: Any additional advice is appreciated, including advice on the structure of my soon-to-be-revised capture.c software loop.

Thanks very much,

Helmut

  • Hi,

     

    Yes, V4L2 driver for the VPIF capture does support dual SD Capture. We have two TVP5147, each connected to one of the VPIF capture channel.

    Modifying TVP5150 driver for the TVP5151 should be simple, may be some minor changes only. One more thing is you will required TVP driver to be multi-instantiable, since it is registered to two channels of VPIF.

     

    Thanks,

    Brijesh Jadav

  • Brijesh,

    Thanks for the advice.  Regarding "multi-instantiable", I'm taking that to have the same implications as (I forget the proper words) "multi-threadable".  To me, this means I have to make sure that any local data stored with respect to each instantiation must be kept separate.  The only way I've seen of doing this, you have to have at least one pointer or equivalent that comes to you from the caller, in order to go determine the appropriate copy of the local data.  

    Any advice on this?  I'm thinking the i2c_client pointer.  Looking at tvp5150.c, the only global I see is "debug", which I'll ignore.  For allocations, I find only one, inside tvp5150_probe().  I'm not familiar with all these functions, but it seems core->sd is saved into a structure by v4l2_i2c_subdev_init, and thus sd may come back to us elsewhere.

    FUNNY: This "core" structure is created and elements set, but then this structure itself is never saved or referenced again.  One element of it, sd, is.  However, it would be pretty nasty for other code to try to go "up" from it's known sd to find core.  So what's up with that?  I'm thinking those sets, such as "core->sat = 128;" do nothing.  OR ALTERNATIVELY, is kzalloc keeping track of the core it returned, and thus allowing other facilities to get at it?

    FRANKLY, I don't actually see any work to be done to make it "multi-instantiable"...  Please advise!

    Thanks,

    Helmut

  • By the way, over in board-dm646x-evm.c I see where two TVP5147's are coded, for CH0 and CH1, which I may assume are the same two capture channels I'm talking about.  I would modify board-dm646x-evm.c to create analogous structures and code for the TVP5151.

  • Hi,

     

    You will need to modify board-dm646x-evm.c file for the multiple instances of TVP5151.

     

    I would suggest to create separate device object for each instance of TVP and this device object should keep all the other objects like sd, i2c_client etc. You can store pointer to this device object in some private member of sd object so that when master driver calls api of the sub device, you will get pointer to the correct TVP device ie. instance.

     

    Thanks,

    Brijesh Jadav