diff src/g23m-aci/aci/ati_audio.c @ 162:8c5d012b9c4d

aci: AT@VSEL and vocoder revamping changes from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 28 Mar 2019 00:36:10 +0000
parents 7d5b412ffb6c
children a911ac771094
line wrap: on
line diff
--- a/src/g23m-aci/aci/ati_audio.c	Fri Mar 22 17:13:59 2019 +0000
+++ b/src/g23m-aci/aci/ati_audio.c	Thu Mar 28 00:36:10 2019 +0000
@@ -168,6 +168,8 @@
 }
 
 #ifdef CONFIG_TARGET_FCDEV3B
+extern UBYTE aci_digital_voice_autoswitch;
+
 /* AT@VPATH - configure digital voice path */
 GLOBAL T_ATI_RSLT atAtVPATH ( char *cl, UBYTE srcId )
 {
@@ -212,6 +214,33 @@
 
 	return (ATI_CMPL);
 }
+
+/* AT@VSEL - configure digital voice path automatic operation */
+GLOBAL T_ATI_RSLT atAtVSEL ( char *cl, UBYTE srcId )
+{
+	int vsel_int;
+
+	TRACE_FUNCTION("atAtVSEL()");
+
+	cl = parse(cl, "D", &vsel_int);
+	if (!cl)
+		return (ATI_FAIL);
+	if (vsel_int != 0 && vsel_int != 1)
+		return (ATI_FAIL);
+	aci_digital_voice_autoswitch = vsel_int;
+	return (ATI_CMPL);
+}
+
+GLOBAL T_ATI_RSLT queatAtVSEL (char *cl, UBYTE srcId)
+{
+	char *me="@VSEL: ";
+
+	TRACE_FUNCTION("queatAtVSEL()");
+
+	sprintf(g_sa, "%s%u", me, aci_digital_voice_autoswitch);
+	io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT);
+	return (ATI_CMPL);
+}
 #endif
 
 static char melody_E1_name[AUDIO_PATH_NAME_MAX_SIZE];