changeset 631:597869e59805

config: introduced new CONFIG_MCSI_MODEM preprocessor symbol All MCSI functionality was previously conditionalized on CONFIG_TARGET_FCMODEM (even earlier it was CONFIG_TARGET_FCDEV3B), but having a dedicated preprocessor symbol for this purpose (defined in targets/*.h as appropriate) makes it much easier to support different modem targets with MCSI enabled.
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 04 Jan 2020 19:07:02 +0000
parents b639f7ab0007
children d968a3216ba0
files src/aci2/aci/ati_audio.c src/aci2/aci/ati_cmd.c src/aci2/aci/hl_audio_drv.c src/cs/drivers/drv_core/armio/armio.c src/g23m-aci/aci/ati_audio.c src/g23m-aci/aci/ati_cmd.c src/g23m-aci/aci/hl_audio_drv.c targets/fcdev3b.h
diffstat 8 files changed, 18 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/aci2/aci/ati_audio.c	Fri Jan 03 07:13:51 2020 +0000
+++ b/src/aci2/aci/ati_audio.c	Sat Jan 04 19:07:02 2020 +0000
@@ -167,7 +167,7 @@
 	return (ATI_CMPL);
 }
 
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
 extern UBYTE aci_digital_voice_autoswitch;
 
 /* AT@VPATH - configure digital voice path */
--- a/src/aci2/aci/ati_cmd.c	Fri Jan 03 07:13:51 2020 +0000
+++ b/src/aci2/aci/ati_cmd.c	Sat Jan 04 19:07:02 2020 +0000
@@ -679,7 +679,7 @@
 EXTERN T_ATI_RSLT atAtSPKR (char *cl, UBYTE srcId);
 EXTERN T_ATI_RSLT queatAtSPKR (char *cl, UBYTE srcId);
 #endif
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
 EXTERN T_ATI_RSLT atAtVPATH (char *cl, UBYTE srcId);
 EXTERN T_ATI_RSLT queatAtVPATH (char *cl, UBYTE srcId);
 EXTERN T_ATI_RSLT atAtVSEL (char *cl, UBYTE srcId);
@@ -1093,7 +1093,7 @@
 #if GPIO1_SPEAKER_CTRL
     {"@SPKR",	AT_CMD_AT_SPKR,  atAtSPKR, test_gen, queatAtSPKR, "%s: (0,1)"},
 #endif
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
     {"@VPATH",	AT_CMD_AT_VPATH, atAtVPATH,test_gen, queatAtVPATH,"%s: (0-2)"},
     {"@VSEL",	AT_CMD_AT_VSEL,  atAtVSEL, test_gen, queatAtVSEL, "%s: (0,1)"},
 #endif
--- a/src/aci2/aci/hl_audio_drv.c	Fri Jan 03 07:13:51 2020 +0000
+++ b/src/aci2/aci/hl_audio_drv.c	Sat Jan 04 19:07:02 2020 +0000
@@ -39,7 +39,7 @@
 
 LOCAL T_HL_VOCODER_STATE currVocoderState;
 
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
 GLOBAL UBYTE aci_digital_voice_autoswitch;
 #endif
 
@@ -95,7 +95,7 @@
 */
 GLOBAL T_HL_VOICE_DRV_RSLT hl_drv_enable_vocoder ( void )
 {
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
   T_AUDIO_VOICE_PATH_SETTING vpath = AUDIO_BLUETOOTH_HEADSET;
   T_AUDIO_FULL_ACCESS_WRITE audio_param;
   T_RV_RETURN return_path = { NULL, 0 };
@@ -134,7 +134,7 @@
     enable_tch_vocoder(TRUE);
     vocoder_mute_dl (FALSE);      /* un-mute speaker    */
     vocoder_mute_ul (FALSE);      /* un-mute microphone */
-  #ifdef CONFIG_TARGET_FCMODEM
+  #ifdef CONFIG_MCSI_MODEM
     if (aci_digital_voice_autoswitch)
     {
       audio_param.variable_indentifier = AUDIO_PATH_USED;
@@ -160,7 +160,7 @@
 */
 GLOBAL void hl_drv_disable_vocoder ( void )
 {
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
   T_AUDIO_VOICE_PATH_SETTING vpath = AUDIO_GSM_VOICE_PATH;
   T_AUDIO_FULL_ACCESS_WRITE audio_param;
   T_RV_RETURN return_path = { NULL, 0 };
@@ -177,7 +177,7 @@
   vocoder_mute_dl (TRUE);       /* mute speaker    */
   vocoder_mute_ul (TRUE);       /* mute microphone */
   enable_tch_vocoder (FALSE);   /* disable vocoder */
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
   if (aci_digital_voice_autoswitch)
   {
     audio_param.variable_indentifier = AUDIO_PATH_USED;
--- a/src/cs/drivers/drv_core/armio/armio.c	Fri Jan 03 07:13:51 2020 +0000
+++ b/src/cs/drivers/drv_core/armio/armio.c	Sat Jan 04 19:07:02 2020 +0000
@@ -189,7 +189,7 @@
    * FreeCalypso change: we don't have BT, our new criterion is
    * whether or not a given board is wired for MCSI.
    */
-  #if defined(CONFIG_TARGET_FCMODEM) || defined(CONFIG_TARGET_PIRELLI)
+  #if defined(CONFIG_MCSI_MODEM) || defined(CONFIG_TARGET_PIRELLI)
     AI_DisableBit(5);
     AI_DisableBit(6);
     AI_DisableBit(7);
--- a/src/g23m-aci/aci/ati_audio.c	Fri Jan 03 07:13:51 2020 +0000
+++ b/src/g23m-aci/aci/ati_audio.c	Sat Jan 04 19:07:02 2020 +0000
@@ -167,7 +167,7 @@
 	return (ATI_CMPL);
 }
 
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
 extern UBYTE aci_digital_voice_autoswitch;
 
 /* AT@VPATH - configure digital voice path */
--- a/src/g23m-aci/aci/ati_cmd.c	Fri Jan 03 07:13:51 2020 +0000
+++ b/src/g23m-aci/aci/ati_cmd.c	Sat Jan 04 19:07:02 2020 +0000
@@ -747,7 +747,7 @@
 EXTERN T_ATI_RSLT atAtSPKR (char *cl, UBYTE srcId);
 EXTERN T_ATI_RSLT queatAtSPKR (char *cl, UBYTE srcId);
 #endif
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
 EXTERN T_ATI_RSLT atAtVPATH (char *cl, UBYTE srcId);
 EXTERN T_ATI_RSLT queatAtVPATH (char *cl, UBYTE srcId);
 EXTERN T_ATI_RSLT atAtVSEL (char *cl, UBYTE srcId);
@@ -1212,7 +1212,7 @@
 #if GPIO1_SPEAKER_CTRL
     {"@SPKR",	AT_CMD_AT_SPKR,  atAtSPKR, test_gen, queatAtSPKR, "%s: (0,1)"},
 #endif
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
     {"@VPATH",	AT_CMD_AT_VPATH, atAtVPATH,test_gen, queatAtVPATH,"%s: (0-2)"},
     {"@VSEL",	AT_CMD_AT_VSEL,  atAtVSEL, test_gen, queatAtVSEL, "%s: (0,1)"},
 #endif
--- a/src/g23m-aci/aci/hl_audio_drv.c	Fri Jan 03 07:13:51 2020 +0000
+++ b/src/g23m-aci/aci/hl_audio_drv.c	Sat Jan 04 19:07:02 2020 +0000
@@ -38,7 +38,7 @@
 
 LOCAL  T_HL_VOCODER_STATE currVocoderState;
 
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
 GLOBAL UBYTE aci_digital_voice_autoswitch;
 #endif
 
@@ -69,7 +69,7 @@
   currVocoderState = HL_VOCODER_DISABLED;
 }
 
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
 static void audio_mode_callback(void *event_from_audio)
 {
 	/* do nothing at this time */
@@ -89,7 +89,7 @@
 */
 GLOBAL void hl_drv_set_vocoder_state(BOOL user_attach)
 {
-#ifdef CONFIG_TARGET_FCMODEM
+#ifdef CONFIG_MCSI_MODEM
   T_AUDIO_VOICE_PATH_SETTING vpath;
   T_AUDIO_FULL_ACCESS_WRITE audio_param;
   T_RV_RETURN return_path;
@@ -106,7 +106,7 @@
     enable_tch_vocoder(TRUE);
     vocoder_mute_dl (FALSE);      /* un-mute speaker    */
     vocoder_mute_ul (FALSE);      /* un-mute microphone */
-  #ifdef CONFIG_TARGET_FCMODEM
+  #ifdef CONFIG_MCSI_MODEM
     if (aci_digital_voice_autoswitch)
     {
       vpath = AUDIO_BLUETOOTH_HEADSET;
@@ -124,7 +124,7 @@
     vocoder_mute_dl (TRUE);       /* mute speaker    */
     vocoder_mute_ul (TRUE);       /* mute microphone */
     enable_tch_vocoder (FALSE);   /* disable vocoder */
-  #ifdef CONFIG_TARGET_FCMODEM
+  #ifdef CONFIG_MCSI_MODEM
     if (aci_digital_voice_autoswitch)
     {
       vpath = AUDIO_GSM_VOICE_PATH;
--- a/targets/fcdev3b.h	Fri Jan 03 07:13:51 2020 +0000
+++ b/targets/fcdev3b.h	Sat Jan 04 19:07:02 2020 +0000
@@ -1,4 +1,5 @@
 #define	CONFIG_TARGET_FCFAM	1
 #define	CONFIG_TARGET_FCMODEM	1
+#define	CONFIG_MCSI_MODEM	1
 #define	GPIO1_SPEAKER_CTRL	1
 #define	UARTFAX_CLASSIC_DTR_DCD	1