feat: 开放小爱音箱补丁固件构建源代码和教程

This commit is contained in:
Del Wang
2025-04-12 23:49:07 +08:00
parent 0585ddab72
commit 2cf6623db9
21 changed files with 1794 additions and 0 deletions
@@ -0,0 +1,33 @@
--- squashfs-root/etc/asound.conf 2024-12-06 15:11:58
+++ squashfs-root-patched/etc/asound.conf 2025-02-18 22:14:10
@@ -125,16 +125,20 @@
}
pcm.noop {
- type dsnoop
- ipc_key 1024
- slave {
- pcm "hw:0,3"
- format S32_LE
- rate 48000
- channels 8
- period_size 480
- buffer_size 3840
- }
+ type plug
+ slave.pcm {
+ type dsnoop
+ ipc_key 1024
+ ipc_perm 0666
+ slave {
+ pcm "hw:0,3"
+ format S32_LE
+ rate 48000
+ channels 8
+ period_size 480
+ buffer_size 3840
+ }
+ }
}
defaults.pcm.rate_converter "speexrate_medium"
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
set -e
# 动态获取偏移量
OFFSET=$(strings -t d usr/lib/libxaudio_engine.so | grep hw:0,3 | awk '{print $1}')
# 检查偏移量是否存在
if [ -z "$OFFSET" ]; then
echo "未找到 \"hw:0,3\" 字符串偏移量,取消 patch usr/lib/libxaudio_engine.so"
exit -1
fi
echo -n -e "noop\x00\x00" | dd of=usr/lib/libxaudio_engine.so bs=1 count=6 seek=$OFFSET conv=notrunc
echo "patched file usr/lib/libxaudio_engine.so"