2011年6月14日 星期二

LeopardBoard DM368 running with TI DVSDK

I got LeopardBoard DM368 for a while and get it work with TI DVSDK.
The mt9p031 camera also works and capable of Full HD H.264 encode.
Boot device is SD card.
Below I will show how to do it.

0.Install toolchain
CodeSourcery arm 2009-q3.
See DVSDK download page for detail.
http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_4_00/latest/index_FDS.html

1.Download TI DVSDK 4_02_00_06
http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_4_00/latest/exports/dvsdk_dm368-evm_4_02_00_06_setuplinux

2.Install DVSDK 4_02_00_06 into ~/LeopardBoard/DM368/original/

3.Download patch for LeopardBoard DM368
$ cd ~/LeopardBoard/DM368/original/ti-dvsdk_dm368-evm_4_02_00_06

ti-dvsdk_dm368-evm_4_02_00_06_leopardboard.patch
ti-dvsdk_dm368-evm_4_02_00_06_Makefile.patch
ti-dvsdk_dm368-evm_4_02_00_06_dmai_2_20_00_15.patch

patch

$ patch -p1 < ../../ti-dvsdk_dm368-evm_4_02_00_06_leopardboard.patch
$ patch -p1 < ../../ti-dvsdk_dm368-evm_4_02_00_06_Makefile.patch
$ patch -p1 < ../../ti-dvsdk_dm368-evm_4_02_00_06_dmai_2_20_00_15.patch

4.Build everything

$ make

5.Create symbolic link of uImage & u-boot

