FreeCalypso > hg > fc-tourmaline
changeset 302:d32ac4edb634
aci: add AT%MSCAP command for tinkering with /pcm/MSCAP
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 05 Jun 2023 21:34:33 +0000 |
parents | 4bb5772a05a3 |
children | f76436d19a7a |
files | src/g23m-aci/aci/aci_cmh.h src/g23m-aci/aci/ati_cmd.c src/g23m-aci/aci/ati_fcmisc.c |
diffstat | 3 files changed, 38 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/g23m-aci/aci/aci_cmh.h Sun May 21 21:43:10 2023 +0000 +++ b/src/g23m-aci/aci/aci_cmh.h Mon Jun 05 21:34:33 2023 +0000 @@ -552,6 +552,7 @@ AT_CMD_AT_BZSTOP, AT_CMD_AT_VIBR, AT_CMD_AT_VIBS, + AT_CMD_P_MSCAP, AT_CMD_P_SPVER, /* terminator */ AT_CMD_MAX, /* maximum command id */
--- a/src/g23m-aci/aci/ati_cmd.c Sun May 21 21:43:10 2023 +0000 +++ b/src/g23m-aci/aci/ati_cmd.c Mon Jun 05 21:34:33 2023 +0000 @@ -790,6 +790,8 @@ EXTERN T_ATI_RSLT atAtVIBR (char *cl, UBYTE srcId); EXTERN T_ATI_RSLT atAtVIBS (char *cl, UBYTE srcId); #endif +EXTERN T_ATI_RSLT atPercentMSCAP (char *cl, UBYTE srcId); +EXTERN T_ATI_RSLT queatPercentMSCAP (char *cl, UBYTE srcId); EXTERN T_ATI_RSLT atPercentSPVER (char *cl, UBYTE srcId); EXTERN T_ATI_RSLT queatPercentSPVER (char *cl, UBYTE srcId); @@ -1275,6 +1277,8 @@ {"@VIBR", AT_CMD_AT_VIBR, atAtVIBR, 0, 0, 0}, {"@VIBS", AT_CMD_AT_VIBS, atAtVIBS, 0, 0, 0}, #endif + {"%MSCAP", AT_CMD_P_MSCAP, atPercentMSCAP, test_gen, queatPercentMSCAP, + "%s: (00-FF),(00-FF),(00-FF),(00-FF),(00-FF),(00-FF)"}, {"%SPVER", AT_CMD_P_SPVER, atPercentSPVER, test_gen, queatPercentSPVER, "%s: (0,1),(0-5),(0-5),(0-5),(0-5),(0-5)"}, /* terminator */
--- a/src/g23m-aci/aci/ati_fcmisc.c Sun May 21 21:43:10 2023 +0000 +++ b/src/g23m-aci/aci/ati_fcmisc.c Mon Jun 05 21:34:33 2023 +0000 @@ -107,6 +107,39 @@ return (ATI_CMPL); } +/* AT%MSCAP - tinker with /pcm/MSCAP settings */ +GLOBAL T_ATI_RSLT atPercentMSCAP (char *cl, UBYTE srcId) +{ + EF_MSCAP mscap; + + TRACE_FUNCTION("atPercentMSCAP()"); + + mscap.featLst1 = 0; + mscap.featLst2 = 0; + mscap.featLst3 = 0; + cl = parse(cl, "XXXxxx", &mscap.chnMode, &mscap.datCap1, &mscap.datCap2, + &mscap.featLst1, &mscap.featLst2, &mscap.featLst3); + if (!cl) + return (ATI_FAIL); + pcm_WriteFile((UBYTE *) EF_MSCAP_ID, SIZE_EF_MSCAP, (UBYTE *) &mscap); + return (ATI_CMPL); +} + +GLOBAL T_ATI_RSLT queatPercentMSCAP (char *cl, UBYTE srcId) +{ + EF_MSCAP mscap; + UBYTE version; + char *me="%MSCAP: "; + + pcm_ReadFile((UBYTE *) EF_MSCAP_ID, SIZE_EF_MSCAP, (UBYTE *) &mscap, + &version); + sprintf(g_sa, "%s%02X,%02X,%02X,%02X,%02X,%02X", me, mscap.chnMode, + mscap.datCap1, mscap.datCap2, mscap.featLst1, mscap.featLst2, + mscap.featLst3); + io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); + return (ATI_CMPL); +} + /* AT%SPVER - set custom speech version list */ GLOBAL T_ATI_RSLT atPercentSPVER (char *cl, UBYTE srcId) {