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.

How to use encodedecode example as LCD display

Hi all,

We want to use encodedecode which is in dvsdk_2_00_00_22\dvsdk_demos_2_00_00_07\dm6446 as LCD display. We had been verifed to display as COMPOSITE. How can we use encodedecode as LCD display. We have tried it at the following.

const Display_Attrs Display_Attrs_DM6446_LOGICPD_ATTR_DEFAULT = { //OSD1
    1,
    Display_Std_FBDEV,
    VideoStd_LCD_1024_768, // this is included on our source(Dmai, logicpd_encode.c).
    Display_Output_LCD,
    "/dev/fb/2",
    0
};

const Display_Attrs Display_Attrs_DM6446_LOGICPD_OSD_DEFAULT = { // OSD0
    2,
    Display_Std_FBDEV,
    VideoStd_LCD_1024_768,
    Display_Output_LCD,
    "/dev/fb/0",
    0
};

const Display_Attrs Display_Attrs_DM6446_LOGICPD_VID_DEFAULT = { // capture
    3,
    Display_Std_V4L2,
    VideoStd_LCD_1024_768,
    Display_Output_LCD,
    "/dev/video3",
    0
};

But, It isn't work. So, we want to know what is changed in source or what is important points. If it is necessary to know any information about it, request me please.