$ cd psp/prebuilt-images/
$ rm -rf ./*
$ ln -s ../u-boot-2010.12-rc2-psp03.01.01.39/u-boot.bin u-boot-dm368-evm.bin
$ ln -s ../linux-2.6.32.17-psp03.01.01.39/arch/arm/boot/uImage uImage-dm368-evm.bin
$ cd ../..

6.Build SD card
Make sure your SD card device node. For me it's /dev/sdb

$ sudo bin/mksdboot.sh --device /dev/sdb --sdk ${PWD}

The process could be a few minutes...
After the process complete, the SD card is unmount automatically.

7.Fix DVSDK install location
Edit Rules.make

Change this one
EXEC_DIR=$(HOME)/install/$(PLATFORM)
to
EXEC_DIR=/media/ROOTFS

8.Do install everything in root file system
Insert SD card again

$ make install

9.Modify boot.cmd & boot.scr

Edit /media/BOOT/boot.cmd as below

mmc rescan 0
setenv bootargs 'console=ttyS0,115200n8  root=/dev/mmcblk0p2 rw ip=off mem=60M davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=720P-60 davinci_display.cont2_bufsize=6291456 vpfe_capture.cont_bufoffset=6291456 vpfe_capture.cont_bufsize=6291456 video=davincifb:vid0=off:vid1=off:osd1=off dm365_imp.oper_mode=0 davinci_capture.device_type=4 vpfe_capture.interface=1 rootwait'
fatload mmc 0 80700000 uImage
bootm 80700000

Create boot.scr

$ cd /media/BOOT
$ mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Execute Boot Script' -d boot.cmd boot.scr

10.Umount SD card and insert to LeopardBoard DM368
Make sure the DIPSW is SD card boot.
1:off 2:on 3:off

Boot log

TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = SD/MMC
Starting SDMMC Copy...
   DONE
Jumping to entry point at 0x81080000.


U-Boot 2010.12-rc2 (Jun 14 2011 - 18:14:16)

Cores: ARM 432 MHz
DDR:   340 MHz
I2C:   ready
DRAM:  128 MiB
NAND:  256 MiB
MMC:   davinci: 0, davinci: 1
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_bbt: ECC error while reading bad block table
nand_read_bbt: Bad block at 0x000001f60000
nand_read_bbt: Bad block at 0x000003780000
nand_read_bbt: Bad block at 0x000005000000
nand_read_bbt: Bad block at 0x0000050e0000
nand_read_bbt: Bad block at 0x00000f780000
NAND read from offset 3c0000 failed -74
*** Warning - readenv() failed, using default environment

Net:   Ethernet PHY: GENERIC @ 0x00
DaVinci-EMAC
Hit any key to stop autoboot:  0
reading boot.scr

519 bytes read
## Executing script at 80600000
reading uImage

2146316 bytes read
## Booting kernel from Legacy Image at 80700000 ...
   Image Name:   Linux-2.6.32.17-davinci1
   Created:      2011-06-14  11:25:19 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2146252 Bytes = 2 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux..........................................................................................................................................
.. done, booting the kernel.
Linux version 2.6.32.17-davinci1 (gigijoe@gigijoe-laptop) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 PREEMPT Tue Jun 14 19:25:14 CST 2011
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DM365 Leopard
Memory policy: ECC disabled, Data cache writeback
DaVinci dm36x_rev1.2 variant 0x8
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 15240
Kernel command line: console=ttyS0,115200n8  root=/dev/mmcblk0p2 rw ip=off mem=60M davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=720P-60 da
vinci_display.cont2_bufsize=6291456 vpfe_capture.cont_bufoffset=6291456 vpfe_capture.cont_bufsize=6291456 video=davincifb:vid0=off:vid1=off:osd1=off dm365_im
p.oper_mode=0 davinci_capture.device_type=4 vpfe_capture.interface=1 rootwait
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 60MB = 60MB total
Memory: 56220KB available (4020K code, 392K data, 144K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 215.44 BogoMIPS (lpj=1077248)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 8 gpio irqs
NET: Registered protocol family 16
davinci_serial_init:97: failed to get UART2 clock
bio: create slab at 0
DM365 IPIPE initialized in Continuous mode
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
vpss vpss: dm365_vpss vpss probed
vpss vpss: dm365_vpss vpss probe success
dm365_afew_hw_init
ch0 default output "COMPONENT", mode "720P-60"
VPBE Encoder Initialized
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
        (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
LogicPD encoder initialized
Switching to clocksource timer0_1
musb_hdrc: version 6.0, cppi-dma, host, debug=0
musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 12
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 109
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
Console: switching to colour frame buffer device 160x45
davincifb davincifb.0: dm_osd0_fb: 1280x720x16@0,0 with framebuffer size 1800KB
davincifb davincifb.0: dm_osd1_fb: 1280x720x4@0,0 with framebuffer size 1800KB
DM365 IPIPEIF probed
imp serializer initialized
davinci_previewer initialized
davinci_resizer initialized
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x1d06000 (irq = 41) is a 16550A
brd: module loaded
console [netcon0] enabled
netconsole: network logging started
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbtest
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
Linux video capture interface: v2.00
ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)
vpfe_init
vpfe-capture: vpss clock vpss_master enabled
vpfe-capture vpfe-capture: v4l2 device registered
vpfe-capture vpfe-capture: video device registered
Leopard: switch to HD imager-MT9P031 video input
mt9p031 1-0048: Detected a MT9P031 chip ID 1801
mt9p031 1-0048: mt9p031 1-0048 decoder driver registered !!
vpfe-capture vpfe-capture: v4l2 sub device mt9p031 registered
vpfe_register_ccdc_device: DM365 ISIF
DM365 ISIF is registered with vpfe.
af major#: 252, minor# 0
AF Driver initialized
aew major#: 251, minor# 0
AEW Driver initialized
Trying to register davinci display video device.
layer=c2142800,layer->video_dev=c2142970
Trying to register davinci display video device.
layer=c2142c00,layer->video_dev=c2142d70
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
watchdog watchdog: heartbeat 60 sec
davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
No device for DAI tlv320aic3x
No device for DAI davinci-i2s
asoc: tlv320aic3x <-> davinci-i2s mapping ok
ALSA device list:
  #0: DaVinci EVM (tlv320aic3x)
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
Clocks: disable unused mmcsd1
Clocks: disable unused spi0
Clocks: disable unused spi1
Clocks: disable unused spi2
Clocks: disable unused spi3
Clocks: disable unused spi4
Clocks: disable unused aemif
Clocks: disable unused pwm0
Clocks: disable unused pwm1
Clocks: disable unused pwm2
Clocks: disable unused pwm3
Clocks: disable unused timer1
Clocks: disable unused timer3
Clocks: disable unused emac
Clocks: disable unused voice_codec
Clocks: disable unused rto
Clocks: disable unused mjcp
davinci_emac_probe: using random MAC addr: fe:06:51:2c:4d:aa
emac-mii: probed
Waiting for root device /dev/mmcblk0p2...
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SDHC card at address a37d
mmcblk0: mmc0:a37d SD04G 3.69 GiB
 mmcblk0: p1 p2
kjournald starting.  Commit interval 5 seconds
EXT3 FS on mmcblk0p2, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with writeback data mode.
VFS: Mounted root (ext3 filesystem) on device 179:2.
Freeing init memory: 144K
INIT: version 2.86 booting
Please wait: booting...
Starting udev
udev: starting version 141
Remounting root file system...
Caching udev devnodes
Populating dev cachemv: cannot rename '/tmp/devices': No such file or directory
/etc/init.d/rc: eval: line 1: syntax error: EOF in backquote substitution
ALSA: Restoring mixer settings...
Configuring network interfaces... No state is present for card EVM
Unknown hardware: "tlv320aic3x" "" "" "" ""
Hardware is initialized using a guess method
No state is present for card EVM
udhcpc (v1.13.2) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
Setting up IP spoofing protection: rp_filter.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Thu Mar 24 19:02:00 UTC 2011
hwclock: can't open '/dev/misc/rtc': No such file or directory
INIT: Entering runlevel: 5
chown: unknown user messagebus
Starting telnet daemon.
Starting syslogd/klogd: done
Starting thttpdNET: Registered protocol family 10
.
CMEMK module: built on Jun 14 2011 at 18:02:26
  Reference Linux version 2.6.32
  File /home/gigijoe/LeopardBoard/DM368/original/ti-dvsdk_dm368-evm_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0xc6000000 of size 0x4400000
heap fallback enabled - will try heap if pool buffer is not available
CMEM Range Overlaps Kernel Physical - allowing overlap
CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83c00000)
cmemk initialized
IRQK module: built on Jun 14 2011 at 18:02:29
  Reference Linux version 2.6.32
  File /home/gigijoe/LeopardBoard/DM368/original/ti-dvsdk_dm368-evm_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
irqk initialized
EDMAK module: built on Jun 14 2011 at 18:02:30
  Reference Linux version 2.6.32
  File /home/gigijoe/LeopardBoard/DM368/original/ti-dvsdk_dm368-evm_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
Calibrating touchscreen (first time only)ts_open: No such file or directory
.
Starting Matrix GUI application.

 _____                    _____           _         _  
|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_| 
              |___|                    |___|           

Arago Project http://arago-project.org dm368-evm ttyS0

Arago 2011.02 dm368-evm ttyS0

dm368-evm login:


11.Fix Alsa probleam

ALSA: Restoring mixer settings...
Configuring network interfaces... No state is present for card EVM
Unknown hardware: "tlv320aic3x" "" "" "" ""
Hardware is initialized using a guess method
No state is present for card EVM

The problem is due to wrong /etc/asound.state
While booting /etc/init.d/alsa-state loads /etc/asound.state if it exist

To fix it, just do

$ rm -rf /etc/asound.state






11 則留言:

  1. 請問你的LeopardBoard DM368 Mic Input 和 Speaker Output 聲音都正常嗎? 我也是使用LeopardBoard DM368但一直都沒有聲音輸出

    [版主回覆06/17/2011 14:27:35]我手邊沒有合適的audio 插頭,所以沒試過

    回覆刪除
  2. 感謝分享~
    聲音我測試是正常的
    不過好像會有雜音 OSC_CLK_FREQ 會有影響嗎?因我還是設為27000000 ^^"
    而且mic輸入好像gain太大,可以調整嗎?
    另外,再請問有測試過 DVSDK 本身的encode demo嗎? 非Gstreamer


    [版主回覆06/18/2011 23:05:30]LeopardBoard 跑 24MHz所以要改
    ti-dvsdk_dm368-evm_4_02_00_06_leopardboard.patch 裡有相關修改

    DVSDK 有一些 Demo 在
    dmai_2_20_00_15/packages/ti/sdo/dmai/apps/
    相關文件在
    docs/TMS320DM368_Software_Developers_Guide.pdf

    回覆刪除
  3. I have used dvsdk_dm368-evm_4_02_00_06_setuplinux and Code Sourcery ARM toolchain 2009q1-203 toolchain.
    I have followed your blog to configure TI sdk for leopard board dm368 with LI5M03 camera.As per our requirement for composite output I have made changes in th boot.cmd davinci_enc_mngr.ch0_output=COMPOSITE davinci_enc_mngr.ch0_mode=D1_NTSC.
    I have not followed the alsa step.
    Though the board has booted and Texas instruments logo is displayed on the composite output the gstreamer commands fails to display .

    1)gst-launch -v videotestsrc ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite accelFrameCopy=FALSE sync=false
    Setting pipeline to PAUSED ...
    /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)31
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)71
    /GstPipeline:pipeline0/GstTIDmaiVideoSink:tidmaivideosink0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)UYVY, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width1
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    delay stream on ....
    davinci_v4l2 davinci_v4l2.1: sizeimage is less, 691200
    ERROR: from element /GstPipeline:pipeline0/GstTIDmaiVideoSink:tidmaivideosink0: Unable to initialize display

    Additional debug info:
    gsttidmaivideosink.c(1657): gst_tidmaivideosink_render (): /GstPipeline:pipeline0/GstTIDmaiVideoSink:tidmaivideosink0
    Execution ended after 35914207 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    /GstPipeline:pipeline0/GstTIDmaiVideoSink:tidmaivideosink0.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = NULL
    Setting pipeline to NULL ...
    Freeing pipeline ...

    2)gst-launch -v filesrc location= sintel_trailer-480p.mp4 ! TI
    Viddec2 engineName=codecServer codecName=mpeg4dec ! TIDmaiVideoSink videoStd=D1_
    NTSC videoOutput=COMPOSITE sync=FALSE
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstTIViddec2:tividdec20.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)30000/1001, width=(int)1280, height=(int)720
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Got EOS from element "pipeline0".
    Execution ended after 2647667 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    /GstPipeline:pipeline0/GstTIViddec2:tividdec20.GstPad:src: caps = NULL
    Setting pipeline to NULL ...
    Freeing pipeline ...

    3)gst-launch -v v4l2src always-copy=FALSE num-buffers=800 ! vide
    o/x-raw-yuv,format=\(fourcc\)NV12,width=720,height=480 ! TIVidenc1 codecName=mpe
    g4enc engineName=codecServer ! filesink location=output_cap_D1.m4v
    Pipeline is live and does not need PREROLL ...
    WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Video input device did not accept new frame rate setting.
    Additional debug info:
    v4l2src_calls.c(342): gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    system error: Invalid argument
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Caught interrupt -- handling interrupt.
    Interrupt: Stopping pipeline ...
    Execution ended after 14988243577 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = NULL
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Please provide a solution.

    回覆刪除
  4. I have used dvsdk_dm368-evm_4_02_00_06_setuplinux and Code Sourcery ARM toolchain 2009q1-203 toolchain.
    I have followed your blog to configure TI sdk for leopard board dm368 with LI5M03 camera.As per our requirement for composite output I have made changes in th boot.cmd davinci_enc_mngr.ch0_output=COMPOSITE davinci_enc_mngr.ch0_mode=D1_NTSC.
    I have not followed the alsa step.
    Though the board has booted and Texas instruments logo is displayed on the composite output the gstreamer commands fails to display .

    1)gst-launch -v videotestsrc ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite accelFrameCopy=FALSE sync=false
    Setting pipeline to PAUSED ...
    /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)31
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)71
    /GstPipeline:pipeline0/GstTIDmaiVideoSink:tidmaivideosink0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)UYVY, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width1
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    delay stream on ....
    davinci_v4l2 davinci_v4l2.1: sizeimage is less, 691200
    ERROR: from element /GstPipeline:pipeline0/GstTIDmaiVideoSink:tidmaivideosink0: Unable to initialize display

    Additional debug info:
    gsttidmaivideosink.c(1657): gst_tidmaivideosink_render (): /GstPipeline:pipeline0/GstTIDmaiVideoSink:tidmaivideosink0
    Execution ended after 35914207 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    /GstPipeline:pipeline0/GstTIDmaiVideoSink:tidmaivideosink0.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = NULL
    Setting pipeline to NULL ...
    Freeing pipeline ...

    2)gst-launch -v filesrc location= sintel_trailer-480p.mp4 ! TI
    Viddec2 engineName=codecServer codecName=mpeg4dec ! TIDmaiVideoSink videoStd=D1_
    NTSC videoOutput=COMPOSITE sync=FALSE
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstTIViddec2:tividdec20.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)30000/1001, width=(int)1280, height=(int)720
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Got EOS from element "pipeline0".
    Execution ended after 2647667 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    /GstPipeline:pipeline0/GstTIViddec2:tividdec20.GstPad:src: caps = NULL
    Setting pipeline to NULL ...
    Freeing pipeline ...

    3)gst-launch -v v4l2src always-copy=FALSE num-buffers=800 ! vide
    o/x-raw-yuv,format=\(fourcc\)NV12,width=720,height=480 ! TIVidenc1 codecName=mpe
    g4enc engineName=codecServer ! filesink location=output_cap_D1.m4v
    Pipeline is live and does not need PREROLL ...
    WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Video input device did not accept new frame rate setting.
    Additional debug info:
    v4l2src_calls.c(342): gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    system error: Invalid argument
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Caught interrupt -- handling interrupt.
    Interrupt: Stopping pipeline ...
    Execution ended after 14988243577 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = NULL
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Please provide a solution.

    回覆刪除
  5. 請問如果boot的時候hangs在 "davinci_emac_probe: using random MAC addr:xxxxxxx"
    請問有可能的原因為何?
    感謝分享!

    回覆刪除
  6. 版主你好;
    請問,我現在的內核出現,檢測不到MT9P031 sensor。

    我的bootargs為:
    setenv bootargs dm365_imp.oper_mode=0 mem=48M console=ttyS0,115200n8 noinitrd rw ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs video=davincifb:osd0=720x480x16,4050K davinci_capture.device_type=2 vpfe_capture.interface=1;

    我的內核啟動log,出現錯誤部分為:

    i2c /dev entries driver
    Linux video capture interface: v2.00
    ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)
    ths7303 1-002c: ths7303 write failed
    ths7303: probe of 1-002c failed with error -121
    vpfe_init
    vpfe-capture: vpss clock vpss_master enabled
    vpfe-capture vpfe-capture: v4l2 device registered
    vpfe-capture vpfe-capture: video device registered
    dm365evm_enable_pca9543a
    dm365evm_enable_pca9543a, status = -121
    EVM: switch to HD imager video input
    mt9p031 1-005d: No MT9P031 chip detected, register read ffffff87
    vpfe-capture vpfe-capture: v4l2 sub device mt9p031 register fails
    No sub devices registered
    vpfe-capture: vpfe capture clocks disabled
    vpfe_register_ccdc_device: DM365 ISIF
    dm365_isif: probe of dm365_isif failed with error -22

    我嘗試了很多辦法,還是沒有找到問題原因?
    我看版主你的內核啟動信息說明你的MT9P031檢測到了。
    請版主給我一些建議吧!!?

    回覆刪除
    回覆
    1. 看到 ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)
      代表已經在i2c bus上發現 id 為 0x58 的device.
      後面會write failed是蠻奇怪的.

      你的H/W是DM368 LeopardBoard嗎?
      有沒有其他的i2c device在同一個bus上?
      降低i2c bus的速率試試看
      確認camera module是好的?
      確認i2c bus有沒有pull high?

      刪除
    2. 史帝夫嘰嘰叫

      我的板卡不是 DM368 LeopardBoard。
      ths7303 1-002c: chip found 是因為我內核里有選中THS7303但是板子上沒有用到它所以會檢測不到。
      問題是我自製的CMOS Camera Board sensor為MT9P031 設備地址為0x5d
      內核配置有選中MT9P031的 但是檢測不到它。

      我的開發板上就使用了一個I2C總線,掛載的設備有 DS1339 、 TPS65023、和MT9P031。 他們的設備地址是沒有衝突的。
      I2C 也是有3.3v 2.2K的上拉電阻。

      MT9P031的extclk為外接的24Mhz的晶振。用示波器測量PCLK也為24Mhz。FRAME和LINE的波形也是有的。

      問題是I2C的時鐘線和數據線。我沒有I2C測試程序,無法測試I2C的信號。。。

      刪除
    3. 你不是LeopardBoard加上customize camera board,這樣很難隔空抓藥.
      先確定H/W真的沒問題,i2c再降速試試吧

      刪除
    4. 作者已經移除這則留言。

      刪除
    5. 史帝夫嘰嘰叫

      謝謝你。我的問題已經找到了。
      是H/W的問題。MT9P031的第13引腳SADDR 手冊上顯示:
      Serial address. When HIGH, the MT9P031 responds to device ID (BA)H. When LOW, it
      responds to serial device ID (90)H.

      應為高電平。我們的硬件設計成了低電平。所以無應答ACK。也就無法檢測到MT9P031了。
      就這一個小問題,搞了兩月。。。

      刪除