comparison src/g23m-gsm/cc/cc_cfk.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 fa8dc04885d8
children
comparison
equal deleted inserted replaced
300:edcb8364d45b 301:4bb5772a05a3
38 #include "mon_cc.h" 38 #include "mon_cc.h"
39 #include "pei.h" 39 #include "pei.h"
40 #include "tok.h" 40 #include "tok.h"
41 #include "cc.h" 41 #include "cc.h"
42 42
43 /* FreeCalypso addition */
44 #include "cl_user_spver.h"
45
43 /*==== EXPORT =====================================================*/ 46 /*==== EXPORT =====================================================*/
44 47
45 /*==== PROTOTYPE ==================================================*/ 48 /*==== PROTOTYPE ==================================================*/
46 /* Implements Measure# 21 */ 49 /* Implements Measure# 21 */
47 LOCAL void cc_set_neg_bearer_cap (const T_M_CC_bearer_cap * bearer_cap, 50 LOCAL void cc_set_neg_bearer_cap (const T_M_CC_bearer_cap * bearer_cap,
608 { 611 {
609 GET_INSTANCE_DATA; 612 GET_INSTANCE_DATA;
610 UBYTE index, prio; 613 UBYTE index, prio;
611 const UBYTE codec_prio[5] = {M_CC_SPEECH_VERS_AMR_FR, M_CC_SPEECH_VERS_AMR_HR, M_CC_SPEECH_VERS_EFR, 614 const UBYTE codec_prio[5] = {M_CC_SPEECH_VERS_AMR_FR, M_CC_SPEECH_VERS_AMR_HR, M_CC_SPEECH_VERS_EFR,
612 M_CC_SPEECH_VERS_FR, M_CC_SPEECH_VERS_HR}; 615 M_CC_SPEECH_VERS_FR, M_CC_SPEECH_VERS_HR};
613 UBYTE codec_val[5] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; 616 UBYTE codec_val[5] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
617 UBYTE user_spver_set, user_spver_rcr;
614 618
615 TRACE_FUNCTION ("cc_set_radio_channel_requirement()"); 619 TRACE_FUNCTION ("cc_set_radio_channel_requirement()");
616 620
617 switch (bcpara->bearer_serv) 621 switch (bcpara->bearer_serv)
618 { 622 {
684 index++; 688 index++;
685 } 689 }
686 break; 690 break;
687 } /* switch (codec_prio[prio])*/ 691 } /* switch (codec_prio[prio])*/
688 } /* for */ 692 } /* for */
693
694 /* FreeCalypso addition: user override of codec priority list */
695 user_spver_set = cl_user_spver_get(codec_val, &user_spver_rcr);
696 if (user_spver_set == CL_USER_SPVER_IS_SET)
697 bearer_cap->rad_chan_req = user_spver_rcr;
689 698
690 if (bcpara->bearer_serv EQ MNCC_BEARER_SERV_SPEECH_CTM OR 699 if (bcpara->bearer_serv EQ MNCC_BEARER_SERV_SPEECH_CTM OR
691 bcpara->bearer_serv EQ MNCC_BEARER_SERV_AUX_SPEECH_CTM) 700 bcpara->bearer_serv EQ MNCC_BEARER_SERV_AUX_SPEECH_CTM)
692 { 701 {
693 bearer_cap->v_ctm = TRUE; 702 bearer_cap->v_ctm = TRUE;