cmcc soundai: added cmcc soundai oem dir and config for cmcc soundai project.

Change-Id: I627c76404bda372d4fb1df7f926c5da2c478838e
Signed-off-by: owen <qiuen@rock-chips.com>
This commit is contained in:
owen
2019-01-28 15:28:23 +08:00
parent 7fdc08fcf9
commit b5320b466b
75 changed files with 935 additions and 0 deletions

View File

@ -0,0 +1,44 @@
#!/bin/bash
# Target arch
export RK_ARCH=arm64
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=evb-rk3308
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=rk3308_linux_defconfig
# Kernel dts
export RK_KERNEL_DTS=rk3308-cmcc-rns
export RK_KERNEL_IMG=kernel/arch/arm64/boot/Image.lz4
# boot image type
export RK_BOOT_IMG=zboot.img
# parameter for GPT table
export RK_PARAMETER=cmcc_soundai/parameter-64bit-soundai_oem.txt
# Buildroot config
export RK_CFG_BUILDROOT=rockchip_rk3308_soundai_release
# Recovery config
export RK_CFG_RECOVERY=rockchip_rk3308_recovery
# Pcba config
export RK_CFG_PCBA=rockchip_rk3308_pcba
# Build jobs
export RK_JOBS=12
# target chip
export RK_TARGET_PRODUCT=rk3308
# Set rootfs type, including ext2 ext4 squashfs
export RK_ROOTFS_TYPE=squashfs
# rootfs image path
export RK_ROOTFS_IMG=buildroot/output/$RK_CFG_BUILDROOT/images/rootfs.$RK_ROOTFS_TYPE
# Set oem partition type, including ext2 squashfs
export RK_OEM_FS_TYPE=ext2
# Set userdata partition type, including ext2, fat
export RK_USERDATA_FS_TYPE=ext2
# Set flash type. support <emmc, nand, spi_nand, spi_nor>
export RK_STORAGE_TYPE=nand
#OEM config: /oem/dueros/aispeech-6mic-64bit/aispeech-2mic-64bit/aispeech-4mic-32bit/aispeech-2mic-32bit/aispeech-2mic-kongtiao-32bit/iflytekSDK/CaeDemo_VAD/smart_voice
export RK_OEM_DIR=cmcc_soundai
#Build oem to rootfs
export RK_BUILD_OEM_ROOTFS=false
#userdata config
export RK_USERDATA_DIR=userdata_empty
MIC_NUM=6

View File

@ -0,0 +1,44 @@
#!/bin/bash
# Target arch
export RK_ARCH=arm64
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=evb-rk3308
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=rk3308_linux_defconfig
# Kernel dts
export RK_KERNEL_DTS=rk3308-cmcc-rns
export RK_KERNEL_IMG=kernel/arch/arm64/boot/Image.lz4
# boot image type
export RK_BOOT_IMG=zboot.img
# parameter for GPT table
export RK_PARAMETER=soundai/parameter-64bit-soundai_oem.txt
# Buildroot config
export RK_CFG_BUILDROOT=rockchip_rk3308_soundai_release
# Recovery config
export RK_CFG_RECOVERY=rockchip_rk3308_recovery
# Pcba config
export RK_CFG_PCBA=rockchip_rk3308_pcba
# Build jobs
export RK_JOBS=12
# target chip
export RK_TARGET_PRODUCT=rk3308
# Set rootfs type, including ext2 ext4 squashfs
export RK_ROOTFS_TYPE=squashfs
# rootfs image path
export RK_ROOTFS_IMG=buildroot/output/$RK_CFG_BUILDROOT/images/rootfs.$RK_ROOTFS_TYPE
# Set oem partition type, including ext2 squashfs
export RK_OEM_FS_TYPE=ext2
# Set userdata partition type, including ext2, fat
export RK_USERDATA_FS_TYPE=ext2
# Set flash type. support <emmc, nand, spi_nand, spi_nor>
export RK_STORAGE_TYPE=nand
#OEM config: /oem/dueros/aispeech-6mic-64bit/aispeech-2mic-64bit/aispeech-4mic-32bit/aispeech-2mic-32bit/aispeech-2mic-kongtiao-32bit/iflytekSDK/CaeDemo_VAD/smart_voice
export RK_OEM_DIR=soundai
#Build oem to rootfs
export RK_BUILD_OEM_ROOTFS=false
#userdata config
export RK_USERDATA_DIR=userdata_empty
MIC_NUM=6

