comparison Speech-codec-selection @ 99:c28a1518d268

Speech-codec-selection: document AT%SPVER
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 06 Jun 2023 03:54:53 +0000
parents 915ff61137ee
children
comparison
equal deleted inserted replaced
98:915ff61137ee 99:c28a1518d268
163 163
164 Step 1: set AT%MSCAP to the standard config for your currently running firmware 164 Step 1: set AT%MSCAP to the standard config for your currently running firmware
165 version, usually AT%MSCAP=37,00,00 or AT%MSCAP=B7,C7,00. 165 version, usually AT%MSCAP=37,00,00 or AT%MSCAP=B7,C7,00.
166 166
167 Step 2: execute 'rm /pcm/MSCAP' in fc-fsio, deleting the file from FFS. 167 Step 2: execute 'rm /pcm/MSCAP' in fc-fsio, deleting the file from FFS.
168
169 Speech version preference list
170 ==============================
171
172 Whenever a GSM MS supports any additional speech codecs beyond the always-
173 required FRv1, it needs to indicate this support to the network in the Bearer
174 capability IE. However, the encoding of the relevant bits in this IE indicates
175 not only which codecs the MS supports, but also their order of preference.
176 Indicating the order of preference between supported codecs is not optional:
177 the MS always has to transmit _some_ order-of-preference list toward the
178 network. (For GSM MS supporting FRv1 and HRv1 but no others, there is an
179 abbreviated version of the Bearer capability IE with octet 3a list omitted, but
180 even then the order of preference between the two supported codecs is still
181 indicated via the two radio channel requirement bits.)
182
183 Our current FreeCalypso TCS2/TCS3 hybrid firmware indicates the following order
184 of preference to the network, between the 5 potentially supported codecs:
185
186 AMR-FR > AMR-HR > EFR > FRv1 > HRv1
187
188 (The '>' character in the above line indicates that the codec on the left is
189 preferred over the codec on the right.)
190
191 The actual Bearer capability IE is constructed by first masking off each of the
192 5 possible codecs as supported or not-supported per EF_MSCAP (see previous
193 section), but those codecs that remain in the supported set are sent to the
194 network in the order of preference following the above diagram.
195
196 It appears that most GSM networks ignore the speech version preference order
197 indicated by the MS, treating the MS-provided speech version list as an
198 unordered checklist of supported or non-supported, and impose their own
199 preference order set by network policy. Such behavior is implemented in Osmocom
200 CNI software, and is also observed on the legacy GSM network of T-Mobile USA as
201 of this writing. However, the world as a whole is big, there are many different
202 GSM networks in different countries, and I (Mother Mychaela) deem it valuable to
203 provide a mechanism whereby FreeCalypso-equipped GSM community members can test
204 experimentally how their countries' GSM networks react to different speech
205 version lists indicated by the MS, including peculiar preference orders.
206
207 To facilitate such testing, FreeCalypso Tourmaline firmware provides a private
208 debug-oriented AT command controlling the speech version list: AT%SPVER. This
209 command takes the following forms:
210
211 AT%SPVER=0 -- restore standard behavior
212 AT%SPVER=1,sv1[,sv2[,sv3[,sv4[,sv5]]]]] -- set custom speech version list
213 AT%SPVER? -- query current setting
214
215 In the second listed form of AT%SPVER command, arguments sv1 through sv5 are
216 speech version codes as transmitted over the air in the Bearer capability IE,
217 as given in Table 10.5.103/3GPP TS 24.008:
218
219 0 = FRv1
220 1 = HRv1
221 2 = EFR
222 4 = AMR-FR
223 5 = AMR-HR
224
225 The speech version list sent to the network will be exactly as given in the
226 AT%SPVER command, in that order. You can list just one speech version, or all
227 5 of them, or any intermediate subset - but FRv1 (sv code 0) must always be
228 included, or the AT%SPVER command will be rejected. Some examples:
229
230 AT%SPVER=1,0 -- declare support for FRv1 only
231 AT%SPVER=1,2,0,1 -- declare support for EFR, FRv1 and HRv1 in this order
232 AT%SPVER=1,1,0 -- prefer HRv1 over FRv1
233
234 Unlike AT%MSCAP, the setting made with AT%SPVER is volatile: it is not saved
235 anywhere in FFS, and thus does not persist across firmware boot cycles.
236
237 In order to affect the Bearer capability IE in the Call confirmed message for
238 MT calls, the AT%SPVER command needs to be given before the MT Setup message
239 arrives from the network. For MO call testing, it is sufficient to set AT%SPVER
240 before dialing the MO call with ATD command.