iopsys-feed/libvoice-airoha/files/etc/uci-defaults/991-libvoice-airoha
George Yang 18c9bef5f8 libvoice-airoha: 1.1.8 and dectmngr: 3.7.12
For Airoha: fix no audio on DECT caused by Airoha 2025Q2 SDK
2025-11-12 12:49:39 +01:00

29 lines
790 B
Bash

#!/bin/sh
hasVoice=$(db -q get hw.board.hasVoice)
[ "$hasVoice" = "1" ] || exit 0
SLIC=$(cat /proc/device-tree/airoha-voice/slic-type)
[ "${SLIC#pef}" != "${SLIC}" ] && {
echo Configure TxGain and RxGain for MXL SLIC $SLIC
ports=$(db -q get hw.board.VoicePorts)
for p in $(seq 0 $((ports-1))); do
uci set asterisk.extension${p}.txgain='10'
uci set asterisk.extension${p}.rxgain='-15'
done
}
hasDect=$(db -q get hw.board.hasDect)
[ "$hasDect" = "1" ] || exit 0
# Set the DECT RFPI
. /lib/functions/iopsys-environment.sh
db set hw.board.dect_rfpi=$(get_dect_rfpi)
db commit
# configure the PCM for DECT/DCX81
[ -f "/proc/device-tree/aliases/dcx81-uart" ] && {
uci set dect.global.pcm_fsync='SHORT_LF'
uci set dect.global.dect_channel_start='3'
}