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.

capture question

hi TI-friends,

DM8168.

Our board has 8ch analog input. 

after testing several days, the analog preview is gone, and we try to print the statistic as below

videoSourceStatus.numChannels 8
DEMO: 0: No video detected at CH [0,0] !!!
DEMO: 1: Detected video at CH [0,1] (720x240@59Hz, 1)!!!
DEMO: 2: Detected video at CH [0,2] (720x240@59Hz, 1)!!!
DEMO: 3: Detected video at CH [0,3] (720x240@59Hz, 1)!!!
DEMO: 4: Detected video at CH [0,4] (720x240@59Hz, 1)!!!
DEMO: 5: Detected video at CH [0,5] (720x240@59Hz, 1)!!!
DEMO: 6: Detected video at CH [0,6] (720x240@59Hz, 1)!!!
DEMO: 7: Detected video at CH [0,7] (720x240@59Hz, 1)!!!

[m3vpss ]
[m3vpss ] *** Capture Driver Advanced Statistics ***
[m3vpss ]
[m3vpss ] VIP Parser Reset Count : 0
[m3vpss ]
[m3vpss ] | Total Even Odd Total Even Odd Min / Max Min / Max Dropped Fid Repeat Frame Error Y/C
[m3vpss ] CH | Fields Fields Fields FPS FPS FPS Width Height Fields Count (Desc Error Y/C)
[m3vpss ] ------------------------------------------------------------------------------------------------------------
[m3vpss ] 000 | 1 1 0 0 0 0 65535 / 0 65535 / 0 1 0 0/0 (0/0)
[m3vpss ] 001 | 1 1 0 0 0 0 65535 / 0 65535 / 0 1 0 0/0 (0/0)
[m3vpss ] 002 | 1 1 0 0 0 0 65535 / 0 65535 / 0 1 0 0/0 (0/0)
[m3vpss ] 003 | 1 1 0 0 0 0 65535 / 0 65535 / 0 1 0 0/0 (0/0)
[m3vpss ] 100 | 1 1 0 0 0 0 65535 / 0 65535 / 0 1 0 0/0 (0/0)
[m3vpss ] 101 | 1 1 0 0 0 0 65535 / 0 65535 / 0 1 0 0/0 (0/0)
[m3vpss ] 102 | 1 1 0 0 0 0 65535 / 0 65535 / 0 1 0 0/0 (0/0)
[m3vpss ] 103 | 1 1 0 0 0 0 65535 / 0 65535 / 0 1 0 0/0 (0/0)
[m3vpss ]
[m3vpss ] VIP Capture Port 0 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMissMatch3 = 0
[m3vpss ] VIP Capture Port 1 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMissMatch3 = 0
[m3vpss ]
[m3vpss ] *** Capture List Manager Advanced Statistics ***
[m3vpss ]
[m3vpss ] List Post Count : 328563
[m3vpss ] List Stall Count : 0
[m3vpss ] List Post Time (ms) : Max = 1, Min = 0, Avg = 0, Total = 2
[m3vpss ] INTC Timeout Count : (0, 0) (Min timeout value = 971, 988)
[m3vpss ] Descriptor miss found count : 0
[m3vpss ]
[m3vpss ]
[m3vpss ] VIP and VPDMA registers,
[m3vpss ] VIP0 : FIQ_STATUS : 0x4810551c = 0x00000000
[m3vpss ] VIP1 : FIQ_STATUS : 0x48105a1c = 0x00000000
[m3vpss ] VPDMA: LIST_BUSY : 0x4810d00c = 0x000e0000
[m3vpss ]
[m3vpss ]
[m3vpss ] 1329067: CAPTURE: Fields = 0 (fps = 0, CPU Load = 0)
[m3vpss ] 1329067: CAPTURE: Num Resets = 0 (Avg 0 ms per reset)
[m3vpss ] 1329067: SYSTEM : FREE SPACE : System Heap = 5848 B, Mbx = 10239 msgs)
[m3vpss ] 1329067: SYSTEM : FREE SPACE : SR0 Heap = 10811648 B (10 MB)
[m3vpss ] 1329067: SYSTEM : FREE SPACE : Frame Buffer = 786217088 B (749 MB)
[m3vpss ] 1329067: SYSTEM : FREE SPACE : Bitstream Buffer = 198834944 B (189 MB)
[m3vpss ] 1329068: SYSTEM : FREE SPACE : Tiler 8-bit = 89128960 B (85 MB) - TILER ON
[m3vpss ] 1329069: SYSTEM : FREE SPACE : Tiler 16-bit = 44040192 B (42 MB) - TILER ON
[m3vpss ]
[m3vpss ] *** [DEI0 ] DEI Statistics ***
[m3vpss ]
[m3vpss ] Elasped Time : 1318 secs
[m3vpss ] Total Fields Processed : 0
[m3vpss ] Total Fields FPS : 0 FPS
[m3vpss ]
[m3vpss ]
[m3vpss ] CH | In Recv In Reject In Process Out[0] Out[1] Out[2] Out[3] Out[4] Skip Out[0] Skip Out[1] Skip Out[2] Skip Out[3] Skip Out[4] User Out[0] User Out[1] User Out[2] User Out[3] User Out[4] Latency
[m3vpss ] Num | FPS FPS FPS FPS FPS FPS FPS FPS FPS FPS FPS FPS FPS Skip FPS Skip FPS Skip FPS Skip FPS Skip FPS Min / Max
[m3vpss ] -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[m3vpss ] 0 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 / 0
[m3vpss ] 1 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 / 0
[m3vpss ] 2 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 / 0
[m3vpss ] 3 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 / 0
[m3vpss ] 4 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 / 0
[m3vpss ] 5 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 / 0
[m3vpss ] 6 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 / 0
[m3vpss ] 7 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 / 0