24
rk3308/cmcc_soundai/RkLunch.sh Executable file
View File

@ -0,0 +1,24 @@
#/oem/acodec-gain.sh &
sleep 1
if [ -f "/data/cfg/wpa_supplicant.bk" ]; then
cp /data/cfg/wpa_supplicant.bk /data/cfg/wpa_supplicant.conf
fi
wpa_supplicant -B -i wlan0 -c /data/cfg/wpa_supplicant.conf &
#sleep 1
cvlc -q --no-interact --play-and-exit /oem/start.mp3 &
/oem/sayinfoos.sh start &
cd /oem
./bt_loader_firmware.sh &
#sleep 12
sleep 10
#./bt_start.sh &
#/oem/acodec-gain.sh &
if ! pidof wpa_supplicant; then
cp /etc/wpa_supplicant.conf /data/cfg/wpa_supplicant.conf
cp /etc/wpa_supplicant.conf /data/cfg/wpa_supplicant.bk
wpa_supplicant -B -i wlan0 -c /data/cfg/wpa_supplicant.conf &
fi

View File

@ -0,0 +1,48 @@
#0=0db, 1=6.6db, 2=13dB, 3=20db
amixer cset -c 0 name="ADC MIC Group 2 Left Volume" 3
amixer cset -c 0 name="ADC MIC Group 3 Left Volume" 3
amixer cset -c 0 name="ADC MIC Group 2 Right Volume" 3
amixer cset -c 0 name="ADC MIC Group 3 Right Volume" 3
#12=0dB 18=9db
amixer cset -c 0 name="ADC ALC Group 2 Left Volume" 12
amixer cset -c 0 name="ADC ALC Group 3 Left Volume" 12
amixer cset -c 0 name="ADC ALC Group 2 Right Volume" 12
amixer cset -c 0 name="ADC ALC Group 3 Right Volume" 12
#loop back gain
amixer cset -c 0 name="ADC ALC Group 1 Left Volume" 18
# lineout gain
#0=490mv1=890mv
amixer cset -c 0 name='DAC LINEOUT Right Volume' 2
amixer cset -c 0 name='DAC LINEOUT Left Volume' 2
amixer cset -c 0 name='DAC HPMIX Left Volume' 1
amixer cset -c 0 name='DAC HPMIX Right Volume' 1
vol=80
if [ -f "/userdata/cfg/volume.conf" ]; then
vol=`cat /userdata/cfg/volume.conf`
echo "cat volume.conf $vol"
if [ -z "$vol" ]; then
echo "vol is empty"
vol=80
fi
if [ -n "$vol" ]; then
echo "vol is not empty,vol=$vol"
fi
if [ $vol -gt 80 ]; then
echo "vol >80 force vol=80"
echo 80 > /userdata/cfg/volume.conf
vol=80
fi
else
echo "no volume.conf file"
echo 80 > /userdata/cfg/volume.conf
fi
echo "===!!!vol=$vol"
amixer set Master Playback $vol

View File

@ -0,0 +1,11 @@
#!/bin/sh
echo 0 > /sys/class/rfkill/rfkill0/state
sleep 2
echo 1 > /sys/class/rfkill/rfkill0/state
sleep 2
insmod /usr/lib/modules/hci_uart.ko
rtk_hciattach -n -s 115200 /dev/ttyS4 rtk_h5 &
hciconfig hci0 up

View File

