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 encode example does not work

Other Parts Discussed in Thread: TVP5150, TVP7002, THS7303, THS7353, THS8200

hello Sir/madam,

I am using Dm6467t based EVM from spectrum digital. I have connected a CCD camera on composite input interface of board and component out at output  port.  I am getting following problem while runing encode example

Failed VIDIOC_S_FMT on /dev/video2 (Invalid argument)Failed VIDIOC_S_FMT on /dev/video2 (Invalid argument)
Error: Failed to create display device

I am not able able to run the encode demo. I have done following steps

modification in dmai_2_10_00_12/packages/ti/sdo/dmai/linux/Capture.c

const Capture_Attrs Capture_Attrs_DM6467_DEFAULT = {
    3,
    Capture_Input_COMPOSITE,
    -1,
    -1,
    -1,
    -1,
    "/dev/video0",
    FALSE,
    VideoStd_D1_PAL,//VideoStd_AUTO,   
    -1,
    ColorSpace_YUV422PSEMI,
    NULL
};

modification in dvsdk_3_10_00_19/dvsdk_demos_3_10_00_16/dm6467/encode/capture.c

/* Calculate the dimensions of a video standard given a color space */
    /*if (BufferGfx_calcDimensions(VideoStd_720P_60,
                                 ColorSpace_YUV422PSEMI, &gfxAttrs.dim) < 0)*/
    if (BufferGfx_calcDimensions(VideoStd_D1_PAL,
                                 ColorSpace_UYVY, &gfxAttrs.dim) < 0){

        ERR("Failed to calculate Buffer dimensions\n");
        cleanup(THREAD_FAILURE);
    }

    /* Calculate buffer size needed of a video standard given a color space */
    //bufSize = BufferGfx_calcSize(VideoStd_720P_60, ColorSpace_YUV422PSEMI);
    bufSize = BufferGfx_calcSize(VideoStd_D1_PAL, ColorSpace_UYVY);

    if (bufSize < 0) {
        ERR("Failed to calculate size for capture driver buffers\n");
        cleanup(THREAD_FAILURE);
    }

    /* Create a table of buffers to use with the device drivers */
    //gfxAttrs.colorSpace = ColorSpace_YUV422PSEMI;
    gfxAttrs.colorSpace = ColorSpace_UYVY;

modification in dmai_2_10_00_12/packages/ti/sdo/dmai/linux/Display.c

const Display_Attrs Display_Attrs_DM6467_VID_DEFAULT = {
    3,
    Display_Std_V4L2,
    VideoStd_720P_60,
    Display_Output_COMPONENT,
    "/dev/video2",
    0,
   ColorSpace_YUV422PSEMI
};

some modification are also done in /home//home/user/dvsdk/git/arch/arm/configs/davinci_dm646x_1ghz_defconfiguser/dvsdk/git/arch/arm/configs/davinci_dm646x_1ghz_defconfig

for decoder part
CONFIG_VIDEO_TVP514X=y
# CONFIG_VIDEO_TVP5150 is not set
#CONFIG_VIDEO_TVP7002=y
# CONFIG_VIDEO_VPX3220 is not set

for encoder part
CONFIG_VIDEO_THS7303=y
CONFIG_VIDEO_THS7353=y
CONFIG_VIDEO_THS7353_LUMA_CHANNEL=2
# CONFIG_VIDEO_ADV7343 is not set
CONFIG_VIDEO_THS8200=y

linux boot log shows as follows

Linux video capture interface: v2.00                                                                                                             
ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)                                                                                          
ths8200 1-0020: chip found @ 0x40 (DaVinci I2C adapter)                                                                                          
tvp514x 1-005d: tvp514x 1-005d decoder driver registered !!                                                                                      
vpif_capture vpif_capture: registered sub device tvp514x-0                                                                                       
tvp514x 1-005c: tvp514x 1-005c decoder driver registered !!                                                                                      
vpif_capture vpif_capture: registered sub device tvp514x-1                                                                                       
vpif_capture vpif_capture: DM646x VPIF Capture driver initialized  


there is no message for display interface.

while running DMAI_DEBUG=2 ./encode -v test.264, I get following msg

Encode demo started.                                                
@0x000259c8:[T:0x4001fcd0] ti.sdo.dmai - [Dmai] Dmai log level set to '2'. Note that calling CERuntime_init after this point maytvp514x 1-005d: t)
 cause unexpected change to DMAI tracing behavior.                                                                                               
@0x00025e6b:[T:0x413d6490] ti.sdo.dmai - [BufTab] Allocating BufTab for 8 buffers                                                                
@0x00025fbd:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 829440 at 0x413d7000 (0x8b91f000 phys)                                    
@0x000260b8:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 829440 at 0x414b8000 (0x8b83e000 phys)                                    
@0x000261c5:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 829440 at 0x41599000 (0x8b6cd000 phys)                                    
@0x000262d1:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 829440 at 0x41699000 (0x857ca000 phys)                                    
@0x000263f2:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 829440 at 0x417fc000 (0x85667000 phys)                                    
@0x0002650e:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 829440 at 0x4195f000 (0x85504000 phys)                                    
@0x00026642:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 829440 at 0x41ac2000 (0x853a1000 phys)                                    
@0x0002675b:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 829440 at 0x41c25000 (0x851df000 phys)                                    
@0x00026894:[T:0x413d6490] ti.sdo.dmai - [Capture] Composite input selected                                                                      
capture thread started                                                                                                                           
video thread started                                                                                                                             
@0x000c7733:[T:0x413d6490] ti.sdo.dmai - [Capture] Capture input set to Composite:6                                                              
@0x000c7806:[T:0x413d6490] ti.sdo.dmai - [Capture] Video input connected size 720x576 pitch 720                                                  
@0x000d71fa:[T:0x413d6490] ti.sdo.dmai - [Display] Output detected Composite                                                                     
@0x000d7292:[T:0x413d6490] ti.sdo.dmai - [Display] Output detected Component