It looks like there's no captured video frame. We plug the source into TV and can see video.

Q1.  Any further idea ??

one more question is I try to use i2cset to test something in ADC, but it looks like only dvr_rdk_demo_mcfw_api.out can control i2c.

Q2.  How did I control I2C bus at the same time??

  • As you mentioned capture VIP has stopped receiving frames. Check your external video decoder if it is working correctly.

    i2c handle will be opened to control TVP in dvr_rdk demo but this should not prevent any other application from using i2c. Use strace to determine what exactly is failing when you try to use i2c

  • hi Badri,

    thanks for your reply.  By using strace, I got following messages. could you help confirm the root cause ??

    /mnt/APPS# i2cget 1 0x28 0x40
    WARNING! This program can confuse your I2C bus, cause data loss and worse!
    I will read from device file /dev/i2c-1, chip address 0x28, data address
    0x40, using read byte data.
    Continue? [Y/n] y
    0x01
    /mnt/APPS # i2cset 1 0x28 0x40 0x0
    WARNING! This program can confuse your I2C bus, cause data loss and worse!
    I will write to device file /dev/i2c-1, chip address 0x28, data address
    0x40, data 0x00, mode byte.
    Continue? [Y/n] y
    /mnt/APPS # i2cget 1 0x28 0x40
    WARNING! This program can confuse your I2C bus, cause data loss and worse!
    I will read from device file /dev/i2c-1, chip address 0x28, data address
    0x40, using read byte data.
    Continue? [Y/n] y
    0x01
    /mnt/APPS # ./strace i2cset 1 0x28 0x40 0x0
    execve("/usr/sbin/i2cset", ["i2cset", "1", "0x28", "0x40", "0x0"], [/* 9 vars */]) = 0
    brk(0) = 0x13000
    uname({sys="Linux", node="(none)", ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aab5000
    access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/lib/tls/v7l/fast-mult/half/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/tls/v7l/fast-mult/half", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/tls/v7l/fast-mult/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/tls/v7l/fast-mult", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/tls/v7l/half/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/tls/v7l/half", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/tls/v7l/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/tls/v7l", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/tls/fast-mult/half/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/tls/fast-mult/half", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/tls/fast-mult/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/tls/fast-mult", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/tls/half/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/tls/half", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/tls/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/tls", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/v7l/fast-mult/half/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/v7l/fast-mult/half", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/v7l/fast-mult/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/v7l/fast-mult", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/v7l/half/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/v7l/half", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/v7l/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/v7l", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/fast-mult/half/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/fast-mult/half", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/fast-mult/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/fast-mult", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/half/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat64("/lib/half", 0x7e926410) = -1 ENOENT (No such file or directory)
    open("/lib/libgcc_s.so.1", O_RDONLY) = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0x'\0\0004\0\0\0"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0777, st_size=48472, ...}) = 0
    mmap2(NULL, 79984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ab34000
    mprotect(0x2ab40000, 28672, PROT_NONE) = 0
    mmap2(0x2ab47000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0x2ab47000
    close(3) = 0
    open("/lib/libc.so.6", O_RDONLY) = 3
    read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\240Q\1\0004\0\0\0"..., 512) = 512
    fstat64(3, {st_mode=S_IFREG|0777, st_size=1181092, ...}) = 0
    mmap2(NULL, 1217096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ab87000
    mprotect(0x2aca4000, 28672, PROT_NONE) = 0
    mmap2(0x2acab000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11c000) = 0x2acab000
    mmap2(0x2acae000, 8776, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2acae000
    close(3) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab7e000
    set_tls(0x2ab7e4a0, 0x2ab7eb70, 0x2ab8667c, 0x2ab7eb78, 0x2ab86050) = 0
    mprotect(0x2acab000, 8192, PROT_READ) = 0
    mprotect(0x2ab85000, 4096, PROT_READ) = 0
    open("/dev/i2c/1", O_RDWR) = -1 ENOENT (No such file or directory)
    open("/dev/i2c-1", O_RDWR) = 3
    ioctl(3, 0x705, 0x7e926cc8) = 0
    ioctl(3, 0x703, 0x28) = 0
    write(2, "WARNING! This program can confus"..., 75WARNING! This program can confuse your I2C bus, cause data loss and worse!
    ) = 75
    write(2, "I will write to device file /dev"..., 78I will write to device file /dev/i2c-1, chip address 0x28, data address
    0x40, ) = 78
    write(2, "data 0x00, mode byte.\n", 22data 0x00, mode byte.
    ) = 22
    write(2, "Continue? [Y/n] ", 16Continue? [Y/n] ) = 16
    fstat64(0, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2acb1000
    read(0,
    "\n", 1024) = 1
    ioctl(3, 0x720, 0x7e926cbc) = 0
    close(3) = 0
    exit_group(0) = ?
    +++ exited with 0 +++
    /mnt/APPS # i2cget 1 0x28 0x40
    WARNING! This program can confuse your I2C bus, cause data loss and worse!
    I will read from device file /dev/i2c-1, chip address 0x28, data address
    0x40, using read byte data.
    Continue? [Y/n] y
    0x01

  • strace doesn't show any error. What is not working ? You are trying to set 1 to chip address 0x28, data address 0x40, and when you read back it is 0 .Is that the issue ? Have you confirmed this works when you don't run dvr_rdk demo ?

  • hi Badri,

    Thanks for your reply.

    Have you confirmed this works when you don't run dvr_rdk demo ?

    - Yes

    After checking, the access of i2c has problem if the application keep asking video loss detection.

    After removing behavior of video loss detection, it works.


    Hi badri,

       did you have idea about using i2c access under the condition of continuous asking video loss ?? that would be convenient for debug hw's issue when formal release.