VIA Technologies SOM-9X50-STK User manual

QUICK START GUIDE
VIA SOM-9X50-STK
Yocto 3.1 EVK
1.01-15042022

Copyright
Copyright © 2022 VIA Technologies Incorporated. All rights reserved.
No part of this document may be reproduced, transmied, transcribed, stored in a retrieval system, or translated into any language, in any
form or by any means, electronic, mechanical, magnec, opcal, chemical, manual or otherwise without the prior wrien permission of
VIA Technologies, Incorporated.
Trademarks
All brands, product names, company names, trademarks and service marks are the property of their respecve holders.
Disclaimer
VIA Technologies makes no warranes, implied or otherwise, in regard to this document and to the products described in this document.
The informaon provided in this document is believed to be accurate and reliable as of the publicaon date of this document. However,
VIA Technologies assumes no responsibility for the use or misuse of the informaon (including use or connecon of extra device/
equipment/add-on card) in this document and for any patent infringements that may arise from the use of this document. The informaon
and product specicaons within this document are subject to change at any me, without noce and without obligaon to nofy any
person of such change.
VIA Technologies, Inc. reserves the right the make changes to the products described in this manual at any me without prior noce.
ii

iii
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
Revision History
Version Date Remarks
1.01 15/04/2022 Updated introducon and product naming
1.00 22/02/2022 Inial release

VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
Table of Contents
1. Introducon.................................................................................................................................................... 1
1.1 EVK Package Contents........................................................................................................................... 1
1.1.1 Firmware Folder Contents ............................................................................................................. 1
1.1.2 Document Folder Contents............................................................................................................ 1
1.1.3 Tool Folder Contents...................................................................................................................... 1
1.2 Version Informaon and Supported Features....................................................................................... 2
2. Image Installaon........................................................................................................................................... 3
2.1 Installing with the Fastboot Mode ........................................................................................................ 3
3. Hardware Funcons ....................................................................................................................................... 8
3.1 Using the Debug Console...................................................................................................................... 8
3.2 Changing Kernel Debug Level................................................................................................................ 8
3.3 Checking BSP Version............................................................................................................................ 8
3.4 DVFS...................................................................................................................................................... 9
3.5 Display................................................................................................................................................... 9
3.6 Video Playback.................................................................................................................................... 10
3.7 Audio Output and Record ................................................................................................................... 11
3.8 Camera................................................................................................................................................ 12
3.9 Wi-Fi.................................................................................................................................................... 12
3.10 Bluetooth ............................................................................................................................................ 13
iv

1
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
1. Introducon
This Quick Start Guide provides an overview on how to boot the Yocto image for the VIA SOM-9X50-STK and
congure the supported hardware funcons in the build.
Note:
The VIA SOM-9X50-STK includes the VIA SOM-9X50 module and the VIA VAB-950 reference carrier board.
The VIA SOM-9X50-STK Yocto 3.1 EVK is developed based on the MediaTek Yocto 3.1 BSP, and it enables the
hardware features of the VIA SOM-9X50-STK.
1.1 EVK Package Contents
There are three folders in the package listed as below.
Firmware folder Descripon
VIA_SOM-9X50-STK_Yocto_3.1_EVK.zip Yocto image
Document folder Descripon
VIA_SOM-9X50-STK_Yocto_3.1_EVK_Quick_Start_Guide.pdf Quick Start Guide
Tool folder Descripon
VIA_Android_USB_Driver.zip VIA USB driver
1.1.1 Firmware Folder Contents
VIA_SOM-9X50-STK_Yocto_3.1_EVK.zip:Contains the precompiled Yocto image for evaluang the VIA SOM-
9X50-STK.
1.1.2 Document Folder Contents
VIA_SOM-9X50-STK_Yocto_3.1_EVK_Quick_Start_Guide.pdf: This Quick Start Guide provides an overview on
how to boot the Yocto image for the VIA SOM-9X50-STK and congure the supported hardware funcons in the
build.
1.1.3 Tool Folder Contents
VIA_Android_USB_Driver.zip: VIA USB driver.

