world leader in high performance signal processing
Trace: » video_loop_back

Video loop back demo

Description

This demos shows a video loop back captured from the camera will be displayed directly and instantly on the LCD display

Hardware platform

1)BF609 EZ-BOARD version 1.0 and later, click here

2)ADZS-CAM-EX3 boad, click here, and Aptina MT9M114_55CSP_DEMOHEAD_REV2 board

3)ADZS-WVGALCD-EX3 board, clickhere

connect ADZS-CAM-EX3 to P1A, and ADZS-WVGALCD-EX3 to P2A and P3A.

Software configuration

With ADI blackfin Linux buildroot release 2012R2, run “make linux-menuconfig”, enable following options in kernel configuration

* Enable I2C support:

Device Drivers  --->
    <*> I2C support  --->
            I2C Hardware Bus support  --->
                <*> Blackfin TWI I2C support
                (100) Blackfin TWI I2C clock (kHz)

* Enable v4l2 and capture driver:

Device Drivers  --->
    <*> Multimedia support  --->
        [*]   Cameras/video grabbers support
        [*]   Media Controller API (EXPERIMENTAL)
        [*]   V4L platform devices  --->
              <*>   Blackfin Video Capture Driver
        Encoders, decoders, sensors and other helper chips  --->
              < > Analog Devices ADV7183 decoder
              < > Analog Devices ADV7842 decoder
              < > ST VS6624 sensor support
              <*> Aptina MT9M114 sensor support

* Config DMA region size:

Blackfin Processor Options  --->
    Uncached DMA region (Enable 8M DMA region)  --->

*Note: Please make sure sysclk frequency is no less than 200MHz.

Blackfin Processor Options  --->
    Board customizations  --->
        (25000000) Frequency of the crystal on the board in Hz
        [*] Re-program Clocks while Kernel boots?
        (20)  VCO Multiplier
              Core Clock Divider (1)  --->
        (2)   System Clock Divider
        (2)   System Clock0 Divider
        (2)   System Clock1 Divider
        (2)   DDR Clock Divider         

* Enable Frame Buffer driver:

Device Drivers  --->
    Graphics support  --->
        <M> Support for frame buffer devices  --->
            <M>   NEC NL8048HL WVGA LCD for BF609

* Enable Backlight driver:

Device Drivers  --->
    Input device support  --->
        [*]   Touchscreens  --->
            <M>   Analog Devices AD7879-1/AD7889-1 touchscreen interface
            <M>     support SPI bus connection

* Enable GPIO support:

Device Drivers  --->
    [*] GPIO Support  --->
        [*]   /sys/class/gpio/... (sysfs interface)

Then run “make menuconfig” to select the v4l test

Package Selection for the target  --->
    Miscellaneous  --->
        [*] V4L2 video test program

manually demo with the uImage

After booting uImage: 1)turn on the display backlight

  i)echo 112 > /sys/class/gpio/export
  ii)echo high > /sys/class/gpio/gpio112/direction

2)v4l2_video_loopback -i

use more options with v4l2_video_loopback to revert the video display, check “v4l2_video_loopback --help”

Run this demo automatically after board power on

1)Edit file board/AnalogDevices/blackfin/target_skeleton/etc/rc into following at it’s end and make to build the uImage

ifconfig lo 127.0.0.1
echo 112 > sys/class/gpio/export
echo high > sys/class/gpio/gpio112/direction
v4l2_video_loopback -i
exec echo 'Buildroot '`cat /etc/br-version`

2)format a SD card into FAT on a host PC and copy the generated uImage into it, and plug the SD card into the 609 board after it’s done.

3)customize the u-boot env from the command line

i)set mmcboot 'fatload mmc 0:1 0x1000000 /uimage.609.v4l; bootm'
ii)set bootm 'run mmcboot'
iii)save

Reboot the board and wait for few seconds, demo should run automatically. Download the pre-built uImage from here.

Complete Table of Contents/Topics