@0x000d8a8f:[T:0x425e6490] ti.sdo.dmai - [Venc1] Creating encoder h264enc for max 1280x720 bitrate 2000000 ratectrl 4
@0x000ddd6b:[T:0x425e6490] ti.sdo.dmai - [Venc1] Setting dynParams size 1280x720 bitrate 2000000
@0x000ddf2d:[T:0x425e6490] ti.sdo.dmai - [Venc1] Made XDM_SETPARAMS control call
@0x000de118:[T:0x425e6490] ti.sdo.dmai - [BufTab] Allocating BufTab for 3 buffers
@0x000de2b3:[T:0x425e6490] ti.sdo.dmai - [Buffer] Alloc Bvpif_display vpif_display: invalid pitch
uffer of size 1382400 at 0x42e67000 (0x8501d000 phys)

@0x000de420:[T:0x425e6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x43029000 (0x84e5b000 phys)
@0x000de59d:[T:0x425e6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x431eb000 (0x84c99000 phys)
writer thread started
prev control thread started
@0x000df9c0:[T:0x43bac490] ti.sdo.dmai - [BufTab] Allocating BufTab for 2 buffers
@0x000dfbd0:[T:0x43bac490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 921600 at 0x43bad000 (0x86117000 phys)
@0x000dfdb7:[T:0x43bac490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 921600 at 0x43fa2000 (0x85d22000 phys)
codec engine opened successfuly
cpu created successfuly
@0x000e4312:[T:0x413d6490] ti.sdo.dmai - [Display] Display Output set to Component; Display Standard is set to 6
@0x000e43ce:[T:0x413d6490] ti.sdo.dmai - [Display] Video output set to size 720x576 pitch 1440 imageSize 829440
@0x000e5a8a:[T:0x413d6490] ti.sdo.dmai - [Display] Failed VIDIOC_S_FMT on /dev/video2 (Invalid argument)
Error: Failed to create display device

Rendezvous init done successfuly
hello, proceeded further
@0x000e5d94:[T:0x425e6490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x42e67000 (0x8501d000 phys)
@0x000e5f0d:[T:0x413d6490] ti.sdo.dmai - [Buffer] Free Buffer of size 829440 at 0x413d7000 (0x8b91f000 phys)
@0x000e649d:[T:0x413d6490] ti.sdo.dmai - [Buffer] Free Buffer of size 829440 at 0x414b8000 (0x8b83e000 phys)
@0x000e66cf:[T:0x413d6490] ti.sdo.dmai - [Buffer] Free Buffer of size 829440 at 0x41599000 (0x8b6cd000 phys)
@0x000e6937:[T:0x413d6490] ti.sdo.dmai - [Buffer] Free Buffer of size 829440 at 0x41699000 (0x857ca000 phys)
@0x000e6c41:[T:0x413d6490] ti.sdo.dmai - [Buffer] Free Buffer of size 829440 at 0x417fc000 (0x85667000 phys)
@0x000e6f52:[T:0x413d6490] ti.sdo.dmai - [Buffer] Free Buffer of size 829440 at 0x4195f000 (0x85504000 phys)
@0x000e727a:[T:0x413d6490] ti.sdo.dmai - [Buffer] Free Buffer of size 829440 at 0x41ac2000 (0x853a1000 phys)
@0x000e758d:[T:0x413d6490] ti.sdo.dmai - [Buffer] Free Buffer of size 829440 at 0x41c25000 (0x851df000 phys)
@0x000e7a1c:[T:0x425e6490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x43029000 (0x84e5b000 phys)
@0x000e7ddf:[T:0x425e6490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x431eb000 (0x84c99000 phys)
@0x000e8254:[T:0x43bac490] ti.sdo.dmai - [Buffer] Free Buffer of size 921600 at 0x43bad000 (0x86117000 phys)
@0x000e89fc:[T:0x43bac490] ti.sdo.dmai - [Buffer] Free Buffer of size 921600 at 0x43fa2000 (0x85d22000 phys)
post control thread started

Can someone help to solve the display driver problem.

regards & thanks
pradeep




  • Good Morning TI community,

    Its a gr8 surprise that no body could see my post... not a single TI FAE could touch this. I am seriously in need. please help.

    In addition to problem mentioned in previous post, I would like to know the bootargs for DM6467t for capturing composite video input and component video output.

    kindly look into the post and help me to resolve the issues of DM6467t related board.

     

    lots of thanks in advance.

    padeep

  • Pradeep,

    Can you confirm whether /dev/video[n] is present in your file system?

    Also, as suggested to you, please try to build and run the display only sample application, with the  desired resolution changes, and see whether that works for you or not. In case it works, you can take the same changes to your custom app.

     

  • Hi Pradeep,

     

    Log clearly tells that pitch you are trying to set is incorrect. Because of this, S_FMT ioctl is failing on the display driver. Can you please check what pitch you are trying to set? What the buffer size?

     

    Thx,

    Brijesh Jadav

  • Dear Brijesh,

     

    thanks for replying. I tried to understand the pitch funda. What I understand, pitch means number of pixel in horizontal (hpitch). Its generally taken from video format setting. That I have defined in Display.c. I do not know how to set pitch manually. Where should I write the pitch information. Can u please tell me how to define the pitch in manually.

    thanks& regards