diff --git a/README.md b/README.md index 6ab874f..1443592 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,14 @@ build/ 应用程序编译目录 # 配置ssh-key,免密登录 ./sh/iflytool.sh --ip ssh_copy_id +``` + +## 串口调试 + +``` +波特率:1,500,000 +sudo minicom -b 1500000 -D /dev/ttyUSB0 ``` ## 唤醒词引擎环境测试 diff --git a/dep/zlinuxcomponents b/dep/zlinuxcomponents index efb99bc..967e379 160000 --- a/dep/zlinuxcomponents +++ b/dep/zlinuxcomponents @@ -1 +1 @@ -Subproject commit efb99bc5993983388a6407e5f47cb05a0498799c +Subproject commit 967e3791e74c91cb0016526ae412658eac841654 diff --git a/sh/envsetup_rk3328.sh b/sh/envsetup_rk3328.sh index 9bd81a2..0ebbcad 100755 --- a/sh/envsetup_rk3328.sh +++ b/sh/envsetup_rk3328.sh @@ -21,9 +21,13 @@ CMAKE_BIN=${PROJECT_PATH}/build/cmake/bin/cmake # CONFIG_SUPPORT_ALSA if [ "$CONFIG_SUPPORT_ALSA" = true ]; then wget -c "192.168.1.2:8021/sdk_firefly_rk3328_v2.5.1/buildtools/libasound2_dev1.1.3-5ubuntu0.6.tar.gz" + wget -c "192.168.1.2:8021/sdk_firefly_rk3328_v2.5.1/buildtools/libz.tar.gz" rm -rf ${LIBSDIR}/alsa rm -rf libasound2_dev1.1.3-5ubuntu0.6 + tar -xvf libasound2_dev1.1.3-5ubuntu0.6.tar.gz + tar -xvf libz.tar.gz + mkdir -p ${LIBSDIR}/alsa/pkgconfig/ mkdir -p ${LIBSDIR}/alsa/include/sys/ mkdir -p ${LIBSDIR}/alsa/lib/ @@ -34,6 +38,8 @@ if [ "$CONFIG_SUPPORT_ALSA" = true ]; then mv libasound2_dev1.1.3-5ubuntu0.6/unpack/usr/include/alsa ${LIBSDIR}/alsa/include/ mv libasound2_dev1.1.3-5ubuntu0.6/unpack/usr/include/sys/* ${LIBSDIR}/alsa/include/sys/ + mv libz.so.1 ${LIBSDIR}/alsa/lib/ + PUBLIC_LINK_DIRECTORIES="${PUBLIC_LINK_DIRECTORIES};${LIBSDIR}/alsa/lib" PUBLIC_INCLUDE_DIRECTORIES="${PUBLIC_INCLUDE_DIRECTORIES};${LIBSDIR}/alsa/include" fi diff --git a/src/main.cpp b/src/main.cpp index e49ed14..a64b100 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,6 +16,7 @@ #include "service/main_control_service.hpp" #include "service/report_service.hpp" // +#include "zlinuxcomponents/alsaplayer/AudioPlayerAlsaImpl.hpp" // #include "zlinuxcomponents/audio/audio_recoder.hpp" // @@ -71,6 +72,9 @@ int Main::main(int argc, char *argv[]) { // system("reboot"); } + + AudioPlayerAlsaImp audioPlayerAlsaImp("/dev/"); + // AudioRecoder::get().initialize(); // shared_ptr audioRecoder(new AudioRecoder());