i.MX6 AVB Demo Implementation

Document created by King Jin Employee on Sep 5, 2013Last modified by King Jin Employee on May 29, 2014
Version 6Show Document
  • View in full screen mode

1. User Case:

  • Demo Architecture:

Picture1.jpg

  • Demo Description:
    • A, B, C and Speaker all are i.MX6DQ SabreSD board and running Ubuntu system.
    • A is media server which send out broadcast 30Mbps h264 video and audio stream and running iperf to send out tcp packets via best efforts lane to PC.
    • B and C are clients to get video data only and play in screen. 
    • Speaker is a client to receive audio data only and play to speaker.
    • PC which install ubuntu system is used to received best efforts data from A.
  • Demo Goal:

Use Gstreamer playback 30Mbps streaming  "H264_AVC_1080p_30fps_27Mbps_mp3.avi", while running iperf TCP streaming under the following two case:

1. Running the non-CBS kernel

2. Enable the FIQ kernel

Validate the Qav (Queue and Forwarding Protocol) which is developed by SW.

2. Resource:

FIQ Patch:

0001-GIC-FIQ-EPIT-implement.patch

0002-set-EPIT-priority-to-highest.patch

0003-GIC-support-SMP-4-cores-of-FIQ.patch

CBS &Shaper Patch:

0004-Implement-credit-base-shaper-alogrithim-to-schdule-A.patch

0005-enet-avb-CBS-SIRQ-rum-mode-pass-performance-stress-t.patch

Others Patch:

0006-Fix-the-61883-sub-type-protocol-check.patch

0007-Add-hrtimer-for-the-sirq.-Talker-transmit-packets-nu.patch

0008-1.-Fix-memory-map-size-issue.patch

0009-Increase-BD-entries-to-reduce-the-full-times.patch

0010-Add-sys-interface-to-log-out-the-video-packet-number.patch

0011-Add-AVB-timestamp-support.patch

0012-GIC-support-SMP-4-cores-of-FIQ.patch

Gstreamer UDPAVB Plug-in Library and Source:

Library: udp/output/libgstudp.so

Source: udp/*

 

 

3. Setup the Patch:

      - Low level:  kernel enet driver implement CBS and traffic shaper:

             1. Apply all the patches in the patch_whole.tar.gz in the attachment

              2. Rebuild kernel 3.0.35:

Enable "CONFIG_ENET_IMX6_AVB" to support AVB.

                       Enable "CONFIG_RUN_IN_FIQ"  in kernel:            let CBS run in FIQ mode.

               3. make uImage.

               You can also use the uImage-avb-fig in the attachment directly.  Flash to the SD card use dd command, the user gudie refer to the  i.MX_6Dual6Quad SABRE_SD_Linux_User_Guide.pdf.

               Note: the uImage_org_nonavb in the attachment is the kernel image without QAV and FIQ.

 

- High level: use Gstreamer as the media input/output interface, encapsulation with IEEE1722 format:

        Before the below action, you should already have seutp the Ubuntu Rootfs,  copied all the Freescale *.deb files that come alone with the Release BSP demo image package and copied all the MM codec *.deb files (IMX_MMCODEC_3.0.7.tar) that from Freescale offical website, the user gudie refer to the  i.MX_6Dual6Quad SABRE_SD_Linux_User_Guide.pdf.

 

1. Add gstreamer setup version as following:

- gstreamer core version: 0.10.35
- gst-plugins-good version: 0.10.30
- gst-plugins-bad version: 0.10.11

2. Setup:

- tar xvzf udp.tar.gz
- cd gst-plugins-good-0.10.30
- ./configure
- make
- make install
- cp ~/udp/* gst/udp/
- cd gst/udp
- make
- cp  libgstudp.so /usr/lib/gstreamer-0.10/
- gst-inspect | grep avb         //Check whether the avb plugin is installed successfully. If the three avb plugin is printed out in the terminal, the avb plugins are proved to install properly.

4. Run the Demo:

      1.  Start the iperf server in PC linux machine by inputting " iperf -s -i 1&".

      

      2.  Power on the A board, ensure the board can get the DHCP IP address, Start the iperf client on the demo board which sends outgoing Audio-Video streaming in the background. Input "iperf -c <iperf server ip> - t 6000&". If the connection is  successful, the iperf log should be able to be seen in the linux machine terminal.

 

             3.  Power on the B and C board, inputting the following command to receive video data:

           Run "./startRxVideoAVB.sh"  to start gstreamer video receive process on video display board

 

      4.  Power on the speaker board, inputting the following command to receive audio data:

            Run "./startRxAudioAVB.sh" to start gstream audio receive process on audio  playback board

5.  Inputting the following command to send video/audio data to client at the A board terminal windowns:  

                           Run "./startTxAVB.sh" to start the 1722 streaming traffic                               

      (note: H264_AVC_1080p_30fps_27Mbps_mp3.avi located at current directory)

 

              6.  Change to the kernel with QAV and follow the steps 1~5 above

 

5. Result:

      • Without FIQ Qav,  video play at client B and C serious freeze. It takes 3 minutes to play 1min 40s h264 stream.  iperf speed over 80Mbps.

      • With FIQ Qav, video play at client B and  C is smooth and same as without iperf in background. Iperf show speed is less than 70Mbps.  FIQ Qav correctly reserve necessary bandwidth to AV stream

 

6. Know issues

    1. Failed to request the IP from DHCP

        [Solution]  For FIQ, after kernel up, you must run the command: echo 1 > /sys/devices/platform/imx_wfi_issue.0/enable

  2.   Kernel is halted or crashed

[Solution] In bootloader parameter, add 'nosmp' in bootargs_mmc.

6 people found this helpful

Outcomes