Best regard.

  • I believe that if you run encodedecode with the -h (help) option, it will give you  options for routing output to composite (analog), or component (digital interface) video outputs.  Optionally, you can read encodedecode.txt file instead of using help option.

  • Thank you for your reply.

    I have some questions.

    If we are using Display_Output_COMPONENT for digital interface, what is Display_Output_LCD? Is this analog interface?

    If we want to use 800x600 LCD, Do we have to add this resolution into device driver sources and so on?

    Thanks and BR.

  • Thank you for your reply.

     

    I have some questions.

    If we are using Display_Output_COMPONENT for digital interface, what is Display_Output_LCD? Is this analog interface?

    If we want to use 800x600 resolution new LCD, Do we have to add this resolution into device driver sources and so on?

     

    And,  We have verifed 640x480 with just back screen. we changed something for this as the follwoing.

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    [Main.c]

    #if 0 //_sejin_lic_ : 20091021 [ 1 -> origianl, 0 -> modified for LCD
    #define DEFAULT_ARGS {Display_Output_COMPOSITE, VideoStd_D1_NTSC, "D1 NTSC", \
                           -1, Capture_Input_COMPOSITE, TRUE, FALSE, \
                           FOREVER, FALSE, FALSE, FALSE, 0, 0 }
    #else
    #define DEFAULT_ARGS { Display_Output_LCD, VideoStd_VGA, "VGA", \
                              -1, Capture_Input_COMPOSITE, TRUE, FALSE, \
                              FOREVER, FALSE, FALSE, FALSE, 0, 0 }

    #endif //_sejin_lic_ : 20091021 ]

     

    [Display.c]

    //_sejin_lic_20091020 [
    const Display_Attrs Display_Attrs_DM6446_LOGICPD_ATTR_DEFAULT = { // OSD1
        1,
        Display_Std_FBDEV,
        VideoStd_VGA,
        Display_Output_LCD,
        "/dev/fb/0",
        0
    };

    const Display_Attrs Display_Attrs_DM6446_LOGICPD_OSD_DEFAULT = { // OSD0
        2,
        Display_Std_FBDEV,
        VideoStd_VGA,
        Display_Output_LCD,
        "/dev/fb/1",
        0
    };

    const Display_Attrs Display_Attrs_DM6446_LOGICPD_VID_DEFAULT = { // display
        3,
        Display_Std_V4L2,
        VideoStd_VGA,
        Display_Output_LCD,
        "/dev/video0",
        0
    };
    //_sejin_lic_20091020 ]

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    And the following is logs

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    root@192.168.0.243:/opt/dm6446# DMAI_DEBUG=2 ./encodedecode -o <------------------------------------------------------------------------ (1)
    ---> + main()
    ---> parseArgs()
    Encodedecode demo started.
    ---> GTMask.moName ((null))
    @0x000886cd:[T:0x4001f930] ti.sdo.dmai - [Dmai] Dmai log level set to '2'. Note that calling CERuntime_init after this point may cause unexpected change to DMAI tracing behavior.
    ---> + uiSetup()
    ---> + UI_create()
    ---> UIButtons_createButtons()
    [k]--->mode : 640x480
    ---> + - Display[k]--->mode : 640x480
    _create() : DispMUX: initialized GPIO46_47
    lay_fbdev_createMUX: initialized GPIO0

    ---> + DisplayMUX: initialized RGB666
    MUX: initialized LOEEN

    ---> Display De[k]--->mode : 640x480
    vice = /dev/fb/0MUX: initialized GPIO46_47

    ---> + _DisplaMUX: initialized GPIO0
    y_sysfsSetup()
    MUX: initialized RGB666
    ---> FileName = MUX: initialized LOEEN
    /sys/class/davinci_display/ch0/output), output = LCD
    ---> _Dmai_writeSysFs() : valString(LCD), val(LCD)
    ---> FileName(/sys/class/davinci_display/ch0/mode), mode = 640x480
    --[k]--->mode : 640x480
    -> _Dmai_writeSy[k]--->mode : 640x480
    sFs() : valStrinMUX: initialized GPIO46_47
    g(640x480), val(MUX: initialized GPIO0
    640x480)
    ---> -MUX: initialized RGB666
     _Display_sysfsSMUX: initialized LOEEN
    etup()
    @0x000f4[k]--->mode : 640x480
    c32:[T:0x4001f93MUX: initialized GPIO46_47
    0] ti.sdo.dmai -MUX: initialized GPIO0
     [Display] DisplMUX: initialized RGB666
    ay Device = /devMUX: initialized LOEEN
    /fb/0
    width=640, height=480, virtual=480
    @0x000f4e8f:[T:0x4001f930] ti.sdo.dmai - [BufTab] Allocating BufTab for 1 buffers
    @0x000f504e:[T:0x4001f930] ti.sdo.dmai - [Buffer] Set user pointer 0x42449000 (physical 0x80600000)
    @0x000f642e:[T:0x4001f930] ti.sdo.dmai - [Display] Display buffer 0 mapped to 0x42449000 has physical address 0
    ---> - Display_fbdev_create()
    ---> Fisrt Display_create() is completed
    ---> + - Display_create() : Display_fbdev_create
    ---> + Display_fbdev_create()
    ---> Display Device = /dev/fb/1
    ---> + _Display_sysfsSetup()
    ---> FileName = /sys/class/davinci_display/ch0/output), output = LCD
    ---> _Dmai_writeSysFs() : valString(LCD), val(LCD)
    ---> FileName(/sys/class/davinci_display/ch0/mode), mode = 640x480
    ---> _Dmai_writeSysFs() : valString(640x480), val(640x480)
    ---> - _Display_sysfsSetup()
    @0x00101ea6:[T:0x4001f930] ti.sdo.dmai - [Display] Display Device = /dev/fb/1
    width=640, height=480, virtual=960
    @0x00102127:[T:0x4001f930] ti.sdo.dmai - [BufTab] Allocating BufTab for 2 buffers
    @0x00102330:[T:0x4001f930] ti.sdo.dmai - [Buffer] Set user pointer 0x424fc000 (physical 0x87000000)
    @0x00107bf9:[T:0x4001f930] ti.sdo.dmai - [Display] Display buffer 0 mapped to 0x424fc000 has physical address 0
    @0x00107d0b:[T:0x4001f930] ti.sdo.dmai - [Buffer] Set user pointer 0x425ec000 (physical 0x870f0000)
    @0x0010d53c:[T:0x4001f930] ti.sdo.dmai - [Display] Displ[k]--->mode : 640x480
    ay buffer 1 mapp[k]--->mode : 640x480
    ed to 0x425ec000MUX: initialized GPIO46_47
    , physical addreMUX: initialized GPIO0
    ss 0
    ---> - DisMUX: initialized RGB666
    play_fbdev_creatMUX: initialized LOEEN
    e()
    ---> Second[k]--->mode : 640x480
     Display_create(MUX: initialized GPIO46_47
    ) is completed
    MUX: initialized GPIO0
    ---> - UI_createMUX: initialized RGB666
    ()
    ERR: Png_shoMUX: initialized LOEEN
    w() not supporting image color format
    ERR: Png_show() not supporting image color format <----------------------------------------------------------------------------- (2)
    ERR: Png_show() not supporting image color format
    ERR: Png_show() not supporting image color format
    ERR: Text_show() not supporting image color format
    Error: Failed to show text
    ---> - uiSetup()
    ---> + displayThrFxn()
    ---> + - Display_create() : Display_v4l2_create
    ---> + Display_v4l2_create()
    ---> Display Device = /dev/video0
    ---> + _Display_sysfsSetup()
    ---> FileName = /sys/class/davinci_display/ch0/output), output = LCD
    ---> _Dmai_writeSysFs() : valString(LCD), val(LCD)
    ---> FileName(/sys/class/davinci_display/ch0/mode), mode = 640x480
    ---> _Dmai_writeSysFs() : valString(640x480), val(640x480)
    ---> - _Display_sysfsSetup()
    @0x00129fa0:[T:0x42edb490] ti.sdo.dmai - [Display] Failed to detemine video display format on Invalid argument <------------------------------------------------------------------------ (3)
    ---> Display_create() is completed
    Error: Failed to create display device
    ---> cleanup
    ---> captureThrFxn()
    @0x0012f5ed:[T:0x436db490] ti.sdo.dmai - [Capture] Checking video standard
    @0x00135cef:[T:0x436db490] ti.sdo.dmai - [Capture] Capture input set to COMPOSITE
    ---> videoThrFxn()
    @0x0013632b:[T:0x43edb490] ti.sdo.dmai - [BufTab] Allocating BufTab for 4 buffers
    @0x001364f5:[T:0x43edb490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 691200 at 0x43edc000 (0x87965000 phys)
    @0x001366e1:[T:0x43edb490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 691200 at 0x43fa7000 (0x87a30000 phys)
    @0x0013687c:[T:0x43edb490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 691200 at 0x44072000 (0x87afb000 phys)
    @0x00136a52:[T:0x43edb490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 691200 at 0x4413d000 (0x87bc6000 phys)
    @0x0013b529:[T:0x436db490] ti.sdo.dmai - [Capture] Checking video standard
    @0x00141e8c:[T:0x436db490] ti.sdo.dmai - [Capture] Capture input set to COMPOSITE
    @0x00141fa8:[T:0x436db490] ti.sdo.dmai - [Capture] Video input connected size 720x480 pitch 1440
    @0x001420a8:[T:0x436db490] ti.sdo.dmai - [BufTab] Allocating BufTab for 3 buffers
    @0x00142274:[T:0x436db490] ti.sdo.dmai - [Buffer] Set user pointer 0x44208000 (physical 0x87300000)
    @0x00146170:[T:0x436db490] ti.sdo.dmai - [Dmai] Driver buffer 0 mapped to 0x44208000 has physical address 0x87300000
    @0x00146330:[T:0x436db490] ti.sdo.dmai - [Buffer] Set user pointer 0x442e0000 (physical 0x80a00000)
    @0x0014a1d7:[T:0x436db490] ti.sdo.dmai - [Dmai] Driver buffer 1 mapped to 0x442e0000 has physical address 0x80a00000
    @0x0014a3d2:[T:0x436db490] ti.sdo.dmai - [Buffer] Set user pointer 0x443b8000 (physical 0x80f00000)
    @0x0014e1f3:[T:0x436db490] ti.sdo.dmai - [Dmai] Driver buffer 2 mapped to 0x443b8000 has physical address 0x80f00000
    @0x001526f8:[T:0x436db490] ti.sdo.dmai - [Framecopy] Configuring resizer to copy image of resolution 720x480
    ---> - displayThrFxn()
    @0x0015741b:[T:0x43edb490] ti.sdo.dmai - [Buffer] Free Buffer of size 691200 at 0x43edc000 (0x87965000 phys)
    @0x00157873:[T:0x43edb490] ti.sdo.dmai - [Buffer] Free Buffer of size 691200 at 0x43fa7000 (0x87a30000 phys)
    @0x00157cd9:[T:0x43edb490] ti.sdo.dmai - [Buffer] Free Buffer of size 691200 at 0x44072000 (0x87afb000 phys)
    @0x00158139:[T:0x43edb490] ti.sdo.dmai - [Buffer] Free Buffer of size 691200 at 0x4413d000 (0x87bc6000 phys)
    ---> - main()

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    (1) We had tried OSD.

    (2) "ERR: Png_show() not supporting image color format" was launched. what is mean?

    (3) "[Display] Failed to detemine video display format on Invalid argument" was launched, I don't understand what is mean? Why is "Invalid argument"? 

     

    Would you like give me some advice?

    Thanks and BR.