FreeCalypso > hg > fc-tourmaline
comparison 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 |
comparison
equal
deleted
inserted
replaced
300:edcb8364d45b | 301:4bb5772a05a3 |
---|---|
54 | 54 |
55 #include "ati_bat.h" | 55 #include "ati_bat.h" |
56 | 56 |
57 #endif /*FF_ATI_BAT*/ | 57 #endif /*FF_ATI_BAT*/ |
58 | 58 |
59 #include "cl_user_spver.h" | |
60 | |
59 #include "rv/rv_defined_swe.h" /* for RVM_BUZM_SWE and RVM_VIBR_SWE */ | 61 #include "rv/rv_defined_swe.h" /* for RVM_BUZM_SWE and RVM_VIBR_SWE */ |
60 #include "main/sys_types.h" | 62 #include "main/sys_types.h" |
61 #include "fc-target.h" | 63 #include "fc-target.h" |
62 #include "armio.h" | 64 #include "armio.h" |
63 | 65 |
99 char *me="@SPENH: "; | 101 char *me="@SPENH: "; |
100 | 102 |
101 TRACE_FUNCTION("queatAtSPENH()"); | 103 TRACE_FUNCTION("queatAtSPENH()"); |
102 | 104 |
103 sprintf(g_sa, "%s%u", me, SIM_allow_speed_enhancement); | 105 sprintf(g_sa, "%s%u", me, SIM_allow_speed_enhancement); |
106 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | |
107 return (ATI_CMPL); | |
108 } | |
109 | |
110 /* AT%SPVER - set custom speech version list */ | |
111 GLOBAL T_ATI_RSLT atPercentSPVER (char *cl, UBYTE srcId) | |
112 { | |
113 UBYTE spver_set; | |
114 UBYTE spver_list[5] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; | |
115 UBYTE spver_rc; | |
116 | |
117 TRACE_FUNCTION("atPercentSPVER()"); | |
118 | |
119 cl = parse(cl, "Xxxxxx", &spver_set, &spver_list[0], &spver_list[1], | |
120 &spver_list[2], &spver_list[3], &spver_list[4]); | |
121 if (!cl) | |
122 return (ATI_FAIL); | |
123 switch (spver_set) { | |
124 case CL_USER_SPVER_IS_NOT_SET: | |
125 cl_user_spver_reset(); | |
126 return (ATI_CMPL); | |
127 case CL_USER_SPVER_IS_SET: | |
128 spver_rc = cl_user_spver_set(spver_list); | |
129 if (spver_rc == CL_USER_SPVER_SET_OK) | |
130 return (ATI_CMPL); | |
131 else | |
132 return (ATI_FAIL); | |
133 default: | |
134 return (ATI_FAIL); | |
135 } | |
136 } | |
137 | |
138 GLOBAL T_ATI_RSLT queatPercentSPVER (char *cl, UBYTE srcId) | |
139 { | |
140 UBYTE spver_set, rad_chan_req; | |
141 UBYTE spver_list[5], n, sv; | |
142 char *me="%SPVER: "; | |
143 char add[5]; | |
144 | |
145 spver_set = cl_user_spver_get(spver_list, &rad_chan_req); | |
146 sprintf(g_sa, "%s%u", me, spver_set); | |
147 if (spver_set == CL_USER_SPVER_IS_SET) { | |
148 for (n = 0; n < 5; n++) { | |
149 sv = spver_list[n]; | |
150 if (sv == NOT_PRESENT_8BIT) | |
151 break; | |
152 sprintf(add, ",%u", sv); | |
153 strcat(g_sa, add); | |
154 } | |
155 } | |
104 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); | 156 io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); |
105 return (ATI_CMPL); | 157 return (ATI_CMPL); |
106 } | 158 } |
107 | 159 |
108 #ifdef TARGET_HAS_LPG | 160 #ifdef TARGET_HAS_LPG |