2
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
1.2 Version Informaon and Supported Features
• Kernel version: 4.14.141
• Evaluaon image: Yocto 3.1
• Development based on MediaTek Yocto 3.1 BSP
• Supports eMMC boot
• Supports HDMI display
• Supports HDMI audio output
• Supports MIPI DSI capacive touch panel
−AUO 10.1 B101UAN01.7 (1920x1200)
−eGalax I2C touch
• Supports COM1 as RS-232 mode (TX/RX) and COM as debug port
• Supports two 10/100Mbps Ethernet ports
• Supports MediaTek MT6358 Headphone and Mic-in
• Supports MediaTek MT7668 Wi-Fi 802.11ac and Bluetooth 5.0
• Supports VIA EMIO-2574 (SIM7600JC-H) 4G LTE mobile broadband miniPCIe module
• Supports MIPI CSI OV5648 camera module
• Supports MediaTek NeuroPilot AI APU hardware acceleraon

3
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
2. Image Installaon
This secon explains the setup requirements for boong from the eMMC.
The precompiled images are provided in the "Firmware" folder.
2.1 Installing with the Fastboot Mode
The rst step is to prepare the "fastboot tool" and install the "VIA USB driver" into your Windows 10 host
machine.
To get the "fastboot tool" for Windows, please refer to the "SDK Plaorm Tools release notes" chapter on the
Android developer website (hps://developer.android.com/studio/releases/plaorm-tools).
To install the "VIA USB driver", right-click on the mouse buon to install the "android_winusb". When nished,
it will show "The operaon completed successfully".
Then connect the Windows 10 host machine and the VIA SOM-9X50-STK through the Micro USB 2.0 port using
the Micro USB cable.
Micro USB 2.0 port diagram
Next, on the VIA SOM-9X50-STK, set the two OS image jumpers (J7 and J5) to download mode as shown in the
diagram below.
OS image jumpers diagram
J5 and J7 Sengs Pin 1 Pin 2 Pin 3
Normal mode (default) Open Short Short
Download mode Short Short Open
OS image jumper sengs
Plug in the AC-to-DC power adapter to power on the VIA SOM-9X50-STK.
The VIA SOM-9X50-STK will stop at "fastboot: processing commands" as shown in the debug console below.
Fastboot Mode
Note:
Make sure the Windows 10 host machine detects the VIA SOM-9X50-STK as an Android device.

4
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
Extract the VIA_SOM-9X50-STK_Yocto_3.1_EVK.zip le on your Windows 10 host machine.
To install the image, use the following command:
D:\VIA_SOM-9X50-STK_Yocto_3.1_EVK>set PATH=D:\platform-tools;%PATH%
D:\VIA_SOM-9X50-STK_Yocto_3.1_EVK>viaash.exe
++++++++++++++++++++++++++++++++++++++++++++++++++++
VIAFlash version v1.0.0
(built: Feb 10 2022 09:53:25 UTC)
++++++++++++++++++++++++++++++++++++++++++++++++++++
To let this tool work well, please
ensure the system is at fastboot mode!
If yes, please press any key to continue.
++++++++++++++++++++++++++++++++++++++++++++++++++++
>> Image OS is "Yocto"
Addr: [0x0 - 0x100000] size: 0x100000
Addr: [0x0 - 0x7]
Addr: [0x0 - 0x8000] size: 0x8000
Addr: [0x0 - 0x3f]
Addr: [0x8000 - 0x208000] size: 0x200000
Addr: [0x40 - 0x103f]
Addr: [0x208000 - 0x408000] size: 0x200000
Addr: [0x1040 - 0x203f]
Addr: [0x408000 - 0x2408000] size: 0x2000000
Addr: [0x2040 - 0x1203f]
Addr: [0x2408000 - 0x4408000] size: 0x2000000
Addr: [0x12040 - 0x2203f]
Addr: [0x4408000 - 0x5308000] size: 0xf00000
Addr: [0x22040 - 0x2983f]
Addr: [0x5308000 - 0x6208000] size: 0xf00000
Addr: [0x29840 - 0x3103f]
Addr: [0x6208000 - 0x7108000] size: 0xf00000
Addr: [0x31040 - 0x3883f]
Addr: [0x7108000 - 0x7208000] size: 0x100000
Addr: [0x38840 - 0x3903f]
Addr: [0x7208000 - 0x7308000] size: 0x100000
Addr: [0x39040 - 0x3983f]
Addr: [0x7308000 - 0x7408000] size: 0x100000
Addr: [0x39840 - 0x3a03f]
Addr: [0x7408000 - 0x7908000] size: 0x500000
Addr: [0x3a040 - 0x3c83f]
Addr: [0x7908000 - 0x7e08000] size: 0x500000
Addr: [0x3c840 - 0x3f03f]
Addr: [0x7e08000 - 0x4c208000] size: 0x44400000
Addr: [0x3f040 - 0x26103f]
Addr: [0x4c208000 - 0x90608000] size: 0x44400000
Addr: [0x261040 - 0x48303f]
Addr: [0x90608000 - 0x9128e400] size: 0xc86400
Addr: [0x483040 - 0x489471]
Addr: [0x9128e400 - 0x9128e400] size: 0x0
Addr: [0x489472 - 0x489471]
Addr: [0x0080 - 0x8080] size: 0x8000
Addr: [0x7f80 - 0x7fbf]
++++++++++++++++++++++++++++++++++++++++++++++++++++
MBR : OK
bl2.img : OK
boot.img : OK
boot.img : OK
cam_vpu_a.img : OK
cam_vpu_b.img : OK
cam_vpu_c.img : OK
spmfw.img : OK
sspm-t.img : OK
sspm-t.img : OK
tee.img : OK
tee.img : OK
system.ext4 : OK

5
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
system.ext4 : OK
logo.bmp : OK
userdata.ext4 : OK
++++++++++++++++++++++++++++++++++++++++++++++++++++
=============================================
Start to ash images --> Yocto
=============================================
Sending 'preloader' (283 KB) OKAY [ 0.046s]
Writing 'preloader' OKAY [ 0.016s]
Finished. Total time: 0.180s
Erasing 'pgpt' OKAY [ 0.016s]
Finished. Total time: 0.024s
Sending 'pgpt' (17 KB) OKAY [ 0.026s]
Writing 'pgpt' OKAY [ 0.009s]
Finished. Total time: 0.068s
------------------------------------------------
Platform will be rebooted and continue soon,
please wait for ash completed
------------------------------------------------
Rebooting into bootloader OKAY [ 0.004s]
Finished. Total time: 0.006s
< waiting for any device >
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Warning: skip copying boot image avb footer (boot partition size: 0, boot image size:
20877906).
Sending 'boot_a' (20388 KB) OKAY [ 1.033s]
Writing 'boot_a' OKAY [ 0.453s]
Finished. Total time: 1.608s
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Warning: skip copying boot image avb footer (boot partition size: 0, boot image size:
20877906).
Sending 'boot_b' (20388 KB) OKAY [ 0.864s]
Writing 'boot_b' OKAY [ 0.457s]
Finished. Total time: 1.358s
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Sending 'cam_vpu_a' (1614 KB) OKAY [ 0.072s]
Writing 'cam_vpu_a' OKAY [ 0.040s]
Finished. Total time: 0.130s
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Sending 'cam_vpu_b' (14647 KB) OKAY [ 0.620s]
Writing 'cam_vpu_b' OKAY [ 0.321s]
Finished. Total time: 0.963s
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Sending 'cam_vpu_c' (135 KB) OKAY [ 0.008s]
Writing 'cam_vpu_c' OKAY [ 0.008s]
Finished. Total time: 0.043s

6
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Sending 'spmfw' (38 KB) OKAY [ 0.003s]
Writing 'spmfw' OKAY [ 0.005s]
Finished. Total time: 0.030s
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Sending 'sspm_a' (486 KB) OKAY [ 0.022s]
Writing 'sspm_a' OKAY [ 0.015s]
Finished. Total time: 0.056s
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Sending 'sspm_b' (486 KB) OKAY [ 0.023s]
Writing 'sspm_b' OKAY [ 0.016s]
Finished. Total time: 0.057s
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Sending 'tee_a' (1021 KB) OKAY [ 0.045s]
Writing 'tee_a' OKAY [ 0.026s]
Finished. Total time: 0.090s
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Sending 'tee_b' (1021 KB) OKAY [ 0.045s]
Writing 'tee_b' OKAY [ 0.027s]
Finished. Total time: 0.094s
(bootloader) display: hdmi
(bootloader) display: hdmi
Invalid sparse le format at header magic
(bootloader) display: hdmi
Sending sparse 'system_a' 1/12 (64504 KB) OKAY [ 2.727s]
Writing 'system_a' OKAY [ 1.459s]
Sending sparse 'system_a' 2/12 (57428 KB) OKAY [ 2.429s]
Writing 'system_a' OKAY [ 1.385s]
Sending sparse 'system_a' 3/12 (65532 KB) OKAY [ 2.768s]
Writing 'system_a' OKAY [ 1.444s]
Sending sparse 'system_a' 4/12 (65532 KB) OKAY [ 2.769s]
Writing 'system_a' OKAY [ 1.452s]
Sending sparse 'system_a' 5/12 (64588 KB) OKAY [ 2.731s]
Writing 'system_a' OKAY [ 1.445s]
Sending sparse 'system_a' 6/12 (65532 KB) OKAY [ 2.768s]
Writing 'system_a' OKAY [ 1.429s]
Sending sparse 'system_a' 7/12 (65532 KB) OKAY [ 2.770s]
Writing 'system_a' OKAY [ 1.442s]
Sending sparse 'system_a' 8/12 (65532 KB) OKAY [ 2.770s]
Writing 'system_a' OKAY [ 1.454s]
Sending sparse 'system_a' 9/12 (65020 KB) OKAY [ 2.748s]
Writing 'system_a' OKAY [ 1.424s]
Sending sparse 'system_a' 10/12 (65532 KB) OKAY [ 2.769s]
Writing 'system_a' OKAY [ 1.450s]
Sending sparse 'system_a' 11/12 (65532 KB) OKAY [ 2.779s]
Writing 'system_a' OKAY [ 1.432s]
Sending sparse 'system_a' 12/12 (6116 KB) OKAY [ 0.263s]
Writing 'system_a' OKAY [ 0.149s]
Finished. Total time: 47.460s
(bootloader) display: hdmi
(bootloader) display: hdmi
Invalid sparse le format at header magic
(bootloader) display: hdmi
Sending sparse 'system_b' 1/12 (64504 KB) OKAY [ 2.727s]
Writing 'system_b' OKAY [ 1.465s]
Sending sparse 'system_b' 2/12 (57428 KB) OKAY [ 2.427s]

7
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
Writing 'system_b' OKAY [ 1.381s]
Sending sparse 'system_b' 3/12 (65532 KB) OKAY [ 2.767s]
Writing 'system_b' OKAY [ 1.444s]
Sending sparse 'system_b' 4/12 (65532 KB) OKAY [ 2.768s]
Writing 'system_b' OKAY [ 1.440s]
Sending sparse 'system_b' 5/12 (64588 KB) OKAY [ 2.730s]
Writing 'system_b' OKAY [ 1.432s]
Sending sparse 'system_b' 6/12 (65532 KB) OKAY [ 2.767s]
Writing 'system_b' OKAY [ 1.437s]
Sending sparse 'system_b' 7/12 (65532 KB) OKAY [ 2.770s]
Writing 'system_b' OKAY [ 1.444s]
Sending sparse 'system_b' 8/12 (65532 KB) OKAY [ 2.769s]
Writing 'system_b' OKAY [ 1.451s]
Sending sparse 'system_b' 9/12 (65020 KB) OKAY [ 2.746s]
Writing 'system_b' OKAY [ 1.428s]
Sending sparse 'system_b' 10/12 (65532 KB) OKAY [ 2.768s]
Writing 'system_b' OKAY [ 1.448s]
Sending sparse 'system_b' 11/12 (65532 KB) OKAY [ 2.774s]
Writing 'system_b' OKAY [ 1.439s]
Sending sparse 'system_b' 12/12 (6116 KB) OKAY [ 0.262s]
Writing 'system_b' OKAY [ 0.138s]
Finished. Total time: 47.431s
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Sending 'logo' (6750 KB) OKAY [ 0.287s]
Writing 'logo' OKAY [ 0.151s]
Finished. Total time: 0.463s
(bootloader) display: hdmi
(bootloader) display: hdmi
(bootloader) display: hdmi
Sending 'userdata' (22528 KB) OKAY [ 0.952s]
Writing 'userdata' OKAY [ 0.500s]
Finished. Total time: 1.477s
=============================================
Finished. Re-Starting system ...
Rebooting OKAY [ 0.001s]
Finished. Total time: 0.004s
D:\VIA_SOM-9X50-STK_Yocto_3.1_EVK>
If you have already installed the image, use the following command to enter the Fastboot Mode on your
Windows 10 host machine.
D:\platform-tools>adb reboot bootloader
Unplug the AC-to-DC power adapter to power o the VIA SOM-9X50-STK.
Set the two OS image jumpers (J7 and J5) back to the normal mode seng.
OS image jumpers diagram
Unplug the Micro USB cable, press the Power Buon for 2 seconds, then release it to power on the VIA SOM-
9X50-STK. When the boot process has completed, you will see the Yocto 3.1 desktop.

8
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
3. Hardware Funcons
This secon explains how to enable and test the hardware funcons precompiled in the Yocto 3.1 EVK including
using the debug console.
3.1 Using the Debug Console
The rst step is to connect the host machine and the VIA SOM-9X50-STK through the COM connector labeled
as "COM". Use a serial port communicaon program such as PuTTY or Tera Term to connect the debug console.
Set the console Baud Rate to "921600".
COM connector diagram
Next, power on the VIA SOM-9X50-STK to iniate the boot process.
When the boot process has completed, log in to the debug console. The default account is "username: root /
password: root".
3.2 Changing Kernel Debug Level
To disable kernel messages, modify the debug level using the following command:
root@aiv8385-linux:~# echo 3 > /proc/sys/kernel/printk
3.3 Checking BSP Version
To check the BSP version, use the following command:
root@aiv8385-linux:~# cat /proc/version

9
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
3.4 DVFS
To verify the DVFS (Dynamic Voltage Frequency Scaling) funcon and list all the supported features, use the
following commands:
root@aiv8385-linux:~# ls –al /sys/devices/system/cpu/cpu0/cpufreq/
total 0
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 aected_cpus
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 cpuinfo_cur_freq
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 cpuinfo_max_freq
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 cpuinfo_min_freq
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 cpuinfo_transition_latency
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 related_cpus
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 scaling_available_frequencies
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 scaling_available_governors
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 scaling_cur_freq
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 scaling_driver
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 scaling_governor
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 scaling_max_freq
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 scaling_min_freq
-rwxr-xr-x 1 root root 4096 Dec 31 10:21 scaling_setspeed
drwxr-xr-x 2 root root 0 Dec 31 10:21 stats
To check the supported and current CPU frequency, use the following commands:
:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
1989000 1924000 1846000 1781000 1716000 1677000 1625000 1586000 1508000 1417000 1326000
1248000 1131000 1014000 910000 793000
:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
793000
3.5 Display
The VIA SOM-9X50-STK supports a choice of HDMI and LCD Panel display devices. To set the display device,
rst connect the Windows 10 host machine and the VIA SOM-9X50-STK through the Micro USB 2.0 port using a
Micro USB cable.
Then set the two OS image jumpers (J7 and J5) to the download mode.
OS image jumpers diagram
Plug in the AC-to-DC power adapter to power on the VIA SOM-9X50-STK.
Use the following command to enter the Fastboot Mode.
root@aiv8385-linux:~# reboot bootloader
Make sure there is a "fastboot: processing commands" message in the debug console.
Next, run the cmd.exe on your Windows 10 host machine.

10
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
Use the fastboot.exe to set the display device by using the following commands:
D:\platform-tools>fastboot.exe oem display dsi
D:\platform-tools>fastboot.exe oem display hdmi
Use the following command to check the current display device. In the example below, the current display
device is the LCD panel output.
D:\platform-tools>fastboot.exe getvar all
(bootloader) display: dsi
(bootloader) is-userspace: no
(bootloader) max-download-size: 0x4000000
(bootloader) version: 0.5
all: Done!!
Finished. Total time: 0.009s
Power o the VIA SOM-9X50-STK and set the two OS image jumpers (J7 and J5) back to the normal mode seng.
OS image jumpers diagram
Unplug the Micro USB cable, and then power on the VIA SOM-9X50-STK.
When the boot process has completed, the LCD panel output will be set as the display device
Note:
The default display device is HDMI output. Aer changing the display device, you must restart the VIA SOM-9X50-
STK.
To control the LCD backlight, use the following commands:
root@aiv8385-linux:~# cd /sys/devices/platform/backlight_lcd0/backlight/backlight_lcd0/
root@aiv8385-linux:~# cat max_brightness
16
root@aiv8385-linux:~# echo 16 > brightness
Note:
There are only 17 levels (0~16) for the LCD backlight control.
3.6 Video Playback
The VIA SOM-9X50-STK supports H.265 and H.264 video decoding up to 1080p@30fps/40Mbps.
To playback video, use the following command:
root@aiv8385-linux:~# gst-launch-1.0 playbin ags=0x42 audio-sink="alsasink device=hw:0,28"
video-sink="mtkmdp width=1280 height=640 ! video/x-raw,format=I420 ! mtkwaylandsink"
uri="le:///mnt/test.mp4"

11
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
3.7 Audio Output and Record
To set up the HDMI audio output, use the following command:
root@aiv8385-linux:~# aplay -Dhw:0,28 /data/sda1/test.wav
To set up the headphone audio output, use the following command:
root@aiv8385-linux:~# amixer cset numid=1 1
root@aiv8385-linux:~# amixer cset numid=2 1
root@aiv8385-linux:~# aplay -Dhw:0,0 /data/sda1/test.wav
To disable the headphone audio output, use the following command:
root@aiv8385-linux:~# amixer cset numid=1 0
root@aiv8385-linux:~# amixer cset numid=2 0
To set up the speaker audio output, use the following command:
root@aiv8385-linux:~# amixer cset numid=4 1
root@aiv8385-linux:~# aplay -Dhw:0,0 /data/sda1/test.wav
To disable the speaker audio output, use the following command:
root@aiv8385-linux:~# amixer cset numid=4 0
Note:
Before changing to dierent audio output device, you must make sure the previous audio output device is disabled.
To change the audio volume, use the following command:
root@aiv8385-linux:~# amixer cset numid=10 17
numid=10,iface=MIXER,name='Lineout_PGAL_GAIN'
; type=ENUMERATED,access=rw------,values=1,items=20
; Item #0 '8Db'
; Item #1 '7Db'
; Item #2 '6Db'
; Item #3 '5Db'
; Item #4 '4Db'
; Item #5 '3Db'
; Item #6 '2Db'
; Item #7 '1Db'
; Item #8 '0Db'
; Item #9 '-1Db'
; Item #10 '-2Db'
; Item #11 '-3Db'
; Item #12 '-4Db'
; Item #13 '-5Db'
; Item #14 '-6Db'
; Item #15 '-7Db'
; Item #16 '-8Db'
; Item #17 '-9Db'
; Item #18 '-10Db'
; Item #19 '-40Db'
: values=17
root@aiv8385-linux:~#
To set up the Mic-in audio recording, use the following command:
root@aiv8385-linux:~# amixer cset numid=36 ADC2
root@aiv8385-linux:~# amixer cset numid=23 1
root@aiv8385-linux:~# amixer cset numid=24 1
root@aiv8385-linux:~# amixer cset numid=27 IN_ADC2
root@aiv8385-linux:~# amixer cset numid=45 IN_ADC2
root@aiv8385-linux:~# arecord -Dhw:0,1 -c 2 -r 48000 -f S16_LE /data/sda1/t1.wav

12
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
3.8 Camera
To preview an image from the CSI camera, use the following command:
root@aiv8385-linux:~# gst-launch-1.0 v4l2src device=/dev/video5 io-mode=mmap ! video/x-
raw,format=YUY2, width=1280,height=720, framerate=30/1 ! mtkmdp width=1280 height=720 !
mtkwaylandsink sync=false
To capture an image from the CSI camera, use the following command:
root@aiv8385-linux:~# gst-launch-1.0 -v v4l2src device=/dev/video5 num-buers=1 ! video/x-
raw, format=YUY2, width=1280,height=720, framerate=30/1 ! jpegenc ! lesink location=/data/
sda1/test.jpg
To record a video le from the CSI camera, use the following command:
root@aiv8385-linux:~# gst-launch-1.0 -v v4l2src device="/dev/video5" ! video/x-raw,format=\
(string\)YUY2,width=1280,height=720 , framerate=30/1 ! mtkmdp width=1280 height=720 ! video/
x-raw,format=I420 ! v4l2h264enc bitrate= 9000000 gop=1 ! avimux ! lesink location=/data/
test.avi
To playback a record video le from the CSI camera, use the following command:
root@aiv8385-linux:~# gst-launch-1.0 -q playbin uri=le:/data/test.avi ags=0x42 video-
sink="mtkmdp width=640 height=480 ! mtkwaylandsink" audio-sink="fakesink"
3.9 Wi-Fi
To check the current Wi-Fi AP "ssid" and "psk", use the follwing command:
root@aiv8385-linux:~# cat /data/wi/wpa_supplicant.conf
ctrl_interface=/tmp/wpa_supplicant
update_cong=1
network={
ssid="via_test"
psk="12345678"
key_mgmt=WPA-PSK
priority=100
}
p2p_no_group_iface=1
cong_methods=display push_button keypad
driver_param=use_p2p_group_interface=1
wowlan_triggers=disconnect
wps_cred_processing=2
p2p_disabled=1
root@aiv8385-linux:~#
To change the Wi-Fi AP "ssid" and "psk", use the following command:
root@aiv8385-linux:~# vi /data/wi/wpa_supplicant.conf
The output will be displayed as follows. Update the "ssid" and "psk" values to the desired values and save.
ctrl_interface=/tmp/wpa_supplicant
update_cong=1
network={
ssid="via_test"
psk="12345678"
key_mgmt=WPA-PSK
priority=100
}
p2p_no_group_iface=1
cong_methods=display push_button keypad
driver_param=use_p2p_group_interface=1
wowlan_triggers=disconnect

13
VIA SOM-9X50-STK Yocto 3.1 EVK Quick Start Guide
wps_cred_processing=2
p2p_disabled=1
To verify the Wi-Fi funcon, use the following command:
root@aiv8385-linux:~# ps | grep wpa_supplicant
569 root 8596 S wpa_supplicant -Dnl80211 -iwlan0 -c/data/wi/wpa_supplicant.conf
754350 root 3536 S grep wpa_supplicant
root@aiv8385-linux:~# kill -9 569
root@aiv8385-linux:~# wpa_supplicant -Dnl80211 -iwlan0 -c /data/wi/wpa_supplicant.conf -B
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
WPS: Converting display to virtual_display for WPS 2.0 compliance
WPS: Converting push_button to virtual_push_button for WPS 2.0 compliance
root@aiv8385-linux:~#
To verify if the Wi-Fi connecon is workable, enable the interface, with the following command:
root@aiv8385-linux:~# udhcpc -i wlan0
udhcpc: started, v1.31.1
Failed to revert interface conguration: Connection timed out
udhcpc: sending discover
udhcpc: sending select for 192.168.0.106
udhcpc: lease of 192.168.0.106 obtained, lease time 86400
/etc/udhcpc.d/50default: Adding DNS 192.168.0.1
Then use the "ping" command to verify the network connecon:
root@aiv8385-linux:~# ping 8.8.8.8
3.10 Bluetooth
To enter "interacve mode" for Bluetooth funcon vericaon, use the following commands:
root@aiv8362a-linux:~# btmw-rpc-test
increase the priority of btmw_rpc_test.i4_ret:0 @ main
set btmw_rpc_test priority done
[Client]Func:main Line:670--->: IPC/RPC initialize
YZ rpc_init is called
...
...
<I> [BTMW_RPC_TEST] init ok Normal Mode
<I> [BTMW_RPC_TEST] running.
btmw_test_cli>
In the example below, use a Bluetooth speaker to test.
First, get the Bluetooth speaker MAC address, which is "41:42:FC:81:75:7F" in this example.
To verify the Bluetooth funcon, use the following commands (using the speaker's MAC address in line 4):
btmw_test_cli> MW_RPC_GAP power 1
...
btmw_test_cli> MW_RPC_GAP set conn_disc 1 1
...
btmw_test_cli> MW_RPC_A2DP_SRC active_src 1
...
btmw_test_cli> MW_RPC_A2DP_SRC connect 41:42:FC:81:75:7F
...
btmw_test_cli> MW_RPC_A2DP_SRC write_stream /data/sda1/test.wav
...
btmw_test_cli>

1F, 531 Zhong-zheng Road,
Xindian Dist., New Taipei City 231
Taiwan
Tel: 886-2-2218-5452
Fax: 886-2-2218-9860
940 Mission Court
Fremont, CA 94539,
USA
Tel: 1-510-687-4688
Fax: 1-510-687-4654
Email: embedded@viatech.com
Email: embedded@via-tech.eu
Taiwan Headquarters
USA
Europe
Tsinghua Science Park Bldg. 7
No. 1 Zongguancun East Road,
Haidian Dist., Beijing, 100084
China
Tel: 86-10-59852288
Fax: 86-10-59852299
Email: embedded@viatech.com.cn
3-15-7 Ebisu MT Bldg. 6F,
Higashi, Shibuya-ku
Tokyo 150-0011
Japan
Tel: 81-3-5466-1637
Fax: 81-3-5466-1638
Email: embedded@viatech.co.jp
China
Japan
Other manuals for SOM-9X50-STK
4
Table of contents
Other VIA Technologies Carrier Board manuals