提示:作为Espressif (乐鑫科技)大中华区合作伙伴和sigmastar (乐鑫科技) VAD合作伙伴,我们精心组织了开发过程中可能遇到的问题,以及快速、简单的教程供开发合作伙伴参考。 同时,精心梳理了乐鑫和星宸科技新产品、新方案的主要特点和应用! 希望第一时间了解好的方案和产品,马上使用!
SSD201/SSD202D核心板必须更新并使用三个ko模块: mi_ai.ko、mi_ao.ko和mi_ALSA.ko,以便在使用时与alsa相匹配。
mi_ai.ko和mi_ao.ko对应于sdk中的项目/release/NVR/i2m/common/glibc/8.2.1/modules/4.9.84 /目录
tinyALSA是alsa的简化版。 请根据需要选择一个。
配置ALSA rootfs.mk
echo PCM.* 0336000660=snd/$ { output dir }/rootfs/etc/mdev.confechocontrol.* 033600660=snd/$ { output dir } rootfs/etc/mdev.conf echo‘$ $ devname=bus/USB/([0-9] % 2’$ { output dir }/rootfs/etc/mdev.confkerner ) arch=armmakemenuconfigpowermanagementoptions-armmakemenuconfigpowermanagementoptions dvicepowermanagementcorefunctionalitydydiod pport---- madvancedlinuxsoundarchitecture---- mosspcort
将生成./release _ to _ customer.sh-fn and-pssd 201-o2d 07。
kernel/sound/soundcore.ko
kernel/sound/core/snd.ko
kernel/sound/core/snd-timer.ko
kernel/sound/core/snd-pcm.ko
注:如果您使用的是开发板更新固件,请在系统启动后将以上四个ko文件复制到开发板
验证buildroot移植ALSA :
# CD buildroot-2020.05/# arch=armmakemenuconfigtargetpackages---libraries---audio/sound---[ * ] alsa make br2 _ j level=4将output/images/rootfs.tar替换为./project/image/rootfs rootfs # tar-xvf output/images/rootfs tar-CVF ./project/image/rootfs # tar-CVF ./project/image rootfs重新编译和固件更新: # CD . # ./release _ to
然后,重新启动开发板,加载刚才复制的ko。
insmod soundcore.ko
insmod snd.ko
insmod snd-timer.ko
insmod snd-pcm.ko
insmod mi_alsa.ko
运行alsamixer以调节音量:
# alsamixer
运行aplay以播放wav音频:
# aplay/media/48k 16 bps mono.wavtinyalsakernel和rootfs.mk保持与alsa相同的配置。
验证buildroot移植TinyALSA :
# CD buildroot-2020.05/# arch=armmakemenuconfigtargetpackages---libraries---audio/sound---[ * ] tiny ach rootfs.tar.gz # mkdir ./project/image/rootfs # tar-xvf output rootfs # tar-CVF ./project/image/rootfs/root
# CD . # ./release _ to _ customer.sh-fn and-pssd 201-o2d 07系统后,同样先加载模块驱动。
insmod soundcore.ko
insmod snd.ko
insmod snd-timer.ko
insmod snd-pcm.ko
insmod mi_alsa.ko
tinymix set 11 0
运行tinyplay播放音频:
# tiny play/media/48k 16 bps mono.wav wifi驱动程序更新kernel打开了devicepowermanagementcorefunctionality功能, 以前的wifi驱动程序无法正常使用(kernel的devicepowermanagementcorefunctionality关闭),wifi驱动的ssw101b_wifi_HT40_usb.ko也需要同时更新