feat: audio stack working — pulseaudio + x6200_control + voice_rec
- Add pulseaudio in system mode - Add alsactl restore with correct mixer state from Aether - Add x6200-control package (I2C hardware control library) - Audio chain: pulseaudio -> x6200_control_init -> voice_rec -> speaker
This commit is contained in:
30
br2_external/board/x6200/rootfs-overlay/usr/sbin/i2c_keepalive.sh
Executable file
30
br2_external/board/x6200/rootfs-overlay/usr/sbin/i2c_keepalive.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
# i2c_keepalive.sh — X6200 AXP PMU keepalive
|
||||
#
|
||||
# The X6200 uses an AXP PMU on I2C bus 0, address 0x72.
|
||||
# Without periodic I2C traffic the unit powers off after ~180s.
|
||||
# This script sends a combined write+read transaction every second.
|
||||
#
|
||||
# Requires: i2c-tools (i2ctransfer)
|
||||
|
||||
BUS=0
|
||||
ADDR=0x72
|
||||
INTERVAL=1
|
||||
|
||||
# Only allow one instance
|
||||
if pidof -x "$(basename "$0")" >/dev/null 2>&1; then
|
||||
COUNT="$(pidof -x "$(basename "$0")" | wc -w)"
|
||||
[ "$COUNT" -gt 1 ] && { echo "[keepalive] already running"; exit 0; }
|
||||
fi
|
||||
|
||||
trap 'exit 0' INT TERM
|
||||
|
||||
# One-time kick at startup
|
||||
i2ctransfer -y "$BUS" w4@"$ADDR" 0xFF 0xFE 0x02 0x80 >/dev/null 2>&1
|
||||
i2ctransfer -y "$BUS" w4@"$ADDR" 0xFF 0xFE 0x03 0x80 >/dev/null 2>&1
|
||||
|
||||
# Main keepalive loop
|
||||
while :; do
|
||||
i2ctransfer -y "$BUS" w2@"$ADDR" 0x20 0x00 r1@"$ADDR" >/dev/null 2>&1
|
||||
sleep "$INTERVAL"
|
||||
done
|
||||
Reference in New Issue
Block a user