leavs's note
leavs's note in study and work.
Toggle navigation
leavs's note
Home
About Me
Archives
Tags
IMX8MP测试实例
2023-10-17 17:18:17
82
0
0
leavs
#视频播放 ## 设置一下默认声卡 ``` pactl set-default-sink alsa_output.platform-sound-nau8822.stereo-fallback pactl set-default-source alsa_input.platform-sound-nau8822.stereo-fallback ``` ## 设置扬声器播放 ``` pactl set-sink-port @DEFAULT_SINK@ analog-output-speaker ``` ## 设置耳机播放 ``` pactl set-sink-port @DEFAULT_SINK@ analog-output-headphones ``` ## 设置播放音量 ``` pactl set-sink-volume @DEFAULT_SINK@ 100% ``` ## 录音 ``` root@imx8mp-eisd:~# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: btscoaudio [bt-sco-audio], device 0: 30c20000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0 [30c20000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: imx8mpnau8822 [imx8mp-nau8822], device 0: 30c30000.sai-nau8822-hifi nau8822-hifi-0 [30c30000.sai-nau8822-hifi nau8822-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: audiohdmi [audio-hdmi], device 0: i.MX HDMI i2s-hifi-0 [i.MX HDMI i2s-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0 其中系统声卡是imx8mpnau8822,它是card 1 录音指令: arecord -D hw:1,0 -V mono -c 1 -f S16_LE -r 48000 -t wav mic.wav 目前V1.0产品有个硬件bug,就是只能录单声道声频,我们使用sox工具把单声道音频转换成双声道 sox mic.wav -c 2 mic_stereo.wav 播放测试 aplay -Dplughw:1,0 mic_stereo.wav 双声道录音: arecord -D hw:1,0 -V stereo -c 2 -f S16_LE -r 48000 -t wav mic.wav ``` ## 视频播放 ``` # lsblk # gst-play-1.0 /run/media/sda1/1/2.mp4 ``` #使用connman来配置静态IP,前提MAC地址不能变 IMX8MP Yocto Linux Qt6.3系统默认使用connman的连接管理服务来管理有线网络,默认是DHCP来获取IP。 设置静态IP方法: ``` #插上网线,执行命令,使用如下命令列出网卡: connmanctl services #使用如下命令配置静态IP connmanctl config ethernet_beec6e3ef486_cable --ipv4 manual 192.168.6.200 255.255.255.0 192.168.6.1 --nameservers 192.168.6.1 ##参数说明 --ipv4 off|dhcp|manual <address> <netmask> <gateway> --nameservers <dns1> [<dns2>] [<dns3>] ```  生成配置文件如下: ``` root@imx8mp-eisd:~# cat /var/lib/connman/ethernet_beec6e3ef486_cable/settings [ethernet_beec6e3ef486_cable] Name=Wired AutoConnect=true Modified=2022-04-29T08:26:03Z IPv4.method=manual IPv4.netmask_prefixlen=24 IPv4.local_address=192.168.6.200 IPv4.gateway=192.168.6.1 IPv6.method=auto IPv6.privacy=disabled Nameservers=192.168.6.1; root@imx8mp-eisd:~# ``` #蓝牙 ``` rfkill //查看 rfkill unblock 1 //打开蓝牙 # bluetoothctl #进入bluetoothctl [bluetooth]# power on [bluetooth]# agent on [bluetooth]# default-agent [bluetooth]# discoverable on [bluetooth]# pairable on [bluetooth]# scan on #扫描其它蓝牙设备 [bluetooth]# pair F8:2F:65:72:BA:43 #与设备配对(请把F8:2F:65:72:BA:43换成你手机蓝牙的MAC地址)同时在手机上同意配对 [bluetooth]# trust F8:2F:65:72:BA:43 #信任该设备 [bluetooth]# connect F8:2F:65:72:BA:43 #连接该设备 ``` #WIFI ## 首次连接WIFI  ## 断开WIFI ``` # connmanctl disable wifi ``` ## 重新打开WIFI ``` # connmanctl enable wifi ``` #压力测试 当前系统使用了一个/usr/bin/s-tui脚本封装了下面指令,所以只需要执行s-tui即可 ``` stress-ng --cpu 8 --io 4 --vm 2 --vm-bytes 2G --hdd 2 --hdd-bytes 2G --fork 4 --timeout 60s ```
Pre:
自己创建DebianRepository
Next:
Chipsee Frequently Asked Questions 20250217
0
likes
82
Weibo
Wechat
Tencent Weibo
QQ Zone
RenRen
Submit
Sign in
to leave a comment.
No Leanote account?
Sign up now.
0
comments
More...
Table of content
No Leanote account? Sign up now.