project:app:rkipc:Disable audio function in rkipc

project:cfg:BoardConfig_IPC:Add pre-processing and post-processing scripts for OEM and userdata images
project:build.sh:Add support for pre-processing and post-processing functionality for SDK OEM and userdata images
sysdrv:Makefile:Remove default Samba4 support from buildroot rootfs while retaining configuration files
sysdrv:tools:board:android-tools:S99usb0config:Add a disconnect and reconnect feature for usb0 in peripheral mode.
sysdrv:tools:board:buildroot:luckfox_pico_defconfig:Remove default Samva4 support from buildroot rootfs

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
This commit is contained in:
luckfox-eng29
2024-11-01 14:38:30 +08:00
parent ec392d35c5
commit 7a66b04c61
32 changed files with 416 additions and 46 deletions
+27 -1
View File
@@ -2,6 +2,9 @@
TARGET_IP="172.32.0.93"
USB_KEYWORD="android_work: sent uevent USB_STATE="
USB_MODE_PATH="/proc/device-tree/usbdrd/usb@ffb00000/dr_mode"
MAX_RETRIES=10
retries=0
@@ -30,9 +33,32 @@ usb0_config() {
fi
}
usb_reset() {
while true; do
last_line=$(dmesg | grep "$USB_KEYWORD" | tail -n 1)
if [[ "$last_line" == *"DISCONNECTED"* ]]; then
echo "Detected USB DISCONNECTED."
/etc/init.d/S50usbdevice restart
usb0_config
#elif [[ "$last_line" == *"CONFIGURED"* ]]; then
# echo "Detected CONFIGURED. No action required."
#else
# echo "No relevant USB_STATE found."
fi
sleep 5
done
}
case $1 in
start)
usb0_config
# check peripheral
usb_mode="$(cat $USB_MODE_PATH)"
if [ "$usb_mode" = "peripheral" ]; then
usb0_config
usb_reset &
fi
;;
stop) ;;
*)