iopsys-feed/voice-client/files/lib/voice/intel.sh
Yalu Zhang e5f389aab6 Change line/channel names from tapi/1 and tapi/2 to tapi/0 and tapi1
Unsupported lines/channes like TAPI/[2-6], BRCM/6 are also removed.

This change has the following benefits.
- To simplify the line/channel name handling in /etc/init.d/voice_client
- To have the consistent implementation both on Intel and on Broadcom platforms

(cherry picked from commit 40c426ca09)
2019-12-10 16:19:00 +01:00

64 lines
834 B
Bash
Executable file

#! /bin/sh
# Voice library for Intel boards
getChipVendor() {
echo intel
}
getChannelName() {
echo TAPI
}
getLineName() {
echo tapi
}
getSerial() {
sernum="$(fw_printenv -n serial_number 2> /dev/null)"
if [ $? ]; then
echo $sernum
else
echo 0
fi
}
getBaseMAC() {
echo $(fw_printenv -n ethaddr)
}
getAllLines() {
echo "TAPI/0&TAPI/1"
}
getLineIdx() {
echo $1
}
getEchoCancellingValue() {
case $1 in
0)
echo 'off'
;;
1)
echo 'nlec'
;;
*)
# Unknown value
echo ''
;;
esac
}
supportedCountries() {
echo "Austria:AUT:AT"
echo "Denmark:DNK:DK"
echo "Estonia:EST:EE"
echo "Germany:DEU:DE"
echo "Netherlands:NLD:NL"
echo "Norway:NOR:NO"
echo "Spain:ESP:ES"
echo "Sweden:SWE:SE"
echo "Switzerland:CHE:CH"
echo "United Kingdom:GBR:UK"
}