FreeCalypso > hg > fc-tourmaline
diff src/g23m-aci/aci/ati_fcmisc.c @ 301:4bb5772a05a3
AT%SPVER: new command for setting custom speech version lists
The speech version list in the Bearer Capability IE tells the network
which speech codecs are supported by the MS, and in which order of
preference. The standard behaviour is to list all codecs that are
supported by the hw+fw platform, and the standard preference order
is newer over older, FR over HR. But sometimes it is desirable
(for network testing) to artificially restrict which codecs the test MS
will declare as supported, and/or to list them in some peculiar
non-standard order of preference. Add a new private AT command,
AT%SPVER, allowing the user to set and clear custom speech version
lists for the Bearer Capability IE composer in CC.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 21 May 2023 21:43:10 +0000 |
parents | 91e61d00a6b5 |
children | d32ac4edb634 |
line wrap: on
line diff
--- a/src/g23m-aci/aci/ati_fcmisc.c Tue Dec 13 02:44:01 2022 +0000 +++ b/src/g23m-aci/aci/ati_fcmisc.c Sun May 21 21:43:10 2023 +0000 @@ -56,6 +56,8 @@ #endif /*FF_ATI_BAT*/ +#include "cl_user_spver.h" + #include "rv/rv_defined_swe.h" /* for RVM_BUZM_SWE and RVM_VIBR_SWE */ #include "main/sys_types.h" #include "fc-target.h" @@ -105,6 +107,56 @@ return (ATI_CMPL); } +/* AT%SPVER - set custom speech version list */ +GLOBAL T_ATI_RSLT atPercentSPVER (char *cl, UBYTE srcId) +{ + UBYTE spver_set; + UBYTE spver_list[5] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; + UBYTE spver_rc; + + TRACE_FUNCTION("atPercentSPVER()"); + + cl = parse(cl, "Xxxxxx", &spver_set, &spver_list[0], &spver_list[1], + &spver_list[2], &spver_list[3], &spver_list[4]); + if (!cl) + return (ATI_FAIL); + switch (spver_set) { + case CL_USER_SPVER_IS_NOT_SET: + cl_user_spver_reset(); + return (ATI_CMPL); + case CL_USER_SPVER_IS_SET: + spver_rc = cl_user_spver_set(spver_list); + if (spver_rc == CL_USER_SPVER_SET_OK) + return (ATI_CMPL); + else + return (ATI_FAIL); + default: + return (ATI_FAIL); + } +} + +GLOBAL T_ATI_RSLT queatPercentSPVER (char *cl, UBYTE srcId) +{ + UBYTE spver_set, rad_chan_req; + UBYTE spver_list[5], n, sv; + char *me="%SPVER: "; + char add[5]; + + spver_set = cl_user_spver_get(spver_list, &rad_chan_req); + sprintf(g_sa, "%s%u", me, spver_set); + if (spver_set == CL_USER_SPVER_IS_SET) { + for (n = 0; n < 5; n++) { + sv = spver_list[n]; + if (sv == NOT_PRESENT_8BIT) + break; + sprintf(add, ",%u", sv); + strcat(g_sa, add); + } + } + io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); + return (ATI_CMPL); +} + #ifdef TARGET_HAS_LPG /* AT@LPG - program LPG output */ GLOBAL T_ATI_RSLT atAtLPG ( char *cl, UBYTE srcId )