i.MXプロセッサ ナレッジベース

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX Processors Knowledge Base

ディスカッション

ソート順:
  IMX6 S/DL for consumer has both PXP and IPU. Automotive and Industrial versions doesn't have PXP. As IMX6 also has IPU, the Linux framebuffer driver uses IPU and not PXP. Note : “pxp_v4l2_test.out” from unit_tests was made for processors (i.MX6 SL), that have only PXP and its framebuffer driver applies PXP to accelerate image processing. “pxp_v4l2_test.out” should not be used with i.MX6 S/DL. To test PXP device with i.MX6 S/DL users have to try “pxp_test.out”.
記事全体を表示
One chunk of the file system for the Linux Image i.MX 6Dual/6Quad Power Consumption Measurement Linux Image
記事全体を表示
Hi all, Most of IoT customers request to enable/demo i.MX EVK with FSL Zigbee solution. In default i.MX Linux/Android BSP, Zigbee function is not enabled. Here we make a lighting demo setup through i.MX6Q SabreSD, KW20 USB dongle and Philips Hue light. KW20 is configured as Zigbee coordinator, connected with USB OTG in i.MX6Q, then i.MX6Q can issue On/Off, brightness and color control commands through KW20 to toggle Philips Hue light directly. Please find the attachment for details. Best regards, Carl
記事全体を表示
The i.MX 6 D/Q L3.035_1.0.2 patch release is now available on the www.freescale.com ·         Files available # Name Description 1 L3.0.35_1.0.2_LDO_PATCH This patch release is based on the i.MX 6Dual/6Quad Linux   12.09.01 release. The purpose of this patch release is to manage the LDO and   PMIC ramp-up time correctly.
記事全体を表示
Computer On Module • Processor Freescale i.MX 6Quad, 1GHz • RAM 1GB DDR3 SDRAM 64-bit • ROM 4GB NAND Flash UP to 16GB • ROM 2M SPI Nor Flash ! • Power supply Single 5V • Size 40mm SO-DIMM • Temp.-Range          0 to + 95C (Consumer)         -20 to + 105C (Extended Consumer)         -40 to +105C (Industrial)         -40 to + 125C (Automotive) Key Features • 10/100Mbps Ethernet • One High Speed USB 2.0 ports • Full HD LCD controller, 24bpp • OpenGL ES 2.0 and OpenVG 1.1 hardware accelerators • Multi-format HD 1080p60 video decoder and 1080p30 encoder hardware engine • Two Camera Interfaces • NEON MPE coprocessor — SIMD Media Processing Architecture — dual, single-precision floating point execute pipeline • Unified 1MB L2 cache • Several interfaces: 5x UART, 2x SDIO, 1x SSI/AC97/I2S, 3x I2C, 2xCSPI • 3.3V I/O • 2x Controller Area Network (FlexCAN) • PCIe 2.0 (1-lane) OS Support     • Linux 3.0     • Android 4.2 Application:Media Tablet,Education Tablet PC,EBook,Automotive Infotainment,Aviation Infotainment,HMI,Portable Medical Instruments,IPTV,IP Phone,Smart Energy Systems,Intelligent industrial control systems For more information, please see Attachment We can provide a complete solution
記事全体を表示
INTRODUCTION REQUIREMENTS CREATE A NEW PROJECT GPU EXAMPLE GSTREAMER EXAMPLE 1. INTRODUCTION:      The below steps show how to create different application examples using Elipse IDE. 2. REQUIREMENTS:      A fully working image and meta-toolchain generated in Yocto . You can follow the  next training: Yocto Training - HOME      Install and configure the Yocto Eclipse Plug-in. For more details about this requirement please refer to Setting up the Eclipse IDE for Yocto Application Development         To demonstrate the steps, L3.14.28  BSP, fsl-image-qt5 image and i.MX6Q SABRE-SDP board were used. 3. CREATE A NEW PROJECT      Follow the section Creating a Hello World Project of this document Setting up the Eclipse IDE for Yocto Application Development 4. GPU EXAMPLE           For this project we use the source code found in the fsl-gpu-sdk that can be downloaded from:      https://www.freescale.com/webapp/Download?colCode=IMX6_GPU_SDK&location=null&Parent_nodeId=1337637154535695831062&Parent…      Follow section 3 and create a new project named gputest.      From the IMX6_GPU_SDK choose one of the examples of GLES2.0 folder. In this case the 01_SimpleTriangle is chosen.      Copy the .c and .h files to the src directory of the gputest project. The Project Explorer window should look like this:              Add the needed files and libraries to compile and link in the Makefile.am file found in the ´src´ folder. The Makefile.am file should have the below content:          bin_PROGRAMS = gputest          gputest_SOURCES = gputest.c fsl_egl.c fslutil.c          AM_CFLAGS = @gputest_CFLAGS@          AM_LDFLAGS = @gputest_LIBS@ -lstdc++ -lm -lGLESv2 -lEGL -lX11 -ldl          CLEANFILES = *~ ​    Add the PATH to CFLAGS where the compiler will look for the headers at Project->Properties->Autotools->configure:           In this project there is no need to add extra PATHs for the headers. Apply the changes by clicking on Reconfigure Project. Build the project To test the file you can send the executable to the board with:           $ scp gputest root@<board_ip>:/home/root      $./gputest      You should get the next output in the display: 5. GSTREAMER EXAMPLE      For this project we use the source code found at Basic tutorial 1: Hello world! - GStreamer SDK documentation - GStreamer SDK documentation    Follow section 3 and create a new project named Gstreamer.    Copy the code of the basic tutorial to your Gstreamer.c file.    Add the needed files and libraries to compile and link in the Makefile.am file found in the ´src´ folder. The Makefile.am file should have the below content:                           bin_PROGRAMS = Gstreamer      Gstreamer_SOURCES = Gstreamer.c      AM_CFLAGS = @Gstreamer_CFLAGS@      AM_LDFLAGS = @Gstreamer_LIBS@ -lstdc++  -lVDK -lm -lGLESv2 -lGAL -lEGL  -ldl -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lxml2 -lglib-2.0      CLEANFILES = *~         ​    Add the PATH to CFLAGS where the compiler will look for the headers at Project->Properties->Autotools->configure:           For this example the next lines are added             -I${Sysroot}/usr/include/gstreamer-1.0        -I${Sysroot}/usr/include/glib-2.0        -I${Sysroot}/usr/include/libxml2        -I${Sysroot}/usr/lib/glib-2.0/include      Apply the changes by clicking on Reconfigure Project. Build the project To test the file you can send the executable to the board with:           $ scp Gstreamer root@<board_ip>:/home/root To execute the application on the board:      $./Gstreamer The board should have internet access and the application should play the video found at http://docs.gstreamer.com/media/sintel_trailer-480p.webm
記事全体を表示
Join FSL-community-bsp project: https://lists.yoctoproject.org/listinfo/meta-freescale In order to test Yocto Project for i.MX6 or any other supported board please follow the instructions pointed by FSL Community BSP. In order to download the source code, please follow this instructions FSL Community BSP. With the downloaded source code, you can follow the steps from this training: Yocto Training - HOME If you face a problem, please, send an email to https://lists.yoctoproject.org/listinfo/meta-freescale This page made sense when there was not other tutorial to point people on how to download and build the very first image using Yocto Project tools for i.MX family boards. Today, FSL Community BSP has become a complete environment with its own landing page (FSL Community BSP) and a collaborative community around meta-freescale mailing list. I encourage you to register in meta-freescale mailing list. I configured this document to be closed for new comments. In case of any issue or bug, please, send an email to meta-freescale.
記事全体を表示
HDMI Dongle SW: The attachment is an HDMI dongle patch based on R13.4 GA. The patches include r13.4-ga-add-on-patches. You can patch it after applying R13.4 GA patch such as add-on patches. You can run script to revb_dongle_patch_install.sh to apply these patches. How to apply the hdmidongle_REVB_R13.4_patch-20121115.tgz: 1. Suppose your android source top is ~/myandroid 2. tar zfvx hdmidongle_REVB_R13.4_patch-20121115.tgz -C ~/ 3. copy revb_dongle_patch_install.sh to ~/ 4. cd hdmidongle_REVB_R13.4_patch 5. ~/revb_dongle_patch_install.sh 6. The  revb_dongle_patch_install.sh will take ~/myandroid as default directory to do patch 7. If your android source tree top is not ~/myandroid. For example, ~/myandroid_ICS, please run ~/revb_dongle_patch_install.sh ~/myandroid_ICS   The following is the release notes for  hdmidongle_REVB_R13.4_patch-20130118.tgz 1. New features:    a. uboot fastboot    b. ldo bypass    c. ntfs support    d. bluetooth A2DP   2. Bug fix    a. WifiDirect connect issue    b. realtek throughput issue with TPLink AP   3. File list:    README.TXT                                      --- this file    0001-uboot_fastboot.patch                       --- uboot fastboot  patch    0002-LDOBYPASS.patch                            --- enable ldo bypass  patch    0003-WifiDirect.patch                           --- wifi direct connect patch    0004-ntfs_support.patch                         --- ntfs support patch    0005-BT_enable.patch                            --- enable bluetooth A2DP    0006-1G_boot_stable.patch                       --- make 1G bootup stable    ntfs-3g.tar.gz                                  --- open source ntfs-3g for ntfs support    rtl8192ce_v4.0.0_6239.20121226_TPIOT1.tgz       --- realtek new driver for TPLink AP throughput issue    MD5SUM.TXT                                      --- md5 check sum   4. Patch guide    Please run md5sum -c MD5SUM.TXT first to confirm all the files received are ok.    All these patches are based on the patch release hdmidongle_REVB_R13.4_patch-20121115.tgz    You need to do as following: R13.4 GA--->patch hdmidongle_REVB_R13.4_patch-20121115.tgz --> patch hdmidongle_REVB_R13.4_patch-20130118.tgz    Supposed the ~/myandroid is your top directory of the android source tree.    Please run the following command to apply the patches .    $tar zfvx hdmidongle_REVB_R13.4_patch-20130118.tgz -C ~/    $cd ~/myandroid    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0001-uboot_fastboot.patch --verbose    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0002-LDOBYPASS.patch --verbose    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0003-WifiDirect.patch --verbose    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0004-ntfs_support.patch --verbose    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0005-BT_enable.patch --verbose    $git apply  ~/hdmidongle_REVB_R13.4_patch-20130118/0006-1G_boot_stable.patch --verbose    $rm -rf kernel_imx/drivers/net/wireless/rtl8192ce    $tar zfvx ~/hdmidongle_REVB_R13.4_patch-20130118/rtl8192ce_v4.0.0_6239.20121226_TPIOT1.tgz    $tar zfvx ~/hdmidongle_REVB_R13.4_patch-20130118/ntfs-3g.tar.gz -C external   5. Build and run     new patch 0007-battery_always_full.patch:   Some games check the battery capacity to determine, it could run or not. But on the hdmi dongle we have no real battery, it makes some games can not run on the hdmi dongle.  We enable the fake battery let the andorid feel it has battery and it is 100% full. 1. Please use this patch after patch hdmidongle_REVB_R13.4_patch-20130118.tgz 2. suppose your android top directory is ~/myandroid and you put he 0007-battery_always_full.patch in your home directory ~ 3. cd ~/myandroid 4. git apply --verbose ~/0007-battery_always_full.patch 5. please rebuild bootimage and run   patch   0008-boot_unlock_screen.patch: When bootup, it goes into desktop rather than screen locker.   1. suppose your android top directory is ~/myandroid and you put the 0008-boot_unlock_screen.patch in your home directory ~ 2. cd ~/myandroid 3. git apply --verbose ~/0008-boot_unlock_screen.patch 4. please rebuild systemtimage and run 2. cd ~/myandroid 3. git apply --verbose ~/0008-boot_unlock_screen.patch patch 0009-uboot-enable-mmu-fix.patch: This patch is for some issue in mmu enable. It will improve all the modules in uboot.   1. suppose your android top directory is ~/myandroid and you put the 0009-uboot-enable-mmu-fix.patch in your home directory ~ 2. cd ~/myandroid 3. git apply --verbose ~/0009-uboot-enable-mmu-fix.patch 4. please rebuild uboot  and rub     patch tarball   hdmidongle_REVB_R13.4_patch-20130123.tgz:   hdmidongle_REVB_R13.4_patch-20130123.tgz contains 0007-battery_always_full.patch  0008-boot_unlock_screen.patch 0009-uboot-enable-mmu-fix.patch remove attached files here: 0007-battery_always_full.patch  0008-boot_unlock_screen.patch 0009-uboot-enable-mmu-fix.patch     Remove hdmidongle_REVB_R13.4_patch-20130123.tgz, hdmidongle_REVB_R13.4_patch-20130118.tgz and upload hdmidongle_REVB_R13.4_patch-20130124.tgz   hdmidongle_REVB_R13.4_patch-20130124.tgz  contains all patches in hdmidongle_REVB_R13.4_patch-20130123.tgz, hdmidongle_REVB_R13.4_patch-20130118.tgz. Please use the  hdmidongle_REVB_R13.4_patch-20130124.tgz.   hdmidongle_REVB_R13.4_patch-20130131.tgz: Besides all the patches released before. Three more patches are added in this patch tar ball.     0010-boot_disable_screenlocker.patch                     --- For fix  0008-boot_unlock_screen.patch 0011-wm8326-DC_CONTROL_RATE.patch                        --- Change the wm8326 pmic rate to immediate voltage change 0012-Added-default-video-mode-check-make-sur.patch       --- Video mode check   hdmidongle_REVB_R13.4_patch-20130201.tgz:   Just change the readme  to place emphasis on   the 0006-1G_boot_stable.patch reverse   Reverse patch 0008-boot_unlock_screen.patch and 0006-1G_boot_stable.patch   0008-boot_unlock_screen.patch: it has some problem but doesn't do any harm to the hdmi dongle.                                                  Please use 0010-boot_disable_screenlocker.patch, instead. 0006-1G_boot_stable.patch:  The patch take more cpu delay to adapt the pmic, we change the pmic setting                                             in  0010-boot_disable_screenlocker.patch. This patch is no needed. And it will lower                                            the performance. Please reverse it.                                            cd ~/myandroid                                            git apply --verbose ~/0006-1G_boot_stable.patch                                                                                           hdmidongle_REVB_R13.4_patch-20130221.tgz: There are three important fixes include in this release. They make the dongle stable. 1. lowmem killer issue fix 2. Update realtek wifi driver to fix the soft ap issue 3. Wifi p2p framework fix to resovle wifi direct only one side work issue   Please read the README.TXT for detail and the other changes.   hdmidongle_REVB_R13.4_patch-20130308.tgz: This patch tar ball include all the patches in hdmidongle_REVB_R13.4_patch-20130221.tgz. Besides, it has a new patches 0020-DL_WifiDirect_Concunrrent_crash_fix.patch to fix the crash issue on DL board.   HDMI Dongle HW:   HDMI Dongle schematic, pcb, gerber and BOM have been attached, the detailed hardware feature has been list below:   Android 4.x HDMI Dongle SPECIFICATION Core Configure Operating System Android 4.x Operating System Based on Micro-PC Platform CPU Processor Freescale i.MX6x DualLite/Quad Core DRAM Storage DDR3 1GigaByte Size, Data rate 1066MT/s Flash Storage 4GigaByte NAND flash ROM Power System Power Supply DC JACK / Micro USB : 5V/2A LED Status Green: Power ON; Red: System Run Socket/Connector MicroSD Socket SDXC Support, Up to 32GB size USB HOST 2.0 USB 2.0 HOST Support USB OTG 2.0 USB 2.0 OTG Support Display/Audio HDMI Output HDMI TypeA Plug connector, 1080p@60Hz output Video Decoder Support Variety of Video Format: MPEG4/H.263/H.264/MJPEG/Xvid/VC-1/WMV/MPEG2/VP8... Audio Decoder Support Variety of Audio Format: MP3/AAC/LPCM/FLAC/AMR/AC3/WMA/Vorbis GPU Support GC2000 GPU core,2D/3D engine support,OpenGL support Wireless Network WiFi Network IEEE 802.11b/g/n,Up to 300Mbps,AP/P2P/Sta Mode Support Others Key Recovery key support RevB2     OTT TV BOX LINK: https://community.freescale.com/docs/DOC-94561   JB4.2 patches link : Patches for HDMI Dongle JB4.2.2_1.0.0-GA Release
記事全体を表示
i.MX6UL CSI (CMOS Sensor Interface) host port support BT.656(CCIR656) Interlace mode by hardware.  It can received  PAL(720pix X 576pix) and NTSC(720pix X 480 pix) format data from camera. This document introduce how to add this feature to Linux L3.14.38-ga and receive ADV7180 output. Software: yocto L3.14.38-ga. Hareware:  i.mx6ul-evk + ADV7180. ADV7180: PAL 720pix X576pix  ,  YUV4:2:2(UYVY) interlace output. LCD Display screen resolution:  800 X 480,  RGB565. 1) Note : For BT.656 mode,   parallel data port is  CSI_DATA[9:2], not CSI_DATA[13:6].    So,  "pinctrl_csi1" is the same as "ov5640" in "imx6ul-14x14-evk.dts": pinctrl_csi1: csi1grp {    fsl,pins = <     MX6UL_PAD_CSI_MCLK__CSI_MCLK  0x1b088     MX6UL_PAD_CSI_PIXCLK__CSI_PIXCLK 0x1b088     MX6UL_PAD_CSI_VSYNC__CSI_VSYNC  0x1b088     MX6UL_PAD_CSI_HSYNC__CSI_HSYNC  0x1b088     MX6UL_PAD_CSI_DATA00__CSI_DATA02 0x1b088     MX6UL_PAD_CSI_DATA01__CSI_DATA03 0x1b088     MX6UL_PAD_CSI_DATA02__CSI_DATA04 0x1b088     MX6UL_PAD_CSI_DATA03__CSI_DATA05 0x1b088     MX6UL_PAD_CSI_DATA04__CSI_DATA06 0x1b088     MX6UL_PAD_CSI_DATA05__CSI_DATA07 0x1b088     MX6UL_PAD_CSI_DATA06__CSI_DATA08 0x1b088     MX6UL_PAD_CSI_DATA07__CSI_DATA09 0x1b088     MX6UL_PAD_SNVS_TAMPER5__GPIO5_IO05 0x17059            /* configue csi_reset in this case */     MX6UL_PAD_SNVS_TAMPER6__GPIO5_IO06 0x17059            /* configure csi_en in this case*/    > 2) Applay the video driver patches as attatched.   $git am 0001-Enable-CSI-support-BT656-interlace-and-add-adv7180.patch 3) Build the kernel.    make imx_v7_defconfig    make -j4 4) Use  unit_tests "mx6s_v4l2_capture_uyvy.out" to test it,  source code is attached "mx6s_v4l2_capture.c": Copy "mx6s_v4l2_capture_uyvy.out" to target device FS  "/unit_tests" folder, and run it like this: ./mx6s_v4l2_capture_uyvy.out -m 0 -t 50 -d /dev/video0 5) In this "mx6s_v4l2_capture.c" demo test code,   it can utilize software algorithm to implement CSC(Color Space Conversion) from YUV4:2:2 to RGB. PXP module can realize hardware CSC and image resize. 6) How to use CSI + PXP to preview camera, refer to  unit_tests "imx-test" package "pxp_v4l2_test" - "pxp_v4l2_test.c"  . Run following command in Target device FS:   /unit_tests /*Record raw camera UYVY data(720x576) to save in test1.yuv */ ./mx6s_v4l2_capture_uyvy.out -m 0 -t 10 -of test1.yuv -d /dev/video0 /*Play this test1.yuv file(UYVY) by PXP engine and resize to full screan(800x480) */ ./pxp_v4l2_test.out -sx 800 -sy 480 -res 720:576 -dst 0:0:800:480 -a 100 -f 5 test1.yuv BLANK 7) The "pxp_v4l2_preview_test.c" demo attached  is  a TV-in demo for i.MX6ul which support ADV7180 camera preview by PXP in time. This demo implements scaling image frame to full screen, Alpha blending and Composite two image together function by PXP hardware.
記事全体を表示
It is based on L3.0.35_GA4.1.0 BSP.   In default Linux BSP, there are 3 kinds of de-interlace mode, motion =0,1,2 mode, motion mode 0 and 1 will use three fields for de-interlace, and motion mode 2 wil use one field for de-interlace, so the whole fps is 30. In this mode, for motion mode 0 and 1, field 1,2,3 was used for first VDI output frame of display; and field 3,4,5 was used for second VDI output frame of display; field 5,6,7 was used for third VDI output frame of display. One field data (such as 2,4,6) was used only once, so there is data lost.   After applied these patches, the VDI de-interlace output will be 60fps: for motion mode 0 and 1, field 0,1,2 was used for first VDI output frame of display; and field 1,2,3 was used for second VDI output frame of display; field 2,3,4 was used for third VDI output frame of display. So all field data will be used twice, there is no video data lost, the VDI quality was improved.   Kernel patches: 0001-Add-MEM-to-VDI-to-MEM-support-for-IPU.patch 0002-Add-IPU-IC-memcpy-support.patch 0003-IPU-VDI-support-switch-odd-and-even-field-in-motion-.patch 0004-IPU-VDI-correct-vdi-top-field-setting.patch   mxc_v4l2_tvin_imx6_vdi_60fps.zip: this is the test application sample code.   Test commands, parameter "-vd" means double fps VDI: ./mxc_v4l2_tvin.out -ol 0 -ot 0 -ow 720 -oh 480 -m 0 -vd  
記事全体を表示
Overview As more and more communication required between online and offline, the QR code is widely used in the mobile payment, mobile small apps, industry things identification and etc. The i.MX6UL/ULL has the IP of CSI and PXP for camera connection and image CSC/FLIP/ROTATION acceleration. A LCDIF IP is supporting the display, but no 3D IP support. This means this low power and low end AP is very suitable for the industry HMI segment, which does not require a cool 3D graphic display, but a simple and straightforward GUI for interaction. QR code scanner is one of the use cases in the industry segment, which more and more customer are focusing on. The i.MX6UL CPU freq of i.MX6UL is about 500Mhz, and it does not have GPU IP, so a lightweight GUI and window system is required. Here we recommend the QT with wayland backend (without X11), which would make the window system small and faster than traditional X11 UI. Why chose QT is because of it has open source version, rich components, platform independent, good performance for embedded system and strong development staffs like QtCreator for creating application. How to enable the QT development environment, check this: Enable QT developement for i.MX6UL (v2)  Here I made a QR code scanner demo based on QT5.6 + QZXing (QR/Bar code scan engine) running on the i.MX6UL EVK board with a UVC camera (at least 640x480 resolution is required) and 480x272px LCD. Source code is open here (License Apache2.0): https://github.com/muddog/QRScanner  Implementation To do camera preview and capture, you must think on the gstreamer first, which is easy use and has the acceleration pads which implemented by NXP for i.MX6UL. Yes, it's very easy for you to enable the preview in console like: $ gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,format=YUY2,width=640,height=320 ! imxvideoconvert_pxp ! video/x-raw,format=RGB16 ! waylandsink It works under the i.MX6UL EVK, with PXP IP to do color space convert from YUY2 -> RGB16 acceleration, also the potential scaling of the image. The CPU loading of this is about 20-30%, but if you use the component of "videoconvert" to replace the "imxvideoconvert_pxp", we do CSC and scale by CPU, then the loading would increase to 50-60%. The "/dev/video1" is the device node for UVC camera, it may different in your environment. So our target is clear, create such pipeline (with PXP acceleration) in the QT application, and use a appsink to get preview images, do simple "sink" to one QWidget by drawing this image on the widget surface for preview (say every 50ms for 20fps). Then in other thread, we fetch the preview buffer in a fixed frequency (like every 0.5s), then feed it into the ZXing engine to decode the strings inside this image. Here are the class created inside the source code: ScannerQWidgetSink It act as a gstreamer sink for preview rendering. Init the pipeline, create a timer with timeout every 50ms. In the timer handler, we use appsink to copy the camera buffer from gstreamer, and tell the ViewfinderWidget to do update (re-draw event). ViewfinderWidget This class inherit from the QWidget, which draw the preview buffer as a QImage onto it's own surface by using QPainter. The QImage is created at the very begining with the image buffer created by the ScannerQWidgetSink. Because QImage itself does not maintain the image buffer, so the buffer must be alive during it's usage. So we keep this buffer during the ScannerQWidgetSink life cycle, copy the appsink buffer from pipeline to it for preview. MainWindow Create main window, which does not have title bar and border. Start any animation for the red line scan bar. Create instance of DecoderThread and ScannerQWidgetSink. Setup and start them. DecoderThread A infinite loop, to wait for a available buffer released by the ScannerQWidgetSink every 0.5s. Copy the buffer data to it's own buffer (imgData) to avoid any change to the buffer by sink when doing decoding. Then feed this copy of buffer into ZXing engine to get decoder result. Then show on the QLabel. Screenshot under wayland (weston) desktop: Customize Camera instance Now I use the UVC camera which pluged in the USB host, which device node is /dev/video1. If you want to use CSI or other device, please change the construction parameters for ScannerQWidgetSink(): sink = new ScannerQWidgetSink(ui->widget, QString("v4l2src device=/dev/video1")); Image resolution captured and review Change the static member value of ScannerQWidgetSink class: uint ScannerQWidgetSink::CAPTURE_HEIGHT = 480; uint ScannerQWidgetSink::CAPTURE_WIDTH = 640; Preview fps and decoding frequency Find the "framerate=20/1" strings in the ScannerQWidgetSink::GstPipelineInit(), change to your fps. You also have to change the renderTimer start timeout value in the ::StartRender(). The decoding frequency is determined by renderCnt, which determine after how many preview frames showed to feed the decoder. Main window size It's fixed size of main window, you have to change the mainwindow.ui. It's easy to do in the QtCreate Designer. FAQ Why not use CSI camera in demo? Honestly, I do not have CSI camera module, it's also DNP when you buying the board on NXP.com. So a widely used UVC camera is preferred, it's also easy for you to scan QR code on your phone, your display panel etc. Why not use QCamera to do preview and capture? The QCamera class in the Qtmultimedia component uses the camerabin2 gstreamer plugin, which create a very long pipeline for different usage of viewfinder, image capture and video encoder. Camerabin2 would eat too much CPU and memory resource, take picture and recording are very very slow. The preview of 30fps would eat about 70-80% CPU loading even I hacked it using imxvideoconvert_pxp instread of software videoconvert. Finally I give up to implement the QRScanner based on QCamera. How to make sure only one instance of QT app is running? We can use QSharedMemory to create a share memory with a unique KEY. When second instance of app is started, it would check if the share memory with this KEY is created or not. If the shm is there, it means there's already one instance running, it has to exit(). But as the QT mentioned, the QSharedMemory can not be destroyed correctly when app crashed, this means we have to handle each terminate signal, and do delete by ourselves: static QSharedMemory *gShm = NULL; static void terminate(int signum) {    if (gShm) {       delete gShm;       gShm = NULL;    }    qDebug() << "Terminate with signal:" << signum;    exit(128 + signum); } int main(int argc, char *argv[]) {    QApplication a(argc, argv);    // Handle any further termination signals to ensure the    // QSharedMemory block is deleted even if the process crashes    signal(SIGHUP, terminate ); // 1    signal(SIGINT, terminate ); // 2    signal(SIGQUIT, terminate ); // 3    signal(SIGILL, terminate ); // 4    signal(SIGABRT, terminate ); // 6    signal(SIGFPE, terminate ); // 8    signal(SIGBUS, terminate ); // 10    signal(SIGSEGV, terminate ); // 11    signal(SIGSYS, terminate ); // 12    signal(SIGPIPE, terminate ); // 13    signal(SIGALRM, terminate ); // 14    signal(SIGTERM, terminate ); // 15    signal(SIGXCPU, terminate ); // 24    signal(SIGXFSZ, terminate ); // 25    gShm = new QSharedMemory("QRScannerNXP");    if (!gShm->create(4, QSharedMemory::ReadWrite)) {       delete gShm;       qDebug() << "Only allow one instance of QRScanner";       exit(0);    } .....
記事全体を表示
Hello everyone, this document will explain on how to use the UUU (Universal Update Utility) tool to flash Linux to an i.MX device (i.MX 8MM).   Requirements:   MX 8M Mini EVK UUU tool documentation, available here Linux Binary Demo Files - i.MX 8MMini EVK UUU 1.2.135 binary Serial console emulator (tera term or putty)   UUU auto script For this example is used the L4.14.98_2.0.0_ga demo image for the i.MX 8MM, inside the demo image we will find the auto script, which by default flash the eMMC of the board, the structure of the script is as following   /***********************************************************************************/ uuu_version 1.2.39   # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ SDP: boot -f imx-boot-imx8mmevk-sd.bin-flash_evk   # This command will be run when ROM support stream mode # i.MX8QXP, i.MX8QM SDPS: boot -f imx-boot-imx8mmevk-sd.bin-flash_evk   # These commands will be run when use SPL and will be skipped if no spl # SDPU will be deprecated. please use SDPV instead of SDPU # { SDPU: delay 1000 SDPU: write -f imx-boot-imx8mmevk-sd.bin-flash_evk -offset 0x57c00 SDPU: jump # }   # These commands will be run when use SPL and will be skipped if no spl # if (SPL support SDPV) # { SDPV: delay 1000 SDPV: write -f imx-boot-imx8mmevk-sd.bin-flash_evk -skipspl SDPV: jump # }   FB: ucmd setenv fastboot_dev mmc FB: ucmd setenv mmcdev ${emmc_dev} FB: ucmd mmc dev ${emmc_dev} FB: flash -raw2sparse all fsl-image-validation-imx-imx8mmevk.sdcard FB: flash bootloader imx-boot-imx8mmevk-sd.bin-flash_evk FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi; FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0 FB: done /***********************************************************************************/    In short, when the board goes into serial downloader mode UUU downloads the bootloader to internal RAM, once done and uboot is running, through fastboot utility it will flash .sdcard file and uboot to the eMMC on the board.   More information about the protocol UUU use please refer to the UUU documentation (UUU.pdf) section 5 Supported protocol.   Running the tool In order to run the tool the binary of uuu needs to be downloaded, the binary files can be downloaded from the link above, uuu.exe is for Windows and uuu is for Linux. Once downloaded it can be placed inside the same file as the demo image, this so it is easy to run and cleaner on the shell commands.   Windows In windows OS the tool should be run using the Windows PowerShell in administrator mode, once open we will run the next commands: > .\uuu.exe uuu.auto   Linux >$ sudo ./uuu uuu.auto   The tool will start running and should be waiting for any i.MX device to be detected by host pc   Preparing the board For the board to be flashed it is needed to be in download mode, the switch configuration (i.MX 8MM EVK) is as following: SW1101  -  1010XXXXXX SW1102  -  XXXXXXXXX0   Connect a USB cable from the host pc which will run the tool to the USB OTG/TYPE C port, usually specified as download, on the board.   Connect a USB cable from the host to the OTG-to-UART for console output, usually specified as debug, on the board.   Open terminal emulator program with the following settings: Bits per second - 115200 Data bits - 8 Parity - None Stop bits - 1 Flow control - None   Power on the board, the download will start and the serial prompt will show the progress in uboot, wait until the tool show success.   Finally power off the board and change the switch configuration to boot from the eMMC, power on the board again and it should boot successfully!   Built in scripts One can use the built in scripts using the -b option to burn the bootloader  and the rootfs to the target flash, just type the command accordingly to the target flash device.    SD Write bootloader only: Windows: > .\uuu.exe -b sd <bootloader> Linux: $ sudo ./uuu -b sd <bootloader>   Replace <bootloader> for your .imx/.bin file, example using the i.MX 8MM for Windows and Linux respectively below. > .\uur.exe -b sd imx-boot-imx8mmevk-sd.bin-flash_evk $ sudo ./uuu -b sd imx-boot-imx8mmevk-sd.bin-flash_evk    Write whole Linux image Windows: > .\uuu.exe -b sd_all <bootloader> <rootfs>.sdcard Linux: $ sudo ./uuu -b sd_all <bootloader> <rootfs>.sdcard   Replace <bootloader> and <rootfs> for the name of your .imx/.bin and .sdcard files respectively, example using the i.MX 8MM below. > .\uuu.exe -b sd_all  imx-boot-imx8mmevk-sd.bin-flash_evk fsl-image-validation-imx-imx8mmevk.sdcard $ sudo ./uuu -b sd_all  imx-boot-imx8mmevk-sd.bin-flash_evk fsl-image-validation-imx-imx8mmevk.sdcard   eMMC Write bootloader only Windows: > .\uuu.exe -b emmc <bootloader> Linux: $ sudo ./uuu -b emmc <bootloader>   Example using i.MX 8MM > .\uuu.exe -b emmc imx-boot-imx8mmevk-sd.bin-flash_evk $ sudo ./uuu -b emmc imx-boot-imx8mmevk-sd.bin-flash_evk   Write whole Linux image Windows: > .\uuu.exe -b emmc_all <bootloader> <rootfs>.sdcard Linux: $ sudo ./uuu -b emmc_all <bootloader> <rootfs>.sdcard   Example using i.MX 8MM > .\uuu.exe -b emmc_all imx-boot-imx8mmevk-sd.bin-flash_evk fsl-image-validation-imx-imx8mmevk.sdcard $ sudo ./uuu -b emmc_all imx-boot-imx8mmevk-sd.bin-flash_evk fsl-image-validation-imx-imx8mmevk.sdcard   Hope this will helpful for everyone who is starting to use this flashing tool.
記事全体を表示
19-iMX_Serial_Download_Protocol.py zip file
記事全体を表示
Instrumenting A Board To instrument a board, the connection between the power supply and the target device needs to be broken, usually via a series resistor that's placed on the board. Sometimes the inductor needs to be lifted if no series resistor was included on the rail by the board's designer. In the ideal case, through-hole connections were also provided on the board for the connection of these off-board sensors. Here are three close-up photos that show several boards that have been instrumented: In all three cases, the sensors stand in place via the two outer current carrying wires. The middle and right used insulated wires where as the one on the left used bare wires. In all three cases, the sensor's + connection needs to go towards the power supply and the - connection goes to the target device. The outer wires here are 24-26 gauge. (The relatively heavy gauge wire is used to keep the series resistance of inserting a smart sensor to a minimum.) The ground connection is the middle hole of the smart sensor. In the left and middle photos, a 30 gauge wire connects to the middle hole ground connection on the  board. In the right photo, the ground wire was more conveniently added to a big cap just below the bottom of edge of the photo. Here are wider angle view photos of two of the boards above: The sensors on the left are free-standing since the current carrying wires are stiff enough to hold them upright. Care must be taken since too much flexing will cause a wire to break. Too much bending can also cause a short to the board (and that's why insulated wires were used on these boards). The board on the right has the sensors laying parallel to the board. They are not affixed to the board, but a wire is wrapped around the bundle of ribbon cables out of view past the right edge of the photo. For boards without the through hole connections, the smart sensors need to be immobilized to keep from pulling the SMT pads off the board. If there is room on the board or sides of connectors or large components, the sensors may be attached down with foam double-sticky tape (see photo below, sensor affixed on top i.MX7ULP): For boards where there are no convenient unpopulated areas or there are too many sensors, some other means needs to be devised to immoblize the smart sensors. In the left photo below, two inductors per sensor have been flipped and the two sensors inserted to instrument the two rails. The solder pads on the inductors would easily be broken off by any movement of the smart sensors, so a cage with clamps to hold the ribbon cables was 3D printed. On the back side, there is room for the aggregator to be zip tied to the bottom plate, so the instrumented board can be moved as a single unit with minimal flexing of the ribbon cables.
記事全体を表示
Building using Yocto 1 - Baking (building) the kernel When an image is built using Yocto (for more details about how to build an image, check the Yocto training home: https://community.nxp.com/docs/DOC-94849) the kernel is automatically built and the kernel image is located at /fsl-community-bsp/build/tmp/deploy/images/<your_target>/uImage If you want to build only the kernel, the following command can be used: $ bitbake linux-imx     2 - Configuring the kernel To call the kernel menuconfig, run the command: $ bitbake -c menuconfig linux-imx    A new terminal window will open with the kernel menuconfig. Make changes if needed, exit the configmenu and copy the .config generated file to defconfig as following: $ cp tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r33.10/git/.config ../sources/meta-fsl-arm/recipes-kernel/linux/linux-imx-3.0.35/mx6/defconfig    Note that the kernel version, in this case "3.0.35-r33.10" may change. 3 - Cleaning and building again with the new configuration With the new defconfig saved on the correct folder (step 2), it's time to clear all previous kernel and build it again: $ bitbake -c cleansstate linux-imx $ bitbake <your_image>       or         $ bitbake linux-imx    The uImage will be under tmp/deploy/image Building without a BSP 1- Downloading the kernel source code Choose what kernel you will build. Usually, the NXP kernel or mainline (kernel.org) kernel: For NXP kernel (more details on https://source.codeaurora.org/external/imx/linux-imx/ ) use: $ git clone https://source.codeaurora.org/external/imx/linux-imx                 For Mainline kernel (more details on https://www.kernel.org/ ) use: $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git                2 - Choose which branch will you use Once downloaded, check the available branches by using: $ git branch -a   master   remotes/origin/HEAD -> origin/master   remotes/origin/imx_4.9.123_imx8mm_ga   remotes/origin/imx_4.9.51_imx8_beta1   remotes/origin/imx_4.9.51_imx8_beta2   remotes/origin/imx_4.9.51_imx8m_beta   remotes/origin/imx_4.9.51_imx8m_ga   remotes/origin/imx_4.9.88_2.0.0_ga   remotes/origin/imx_4.9.88_imx8mm_alpha   remotes/origin/imx_4.9.88_imx8qxp_beta2   remotes/origin/master Make a local branch, based on a branch you choose from the list: $ git checkout -b local_branch origin/imx_4.9.88_2.0.0_ga *NOTES:      On command above my local branch name is "local_branch". You can choose this name as you prefer                     The chosen branch was origin/imx_4.9.88_2.0.0_ga. You can choose another one, always starting by origin/....... 3 - Setting the environment variables 3.1 - Using Yocto Toolchain If you're using the Yocto SDK (Check the Yocto training at NXP community: https://community.nxp.com/docs/DOC-94849 ), just execute the script to export the needed environment variables, e.g.: $ source /opt/poky/1.6+snapshot/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi  $ unset LDFLAGS      If you're using another toolchain, the common environment variables to set are the following: $ export PATH=$PATH:/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/ $ export TOOLCHAIN=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/ $ export CROSS_COMPILE=arm-none-linux-gnueabi- $ export ARCH=arm IMPORTANT: Change the variables above according your installed toolchain. 3.2 - Using Ubuntu Toolchain For 64-bits processors (i.MX8 family) Install the GCC toolchain for 64 bits: sudo apt-get install gcc-aarch64-linux-gnu Export the environment variables: $ export ARCH=arm64 $ export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu- For 32-bits processors (i.MX2, i.MX3, i.MX5 and i.MX6 families) Install the GCC toolchain for 32 bits: sudo apt-get install gcc-arm-linux-gnueabi Export the environment variables: export ARCH=arm export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- 4 - Configuring the kernel If you're building for i.MX6 and i.MX5, configure the kernel options based on file imx_v7_defconfig: $ cp arch/arm/configs/imx_v7_defconfig .config $ make menuconfig  $ make If you're building for i.MX8 family, configure the kernel options based on file arm64/defconfig:       $ cp arch/arm64/configs/defconfig .config       $ make menuconfig       $ make 5 - Building the modules After step 4, only the kernel (uImage file) was generated. The kernel modules must be built and installed in a known path. First, build the modules: $ make modules             And install them: $ make modules_install INSTALL_MOD_PATH=/path_where_you_want_to_install            
記事全体を表示
i.MX Family Processor The i.MX family is designed for use in smartphones, wireless PDAs, gaming and many other mobile wireless applications, Freescale's i.MX Family of applications processors are a leading solution in today's smartphone environment. Based on ARM® core technology, the i.MX1, i. MXL, i.MX21, i.MX27 and i.MX31 are designed to offer low power consumption with real-world power performance and a high degree of integration to reduce your design time significantly. The i.MX Family supports a broad range of industry-leading platforms such as those based on the Microsoft® Window® CE operating systems, Palm® OS, Linux® OS, and Symbian™ operating systems. The i.MX portfolio is a leading solution in today's smartphone environment and is a central feature of Freescale's i.Smart smartphone reference design, providing power performance to our Innovative Convergence™ platforms. We are committed to continually expanding our Innovative Convergence platforms to support new technologies and new services as they emerge into the marketplace, such as advanced display technologies including smart panels; streaming video; multiple operating systems; and the far-reaching capabilities of the personal server.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Processor CPU Speed FPU DMA Channels Embedded SRAM Flash Boot Video Acceleration 2D/3D Graphics i.MXS ARM920T 100MHz No 11 No NOR No No i.MXL ARM920T 200MHz No 11 No NOR DCT/iDCT Hardware Acceleration 2D/3D Graphics Through Software i.MX21S ARM926EJ-S 266MHz No 16 6KB NAND or NOR No No i.MX21 ARM926EJ-S 350MHz No 16 6KB NAND or NOR MPEG4 CIF 30 fps encoder and decoder 2D/3D Graphics with external accelerator i.MX27 ARM926EJ-S 400MHz No 16 45KB NAND or NOR H.264, MPEG-4, H.263 HW Enc/Dec; 24 fps VGA Full Duplex No i.MX31L ARM1136JF-S 532MHz Yes 32 16KB NAND or NOR MPEG4 VGA 30 fps Encode No i.MX31 ARM1136JF-S 532MHz Yes 32 16KB NAND or NOR MPEG4 VGA 30 fps Encode Integrated 2-D/3-D Processing Unit with OpenGL® Support i.MX35 ARM1136JF-S 532MHz Yes 32 128KB NAND, NOR, MMC/SD MPEG-4, H.264, ... Integrated 2D Processing Unit (Z160 @133MHz) with OpenVG® 1.1 Support i.MX51 ARM Cortex-A8 800MHz Yes 32 128kB NAND, NOR, MMC/SD MJPEG, MPEG-2, MPEG-4, H.263/264, VC-1, DivX, RV10 Integrated 2D (Z160 core @166MHz) and 3D (Z430 core @166MHz) Processing Unit with OpenVG® 1.1 and OpenGL ES® 2.0 / Direct3D Mobile Support i.MX53 ARM Cortex-A8 1GHz Yes 32 144kB NAND, NOR, MMC/SD MJPEG, MPEG-2, MPEG-4, H.263/264, VC-1, DivX, RV10 Integrated 2D and 3D (Z430 core @200MHz) Processing Unit with OpenVG® 1.1 and OpenGL ES® 2.0 / Direct3D Mobile Support For complete comparison click here. For more information about i.MX Family click here.
記事全体を表示
Question: To eliminate the need for pull-ups AND  pull-downs on the gpio boot override pins to save board space, does anyone know when in the boot rom that the GPIO pins are sampled and whether the internal Pull Downs are already enabled? Is this true for all the GPIO override pins? To just be able to provide an external Pull-up to specify boot options and NOT both pull-up and pull-down option. Can this be done? Answer: The pull-ups and pull-downs are active while POR_B is low (as defined in the datasheet). The pins are sampled on the 2 nd rising edge of RTC_XTALO before the rising edge of POR_B. As a caution, on-chip pull-up/downs are very weak and are primarily intended for controlling the pin (keeping it from logically wiggling) if the pin is not connected at all. If a pin is connected out to a trace, relaying on the on-chip PU/PD alone could be a little risky. Since the PU/PD is weak, it's possible to have noise coupled onto the pin. [Similar to Brett's comment above].
記事全体を表示
When configuring i.MX6 IPU IDMAC CPMEM parameters or debugging it, it's hard to find the value of a parameter inside the 160 bits word. This web tool separates the 160 bits words into parameters making it easier to check their values. Link: i.MX Tools 
記事全体を表示
Question: The i.MX6 documentation gives several different values for the maximum frequency of the IPU’s HSP_CLK clock. What are the correct HSP_CLK maximum frequency values for the i.MX6 Dual/Quad and Solo/DualLite? Can HSP_CLK run at 270 MHz on both the DQ and SDL CPUs, but it’s not clear from the documentation if this is permitted. Maximum HSP_CLK frequencies listed in the reference manual (DQ😞 264 MHz (Table 9-2 (IPU IP Parametric Table), Table 9-5 (IPU Clock Sources)) 266 MHz (Table 18-3 (System Clock Frequency Values)) Maximum HSP_CLK frequencies listed in the reference manual (SDL😞 270 MHz (Table 9-2 (IPU IP Parametric Table), Table 9-5 (IPU Clock Sources), Table 18-3 (System Clock Frequency Values)) Answer: Referring to Figure 18-2, IPU1_HSP_CLK_ROOT may be selected to have 1 of 4 sources. These sources are highlighted in yellow on the northwest corner of the page and the previous paragraph states these are max values. Possible sources are 540, 528, 396, and 480 MHz. The 480 MHz is divided by 4 before the selector, so winds up being 120 MHz. Per the diagram, these are all divided by 2 for IPU1_HSP_CLK_ROOT. The result is 270, 264, 198, and 60 MHz choices. Therefore, the max for IPU1_HSP_CLK_ROOT is 270 MHz for DQ. MX6D/Q and MX6S/DL are different with respect to max HSP_CLK frequency. MX6D/Q = 264 MHz max MX6S/DL = 270 MHz max
記事全体を表示
本文档主要包括两个部分: 1:如何将一首超过两声道的多声道音乐放到多个双声道声卡上播放,来模拟原音乐文件的多声道输出。 2:如何将多个双声道音乐文件同时放到一个8声道的声卡的不同channel上播放。 涉及的文件:etc/asound.conf 1:如何将一首超过两声道的多声道音乐放到多个双声道声卡上播放,来模拟原音乐文件的多声道输出。 1):Sabresd板子 按设计来讲,sabresd板子最多只能播双声道的音乐,但是如果一个音乐文件是四声道,该如何用sabresd板子来播放呢? 可以让前两个声道通过WM8962来播放,后两个声道通过HDMI来播放: 33 pcm.multi { 34         type multi 35 36         slaves.a.pcm "hw:0,0" 37         slaves.a.channels 2 38         slaves.b.pcm "hw:1,0" 39         slaves.b.channels 2 40 41         bindings.0.slave a 42         bindings.0.channel 0 43         bindings.1.slave a 44         bindings.1.channel 1 45         bindings.2.slave b 46         bindings.2.channel 0 47         bindings.3.slave b 48         bindings.3.channel 1 49 } 273 pcm.asymed{ 274 type asym 275 playback.pcm "multi" 276 capture.pcm "dsnoop_44100" 277 } 278 279 ctl.multi{ 280         type hw; 281         card 0; 282 } 289 pcm.!default{ 290 type plug 291 route_policy "average" 292 slave.pcm "asymed" 293 } 可以通过以下命令来测试: speaker-test -c 4 -t sine speaker-test -c 4 -t sine -D multi 2):ARD板子 ARD板子,6声道的audio文件,用ESAI来播放前四个channel,后两个channel用HDMI来播放: 33 pcm.multi { 34         type multi 35 36         slaves.a.pcm "hw:0,0" 37         slaves.a.channels 4 38         slaves.b.pcm "hw:2,0" 39         slaves.b.channels 2 40 41         bindings.0.slave a 42         bindings.0.channel 0 43         bindings.1.slave a 44         bindings.1.channel 1 45         bindings.2.slave a 46         bindings.2.channel 2 47         bindings.3.slave a 48         bindings.3.channel 3 49         bindings.4.slave b 50         bindings.4.channel 0 51         bindings.5.slave b 52         bindings.5.channel 1 53 } 273 pcm.asymed{ 274 type asym 275 playback.pcm "multi" 276 capture.pcm "dsnoop_44100" 277 } 278 279 ctl.multi{ 280         type hw; 281         card 0; 282 } 289 pcm.!default{ 290 type plug 291 route_policy "average" 292 slave.pcm "asymed" 293 } 可以用下面命令来测试: 播源文件是6声道的音乐: aplay 48kHz16bit-six-channel.wav aplay -D multi 48kHz16bit-six-channel.wav speaker-test -c 6 -t sine speaker-test -c 6 -t sine -D multi 播源文件是双声道的音乐,ESAI的四个channel和HDMI的两个声道都是该音乐: aplay heart.wav 2:如何将多个双声道音乐文件同时放到一个8声道的声卡的不同channel上播放。 我们ARD的板子,ESAI是8声道的,大部分音乐都是双声道的,ESAI的6个channel会被浪费掉。如何将其余的6个声道也应用起来? alsa lib有dshare这个plugin,可以将4个双声道的音乐文件当成一个8声道的音乐来处理。 28  pcm_slave.nforce { 29        pcm "hw:0,0” 30        channels 8 31        rate 48000        # fixed, because all dshare devices must use the same samplerate. 32        buffer_size 4096  # make these sizes smaller for lower latency 33        period_size 1024 34        periods 4 35        period_time 0 36    } 37 39  pcm.ch12 { 40        type dshare 41        ipc_key 47110815 42        slave nforce 43        bindings.0 0 44        bindings.1 1 45    } 46 47  pcm.ch34 { 48        type dshare 49        ipc_key 47110815 50        slave nforce 51        bindings.0 2 52        bindings.1 3 53    } 54 55   pcm.ch56 { 56        type dshare 57        ipc_key 47110815 58        slave nforce 59        bindings.0 4 60        bindings.1 5 61    } 62 63   pcm.ch78 { 64        type dshare 65        ipc_key 47110815 66        slave nforce 67        bindings.0 6 68        bindings.1 7 69    } 可以通过下面的命令来测试: (aplay -Dplug:ch12 XX.wav &) (aplay -Dplug:ch34 XXX.wav &) (aplay -Dplug:ch56 XXXX.wav &) (aplay -Dplug:ch78 XXXXX.wav &) 四首音乐会分配到ESAI的8个channel上。
記事全体を表示