@ -0,0 +1,38 @@
while [ 1 ]
do
if ! pidof gatt-service; then
break
fi
sleep 1
done
if pidof bluetoothd; then
killall bluetoothd
fi
if pidof bluealsa; then
killall bluealsa
fi
sleep 1
case "$1" in
0)
hciconfig hci0 down
;;
1)
/usr/libexec/bluetooth/bluetoothd --compat -n &
sdptool add A2SNK
sleep 2
hciconfig hci0 up
sleep 1
hciconfig hci0 piscan
sleep 1
hciconfig hci0 class 0x240404
hciconfig hci0 down
hciconfig hci0 up
bluealsa --profile=a2dp-sink &
sleep 1
bluealsa-aplay --profile-a2dp 00:00:00:00:00:00 &
;;
*)
esac
exit 0

19
rk3308/cmcc_soundai/bt_start.sh Executable file
View File

@ -0,0 +1,19 @@
/usr/libexec/bluetooth/bluetoothd --compat -n -d&
#sleep 1
sdptool add A2SNK
#sleep 1
hciconfig hci0 up
sleep 1
hciconfig hci0 piscan
sleep 1
hciconfig hci0 class 0x240404
#sleep 1
#hciconfig hci0 name 'sayinfo_bt'
#sleep 1
hciconfig hci0 down
#sleep 2
hciconfig hci0 up
#sleep 2
bluealsa --profile=a2dp-sink &
sleep 1
bluealsa-aplay --profile-a2dp 00:00:00:00:00:00 &

BIN
rk3308/cmcc_soundai/cmcc_voip Executable file

Binary file not shown.

View File

@ -0,0 +1,33 @@
#!/bin/sh
enable_ipv6() {
while [ 1 ]
do
status=`wpa_cli status | grep wpa_state | awk -F '=' '{print $2}'`
if [ $status = COMPLETED ]; then
echo 2 > /proc/sys/net/ipv6/conf/wlan0/accept_ra
echo 1 > /proc/sys/net/ipv6/conf/wlan0/autoconf
echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
echo 0 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
sleep 2
prex=`route -A inet6 | grep wlan0 | awk -F ' ' '{print $1}' | awk -F '/' '{print $1}' | sed -n 1p`
route -A inet6 add ::/0 gw ${prex}"1"
break
fi
done
}
enable_ipv6
while [ 1 ]
do
status=`wpa_cli status | grep wpa_state | awk -F '=' '{print $2}'`
if [ $status != COMPLETED ]; then
ip -6 addr flush dev wlan0
route -A inet6
enable_ipv6
sleep 1
fi
sleep 2;
done

View File

@ -0,0 +1,72 @@
check_time() {
while [ 1 ]
do
uptime=`cat /proc/uptime | awk -F ' ' '{print $1}' | awk -F '.' '{print $1}'`
echo uptime is $uptime
if [ $uptime -lt 20 ]; then
sleep 1
else
break
fi
done
}
check_time
case "$1" in
start)
if pidof bluetoothd; then
killall bluetoothd
fi
sleep 1
if pidof gatt-service; then
killall gatt-service
fi
hciconfig hci0 down
sleep 1
hciconfig hci0 up
#hciconfig hci0 piscan &
/usr/libexec/bluetooth/bluetoothd -C -E -d -n &
#sleep 2
/usr/bin/gatt-service &
;;
stop)
if pidof bluetoothd; then
killall bluetoothd
fi
sleep 1
if pidof gatt-service; then
killall gatt-service
fi
;;
ok)
while [ 1 ]
do
if ! pidof gatt-service; then
killall bluetoothd
break
fi
sleep 1
done
;;
*)
esac
exit 0

View File

