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.

DM3730 ISP entity problem

Other Parts Discussed in Thread: TVP5146, DM3730, AM3517

I use PSP04.02.00.07. After linux kernel 2.6.37 start. I can see ISP driver and mt9p031 finished.

In the console. I run

#ls /dev/video*

/dev/video0  /dev/video2  /dev/video4  /dev/video6  /dev/video8
/dev/video1  /dev/video3  /dev/video5  /dev/video7

 

#media-ctl -p

Opening media device /dev/media0
Enumerating entities
Found 0 entities
Enumerating pads and links
Device topology

Why "Found 0 entities" ?

 

 

  • This is bit weird to me, Can you share the bootlog here? Is your mt9p031 getting registered to media framework properly? Can you check sysfs interfaces? Is everything looks ok there? Similar to /dev/video*, do you have /dev/v4l2-subdev*?

    Thanks,

    Vaibhav

  • Deeply appreciate your reply.

    Sorry. I use media-ctl  and it show 0 entities. But I use saMmapLoopback seems correct.

    I still have two questions.

    1. Is tvp514x driver is necessary? If I only use mt9p031 camera.

    2. I am not familiar to start the capture application(yavta). When I execte the following console command.

    root@taodemo:~# yavta -f SGRBG10 -s 320x240 -n 4 --capture=100 -F /dev/video2

    It return NULL when call media_entity_remote_source because the link flag are all 0x00000000.

    In the linux kernel source/driver/media/media-entry.c

    struct media_pad *media_entity_remote_source(struct media_pad *pad)
    {
            unsigned int i;

            for (i = 0; i < pad->entity->num_links; i++) {

                    struct media_link *link = &pad->entity->links[i];

    printk("11112222 media_entity_remote_source link->flags=0x%08x\n",link->flags) ;  //my trace message
                    if (!(link->flags & MEDIA_LINK_FLAG_ENABLED))
                            continue;

                    if (link->source == pad)
                            return link->sink;

                    if (link->sink == pad)
                            return link->source;
            }

            return NULL;
    }

     

    The link->flag is 0x00000000.

    why?

     

    ##################################################################################

    root@taodemo:~# yavta -f SGRBG10 -s 320x240 -n 4 --capture=100 -F /dev/video2

    [  604.435272] 111111 isp_video_open,file=0xdefef1c0
    Device /dev/vide[  604.441040] 111111 type=vid-cap
    o2 opened: OMAP3[  604.445678] 11111 V4L2_BUF_TYPE_VIDEO_CAPTURE
     ISP CCDC output[  604.451690] 11111 isp_video_set_format,format->type=1,video->type=1
     (media).
    [  604.459716] 11111 2222 isp_video_set_format
    Video format set: width: 320 hei[  604.468566] 111111 v4l2_mmap
    ght: 240 buffer [  604.472656] 111111 v4l2_mmap
    size: 153600
    Vi[  604.477661] 111111 v4l2_mmap
    deo format: BA10[  604.481933] 111111 v4l2_mmap
     (30314142) 320x240
    4 buffers requested.
    length: 153600 offset: 0
    Buffer 0 mapped at address [  604.493988] 111111 isp_video_streamon,video=0xdee3dae8
    0x4033f000.
    len[  604.500122] 111111 __isp_video_get_format
    gth: 153600 offs[  604.505279] 11112222 media_entity_remote_source link->flags=0x00000000
    et: 155648
    Buff[  604.513580] 111111 isp_video_remote_subdev,remote=0x00000000,video=0xdee3dae8
    er 1 mapped at a[  604.523040] 111118881 isp_video_streamon
    ddress 0x4037200[  604.528381] 111111 VIDIOC_STREAMON,ret=-22
    0.

    ##################################################################################

    root@taodemo:~# saMmapLoopback
    Media: Opened Media Device
    Enumerating media entities

    [1]:OMAP3 ISP CCP2
    [2]:OMAP3 ISP CCP2 input
    [2]:OMAP3 ISP CCP2 input
    [3]:OMAP3 ISP CSI2a
    [4]:OMAP3 ISP CSI2a output
    [5]:OMAP3 ISP CCDC
    [6]:OMAP3 ISP CCDC output
    [7]:OMAP3 ISP preview
    [8]:OMAP3 ISP preview input
    [9]:OMAP3 ISP preview output
    [10]:OMAP3 ISP resizer
    [11]:OMAP3 ISP resizer input
    [12]:OMAP3 ISP resizer output
    [13]:OMAP3 ISP AEWB
    [14]:OMAP3 ISP AF
    [15]:OMAP3 ISP histogram
    [16]:mt9p031 2-0048
    Total number of entities: 16
    Enumerating links/pads for entities
    pads for entity 1=(0 INPUT) (1 OUTPUT)
    [1:1]===>[5:0]  INACTIVE

    pads for entity 2=(0 OUTPUT)
    [2:0]===>[1:0]  INACTIVE

    pads for entity 3=(0 INPUT) (1 OUTPUT)
    [3:1]===>[4:0]  INACTIVE
    [3:1]===>[5:0]  INACTIVE

    pads for entity 4=(0 INPUT)

    pads for entity 5=(0 INPUT) (1 OUTPUT) (2 OUTPUT)
    [5:1]===>[6:0]  INACTIVE
    [5:2]===>[7:0]  INACTIVE
    [5:1]===>[10:0] INACTIVE
    [5:2]===>[13:0] ACTIVE
    [5:2]===>[14:0] ACTIVE
    [5:2]===>[15:0] ACTIVE

    pads for entity 6=(0 INPUT)

    pads for entity 7=(0 INPUT) (1 OUTPUT)
    [7:1]===>[9:0]  INACTIVE
    [7:1]===>[10:0] INACTIVE

    pads for entity 8=(0 OUTPUT)
    [8:0]===>[7:0]  INACTIVE

    pads for entity 9=(0 INPUT)

    pads for entity 10=(0 INPUT) (1 OUTPUT)
    [10:1]===>[12:0]        INACTIVE

    pads for entity 11=(0 OUTPUT)
    [11:0]===>[10:0]        INACTIVE

    pads for entity 12=(0 INPUT)

    pads for entity 13=(0 INPUT)

    pads for entity 14=(0 INPUT)

    pads for entity 15=(0 INPUT)

    pads for entity 16=(0 OUTPUT)
    [16:0]===>[5:0] INACTIVE

    Enabling link [TVP514x]===>[ccdc]
    failed to enable link between TVP514x and ccdc

     

  • 1. Is tvp514x driver is necessary? If I only use mt9p031 camera.

    [Vaibhav] It is not. Thats advantage of using Media-controller framework. So you can have only mt9p031 driver.

    2. I am not familiar to start the capture application(yavta). When I execte the following console command.

    [Vaibhav] I have not used yavta in the past, but it must be doing exactly same thing what saMmapLoopback application does. Based on log, I can say that, you are not setting the link before starting your streaming application.

    As far as error from saMmapLoopback application for tvp5146 is concerned, I believe you are using DM37x Mistral EVM here? right? Are you getting any boot time error message from driver? Is tvp5146 is getting registered to media-framework? Can you check your boot log? You can also check through sysfs interface?

    Thanks,

    Vaibhav

  • Appreciate your reply.

    I found the media_ctl I download is for linux 3.1. Where can I downdowl it for linux 2.6.37?

    Yes. We are developing dm3730 evm board.At the moment,I can see wrong image in the display pannel.

    I think it is image tranformation problem. Image format from mt9p031 is SRGB and ISP is UYUV.

    I surf internet and found

    ./media-ctl -r -l '"mt9t001 3-005d":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP
    CCDC":2->"OMAP3 ISP preview":0[1], "OMAP3 ISP preview":1->"OMAP3 ISP
    resizer":0[1], "OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]'
    ./media-ctl -f '"mt9t001 3-005d":0[SGRBG10 1024x768], "OMAP3 ISP
    CCDC":2[SGRBG10 1024x767], "OMAP3 ISP preview":1[YUYV 1006x759], "OMAP3 ISP
    resizer":1[YUYV 800x600]'

     

    I can setup media link for ccdc-preview,preview-resizer.

    I know /dev/v4l2-subdev2 is for ccdc. but I do not know which sub_device is for preview,resizer and resizer output.

    I try to find it from source code from media_ctl but they are for linux 3.1. Many definitions(*.h) are different from linux 2.6.37.

     

  • Hi Vaibhav,

                I am using a AM3517 Custom Board and trying to bring up MT9T111 Camera over it, with TI SDK 04.02.00.07. I understand the video capture framework involves a TVP514x Decoder which is not available in my board.

    Any suggestions/pointers please?

     

    Regards,

    N.S.SriHarsha

  • Just use "-p" option with your media-ctl application. OR another option through which you can trace every device node is through sysfs.

    Thanks,

    Vaibhav

  • SriHarsha,

    I think we are mixing two different things here, DM37x and AM3517. I hope you understand the differences here.

    I know we did not support any sensor interface with Am3517 device with 04.02.00.07 release. We had started working on this but due to other critical things had to park it. We had submitted sensor driver to the linux-media mailing list, which should be your starting point

    Link to submission - https://lkml.org/lkml/2011/9/20/263

    You may have to port is to 2.6.37 kernel, since it has been submitted against latest and greatest community kernel.

    Thanks,

    Vaibhav

  • Vaibhav,

             Thank you for the information. I understand the topics are different, joined the conversation as it had a good base to my query.

              Can you please point to the location from where i can download the patch mentioned in https://lkml.org/lkml/2011/9/20/263.

     

    Thank You,

    N.S.SriHarsha

  • No issues, I just wanted to make sure that we both are on same page.

    Submission link is already mentioned in above post. You can also directly download the patches from patchworks - http://patchwork.linuxtv.org/project/linux-media/list/?submitter=114

     

    Thanks,

    Vaibhav