@ -0,0 +1,232 @@
{
"参数说明": {
"back_color": "背景色十六进制字符串比如FFDDBB",
"fore_color": "前景色十六进制字符串比如FFDDBB",
"period": "灯效周期例如呼吸一次为3000ms.",
"start": "从第几个灯开始",
"num": "从start开始点亮num个灯",
"srcroll_num":"跑马灯个数",
"actions_per_period": "每个period需要经过多少次action",
"led_effect_type":"0:关闭灯效, 1常亮 2:呼吸灯效, 3:淡进淡出 4:闪烁灯效 5:互换 6:跑马灯效 7:走马灯效 8一个灯单色循环"
}
,
"关闭灯效": "",
"led_effect_led_off": {
"led_effect_type": 0,
"back_color": "000000",
"fore_color": "000000",
"period": 0,
"start": 0,
"num": 1,
"actions_per_period": 0
}
,
"系统启动灯效": "",
"led_effect_system_booting":{
"led_effect_type": 2,
"back_color": "000000",
"fore_color": "0000FF",
"period": 2000,
"start": 0,
"num": 1,
"actions_per_period": 25
}
,
"网络恢复": "",
"led_effect_net_connet_recovery":{
"led_effect_type": 5,
"back_color": "000000",
"fore_color": "FF3399",
"period": 2000,
"start": 0,
"num": 1,
"actions_per_period": 2
}
,
"等待网络连接": "",
"led_effect_net_connet_waiting": {
"led_effect_type": 5,
"back_color": "0000FF",
"fore_color": "FF0000",
"period": 2000,
"start": 0,
"num": 1,
"actions_per_period": 2
}
,
"正在连接网络": "",
"led_effect_net_conneting":{
"led_effect_type": 5,
"back_color": "0000FF",
"fore_color": "FF0000",
"period": 2000,
"start": 0,
"num": 1,
"actions_per_period": 2
}
,
"网络连接失败": "",
"led_effect_net_connet_fail": {
"led_effect_type": 5,
"back_color": "000000",
"fore_color": "CD3333",
"period": 2000,
"start": 0,
"num": 1,
"actions_per_period": 2
}
,
"连接网络成功": "",
"led_effect_net_connet_success": {
"led_effect_type": 0,
"back_color": "000000",
"fore_color": "000000",
"period": 0,
"start": 0,
"num": 1,
"actions_per_period": 1
}
,
"唤醒灯效": "",
"led_effect_wakeup_waiting": {
"led_effect_type": 2,
"back_color": "000000",
"fore_color": "CC3399",
"period": 2000,
"start": 0,
"num": 1,
"actions_per_period": 25
}
,
"语音解析灯效": "",
"led_effect_tts_thinking": {
"led_effect_type": 1,
"back_color": "000000",
"fore_color": "3399CC",
"period": 0,
"start": 0,
"num": 1,
"actions_per_period": 1
}
,
"播放语音灯效": "",
"led_effect_tts_playing": {
"led_effect_type": 1,
"back_color": "000000",
"fore_color": "3399CC",
"period": 0,
"start": 0,
"num": 1,
"actions_per_period": 1
}
,
"等待蓝牙配对": "",
"led_effect_bt_pair_waiting": {
"led_effect_type": 5,
"back_color": "FF3399",
"fore_color": "FFFF66",
"period": 2000,
"start": 0,
"num": 1,
"actions_per_period": 2
}
,
"蓝牙正在配对": "",
"led_effect_bt_pairing": {
"led_effect_type": 2,
"back_color": "000000",
"fore_color": "CC3399",
"period": 2000,
"start": 0,
"num": 1,
"actions_per_period": 20
}
,
"蓝牙配对失败": "",
"led_effect_bt_pair_fail": {
"led_effect_type": 5,
"back_color": "000000",
"fore_color": "CD3333",
"period": 2000,
"start": 0,
"num": 1,
"actions_per_period": 2
}
,
"蓝牙配对成功": "",
"led_effect_bt_pair_success": {
"led_effect_type": 1,
"back_color": "000000",
"fore_color": "FFFFFF",
"period": 1,
"start": 0,
"num": 1,
"actions_per_period": 1
}
,
"音量": "",
"led_effect_volume_led": {
"led_effect_type": 3,
"back_color": "000000",
"fore_color": "FFFFFF",
"period": 2000,
"start": 0,
"num": 1,
"actions_per_period": 20
}
,
"禁麦": "",
"led_effect_mic_mute": {
"led_effect_type": 1,
"back_color": "000000",
"fore_color": "FF0099",
"period": 1,
"start": 0,
"num": 1,
"actions_per_period": 1
}
,
"取消禁麦": "",
"led_effect_mic_unmute": {
"led_effect_type": 0,
"back_color": "000000",
"fore_color": "000000",
"period": 1,
"start": 0,
"num": 1,
"actions_per_period": 1
}
,
"闹钟": "",
"led_effect_alarm": {
"led_effect_type": 2,
"back_color": "000000",
"fore_color": "CD3333",
"period": 1000,
"start": 0,
"num": 1,
"actions_per_period": 20
}
,
"升级中": "",
"led_effect_upgrading": {
"led_effect_type": 2,
"back_color": "000000",
"fore_color": "FFFFFF",
"period": 1000,
"start": 0,
"num": 1,
"actions_per_period": 20
}
,
"升级进度": "",
"led_effect_upgrade_progress": {
"led_effect_type": 2,
"back_color": "000000",
"fore_color": "FF3399",
"period": 1000,
"start": 0,
"num": 1,
"actions_per_period": 20
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

151
rk3308/cmcc_soundai/mkfirmware.sh Executable file
View File

@ -0,0 +1,151 @@
#! /bin/bash
DEVICE_DIR=$(cd `dirname $0`; pwd)
if [ -h $0 ]
then
CMD=$(readlink $0)
DEVICE_DIR=$(dirname $CMD)
fi
cd $DEVICE_DIR
cd ../../..
TOP_DIR=$(pwd)
export RK_LOADER_NAME=
source $TOP_DIR/device/rockchip/.BoardConfig.mk
ROCKDEV=$TOP_DIR/rockdev
PRODUCT_PATH=$TOP_DIR/device/rockchip/$RK_TARGET_PRODUCT
PARAMETER=$TOP_DIR/device/rockchip/$RK_TARGET_PRODUCT/$RK_PARAMETER
OEM_DIR=$TOP_DIR/device/rockchip/$RK_TARGET_PRODUCT/rk3308/$RK_OEM_DIR
USER_DATA_DIR=$TOP_DIR/device/rockchip/userdata/$RK_USERDATA_DIR
MISC_IMG=$TOP_DIR/device/rockchip/rockimg/wipe_all-misc.img
ROOTFS_IMG=$TOP_DIR/$RK_ROOTFS_IMG
RECOVERY_IMG=$TOP_DIR/buildroot/output/$RK_CFG_RECOVERY/images/recovery.img
TRUST_IMG=$TOP_DIR/u-boot/trust.img
UBOOT_IMG=$TOP_DIR/u-boot/uboot.img
BOOT_IMG=$TOP_DIR/kernel/$RK_BOOT_IMG
if [ -z $RK_LOADER_NAME ]; then
LOADER=$TOP_DIR/u-boot/*_loader_v*.bin
else
LOADER=$TOP_DIR/u-boot/$RK_LOADER_NAME
fi
MKIMAGE=$TOP_DIR/device/rockchip/common/mk-image.sh
rm -rf $ROCKDEV
mkdir -p $ROCKDEV
# Require buildroot host tools to do image packing.
if [ ! -d "$TARGET_OUTPUT_DIR" ]; then
echo "Source buildroot/build/envsetup.sh"
source $TOP_DIR/buildroot/build/envsetup.sh $RK_CFG_BUILDROOT
fi
if [ "${RK_OEM_DIR}" == "dueros" ];then
if [ $RK_ARCH == arm ];then
TARGET_ARM_TYPE=arm32
else
TARGET_ARM_TYPE=arm64
PARAMETER=$TOP_DIR/device/rockchip/$RK_TARGET_PRODUCT/parameter-64bit-dueros.txt
fi
OEM_DIR=${ROCKDEV}/.oem
rm -rf ${OEM_DIR}
mkdir -p ${OEM_DIR}
find ${PRODUCT_PATH}/${RK_OEM_DIR} -maxdepth 1 -not -name "spil" \
-not -wholename "${PRODUCT_PATH}/${RK_OEM_DIR}" \
-exec sh -c 'cp -arf ${0} ${1}' "{}" ${OEM_DIR} \;
cp -rf ${PRODUCT_PATH}/${RK_OEM_DIR}/spil/${TARGET_ARM_TYPE}/baidu_spil_rk3308_${MIC_NUM}mic ${OEM_DIR}/baidu_spil_rk3308
echo "copy ${TARGET_ARM_TYPE} with ${MIC_NUM}mic."
else
OEM_DIR=${PRODUCT_PATH}/${RK_OEM_DIR}
fi
if [ -f $ROOTFS_IMG ]
then
echo -n "create rootfs.img..."
cp -a $ROOTFS_IMG $ROCKDEV/rootfs.img
echo "done."
else
echo -e "\e[31m error: $ROOTFS_IMG not found! \e[0m"
fi
if [ -f $PARAMETER ]
then
echo -n "create parameter..."
cp -a $PARAMETER $ROCKDEV/parameter.txt
echo "done."
else
echo -e "\e[31m error: $PARAMETER not found! \e[0m"
fi
if [ -f $RECOVERY_IMG ]
then
echo -n "create recovery.img..."
cp -a $RECOVERY_IMG $ROCKDEV/recovery.img
echo "done."
else
echo -e "\e[31m error: $RECOVERY_IMG not found! \e[0m"
fi
if [ -f $MISC_IMG ]
then
echo -n "create misc.img..."
cp -a $MISC_IMG $ROCKDEV/misc.img
echo "done."
else
echo -e "\e[31m error: $MISC_IMG not found! \e[0m"
fi
echo -n "$OEM_DIR $RK_OEM_FS_TYPE"
if [ -d $OEM_DIR ]
then
$MKIMAGE $OEM_DIR $ROCKDEV/oem.img $RK_OEM_FS_TYPE
else
echo -e "\e[31m error: create oem image fail! \e[0m"
fi
if [ -d $USER_DATA_DIR ]
then
$MKIMAGE $USER_DATA_DIR $ROCKDEV/userdata.img $RK_USERDATA_FS_TYPE
else
echo -e "\e[31m error: $USER_DATA_DIR not found! \e[0m"
fi
if [ -f $UBOOT_IMG ]
then
echo -n "create uboot.img..."
cp -a $UBOOT_IMG $ROCKDEV/uboot.img
echo "done."
else
echo -e "\e[31m error: $UBOOT_IMG not found! \e[0m"
fi
if [ -f $TRUST_IMG ]
then
echo -n "create trust.img..."
cp -a $TRUST_IMG $ROCKDEV/trust.img
echo "done."
else
echo -e "\e[31m error: $TRUST_IMG not found! \e[0m"
fi
if [ -f $LOADER ]
then
echo -n "create loader..."
cp -a $LOADER $ROCKDEV/MiniLoaderAll.bin
echo "done."
else
echo -e "\e[31m error: $LOADER not found,or there are multiple loaders! \e[0m"
rm $LOADER
fi
if [ -f $BOOT_PATH ]
then
echo -n "create boot.img..."
cp -a $BOOT_IMG $ROCKDEV/boot.img
echo "done."
else
echo -e "\e[31m error: $BOOT_IMG not found! \e[0m"
fi
echo -e "\e[36m Image: image in rockdev is ready \e[0m"

View File

@ -0,0 +1,12 @@
FIRMWARE_VER:8.1
MACHINE_MODEL:RK3308
MACHINE_ID:007
MANUFACTURER: RK3308
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: 3308
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
TYPE: GPT
CMDLINE:mtdparts=rk29xxnand:0x00001000@0x00002000(uboot),0x00001000@0x00003000(trust),0x00000800@0x00004000(misc),0x00006000@0x00004800(recovery),0x00002800@0x0000A800(boot),0x00013000@0x0000D000(rootfs),-@0x0001E000(userdata:grow)
uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9

View File

@ -0,0 +1,12 @@
FIRMWARE_VER:8.1
MACHINE_MODEL:RK3308
MACHINE_ID:007
MANUFACTURER: RK3308
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: 3308
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
TYPE: GPT
CMDLINE:mtdparts=rk29xxnand:0x00001000@0x00004000(uboot),0x00001000@0x00005000(trust),0x00000800@0x00006000(misc),0x00006800@0x00006800(recovery),0x00004800@0x0000D000(boot),0x0000F000@0x00011800(rootfs),0x00010000@0x00020800(oem),-@0x00030800(userdata:grow)
uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9

View File

@ -0,0 +1,12 @@
FIRMWARE_VER:8.1
MACHINE_MODEL:RK3308
MACHINE_ID:007
MANUFACTURER: RK3308
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: 3308
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
TYPE: GPT
CMDLINE:mtdparts=rk29xxnand:0x00001000@0x00004000(uboot),0x00001000@0x00005000(trust),0x00000800@0x00006000(misc),0x00006800@0x00006800(recovery),0x00004800@0x0000D000(boot),0x0000F000@0x00011800(rootfs),0x0000FE00@0x00020800(oem),-@0x00030600(userdata:grow)
uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9

BIN
rk3308/cmcc_soundai/qplay_client Executable file

Binary file not shown.

BIN
rk3308/cmcc_soundai/rsdlclient Executable file

Binary file not shown.

BIN
rk3308/cmcc_soundai/sai_client Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,31 @@
[global]
strict init = true
reload conf period = 5M
buffer min = 1024
buffer max = 1MB
rotate lock file = self
default format = "%d(%F %T.)%-3ms %p %t %-6V [%f:%L:%U] - %m%n"
file perms = 666
fsync period = 1K
[levels]
WAKE = 35
NLP = 30
ASR = 25
[formats]
simple_1 = "%m"
simple_2 = "%d([%F] [%T.)%-3ms] [%p] [%-6V] %m%n"
simple_3 = "%d([%F] [%T.)%-3ms] [%-6V] %m%n"
simple_4 = "%m%n"
normal = "%d([%F] [%T.)%-6us] [%p] [%-6V] [%f:%U:%L]%m%n"
[rules]
my_cat.=DEBUG >stdout; simple_3
#my_cat.=WAKE "/tmp/wake.log",5MB*2;simple_4
#my_cat.=NLP "/tmp/nlp.log",10MB*2;simple_1
#my_cat.=ASR "/tmp/asr.log",5MB*2;simple_4
my_cat.INFO "/tmp/sai.log",10MB*1;normal

View File

@ -0,0 +1,59 @@
CORP sai
MicType 0
MIC_RADIUS 0.0375
NFFT 512
In_len 256
Fs 16000
mic_num 4
speaker_num 1
doa_once false
doa_result -1
amplify 5.5
wakeupth 0.25
wakeupmode 1212
VAD_amplify 100
targetAmpOfAsr 1000
targetAmpOfVad 8000
doa_lowFre 100
doa_highFre 3200
gsc_aecpost_method 2
aec_gain_degree 2
#
AEC_ON 1
WAKEUP_DENOISE_ON 1
DEREVERB_ON 1
ADAPTIVEBEAM_ON 1
MONOEN_ON 1
AGC_ON 1
AECPOST_ON 1
DOAP 0.5
OneShot_ON 1
one_shot_cache_num 1
asr_AGC_ON 1
FIX_AGC_WAKE 1
FIX_AGC_ASR 1
Auto_Vad_End 0
VadEndFrm 55
WCTH 0.9
ForceFrm 65
BOARD 8
SAMPLE 256
# optional configs
LED_ON 0
#GESTURE_ON 0
HW default
CH_MAP 4,5,7,6,0,3,1,2
#EXTERNAL_SOURCE 0
SAMPLE_RATE 16000
BIT 16
MIC_SHIFT_BITS 16
REF_SHIFT_BITS 16
#FAKE_OUTDIR
#WOPT_BIN_NAME wopt_6mic_sai.bin
#WAKEUP_SECONDTIME
#DUAL_ADC 0
#DECODE_MODE
#MERGE_REFS

View File

@ -0,0 +1 @@
OFF

View File

@ -0,0 +1 @@
RYHeS+leSSInDSLgSaTXE7Dyjq3m4YSRnt6O/hiQi0xez0u7sVQkanO0hil/+ooKAYp+iLOOT+2yb26GK9A8udeMCFHoFp7QIeMVCiGC57xjf15CiZ1SO3ePDNsJQOklccLb/lW9o7ccAE/JlMRJbYuSqKe5Jl641m9ewWzOeRbXclHRf6UmUrpa1v0z7t2riXmEgYrT3WNkQ2KktN0hl3XpCL3ySc3PiXmEgYrT3WM7rLWSc0vH/Il5hIGK091jEGWuQ0mVs0HT4CDbhe7YrxCrqTQOw1iibEMr5LIkhppNxzboQt0NzvcUD2A/t29fP/mpOwcs141YcSQ4QYp/gnTeMFDaQCKNMz/O/dF+JzWdESAf6NSfAEc=

View File

@ -0,0 +1 @@
0.55 0.1 1 1

Binary file not shown.

View File

@ -0,0 +1 @@
34 19 18 54 6 69 34 19 18 54 6 69

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,52 @@
#!/bin/sh
start_sayinfo_os()
{
printf "========== Start sayinfo os ===========================\n"
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/oem/lib
export LD_LIBRARY_PATH=/oem/lib
cp /oem/sai_config/sai.q /userdata/sai.q -rf
cp /oem/sai_config/sai_sdk_release.log /userdata/sai_sdk_release.log -rf
mount --bind /userdata/sai.q /oem/sai_config/sai.q
mount --bind /userdata/sai_sdk_release.log /oem/sai_config/sai_sdk_release.log
/oem/enable_ipv6.sh &
sleep 1
/oem/sai_client &
sleep 1
/oem/cmcc_voip &
sleep 1
/oem/qplay_client &
sleep 1
#/oem/rsdlclient &
/usr/bin/ota_demo &
sleep 1
/oem/watch_sai_service.sh &
}
stop_sayinfo_os()
{
printf "========== Stop talk_droid =============================\n"
ps -ef | grep -iE "watch_sai_service" | grep -v "grep" | awk '{print $1}' | xargs kill -9
ps -ef | grep -iE "sai_client" | grep -v "grep" | awk '{print $1}' | xargs kill -9
ps -ef | grep -iE "cmcc_voip" | grep -v "grep" | awk '{print $1}' | xargs kill -9
ps -ef | grep -iE "qplay_client" | grep -v "grep" | awk '{print $1}' | xargs kill -9
}
case $1 in
"start") start_sayinfo_os ;;
"stop") stop_sayinfo_os ;;
*) echo "param should be [start|stop]" ;;
esac

BIN
rk3308/cmcc_soundai/silence.wav Executable file

Binary file not shown.

BIN
rk3308/cmcc_soundai/start.mp3 Executable file

Binary file not shown.

View File

@ -0,0 +1,37 @@
#!/bin/sh
sleep 3
while true;do
pid_voip=`ps aux | grep cmcc_voip | grep -v grep | busybox awk '{print \$1}'`
pid_client=`ps aux | grep sai_client | grep -v grep | busybox awk '{print \$1}'`
pid_qplay=`ps aux | grep qplay_client | grep -v grep | busybox awk '{print \$1}'`
if [ "$pid_client" == "" ];then
echo "sai_client died, restart it."
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/oem/lib
ps -ef | grep -iE "sai_client" | grep -v "grep" | awk '{print $1}' | xargs kill -9
#ps -ef | grep -iE "cmcc_voip" | grep -v "grep" | awk '{print $1}' | xargs kill -9
sleep 1
/oem/sai_client &
fi
if [ "$pid_voip" = "" ] ;then
echo "voip died,restart it."
ps -ef | grep -iE "cmcc_voip" | grep -v "grep" | awk '{print $1}' | xargs kill -9
sleep 1
/oem/cmcc_voip &
fi
if [ "$pid_qplay" = "" ] ;then
echo "qplay died,restart it."
ps -ef | grep -iE "qplay_client" | grep -v "grep" | awk '{print $1}' | xargs kill -9
sleep 1
/oem/qplay_client &
fi
sleep 2
done