changeset 316:0f2db8baf8db

fc-tmsh: auw-fir command implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 22 Nov 2017 19:08:38 +0000
parents 9178594bc283
children b8479251ad0a
files rvinterf/tmsh/audiocmd.c rvinterf/tmsh/usercmd.c
diffstat 2 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rvinterf/tmsh/audiocmd.c	Wed Nov 22 18:52:47 2017 +0000
+++ b/rvinterf/tmsh/audiocmd.c	Wed Nov 22 19:08:38 2017 +0000
@@ -95,3 +95,26 @@
 	send_etm_cmd(cmdpkt, di - 1);
 	return(0);
 }
+
+cmd_auw_fir(argc, argv)
+	char **argv;
+{
+	u_char cmdpkt[67];
+	int rc;
+
+	cmdpkt[1] = ETM_AUDIO;
+	cmdpkt[2] = 'W';
+	if (!strcmp(argv[1], "ul"))
+		cmdpkt[3] = 5;	/* AUDIO_MICROPHONE_FIR */
+	else if (!strcmp(argv[1], "dl"))
+		cmdpkt[3] = 9;	/* AUDIO_SPEAKER_FIR */
+	else {
+		printf("error: first argument must be dl or ul\n");
+		return(ERROR_USAGE);
+	}
+	rc = read_fir_coeff_table(argv[2], cmdpkt + 4);
+	if (rc)
+		return(rc);
+	send_etm_cmd(cmdpkt, 65);
+	return(0);
+}
--- a/rvinterf/tmsh/usercmd.c	Wed Nov 22 18:52:47 2017 +0000
+++ b/rvinterf/tmsh/usercmd.c	Wed Nov 22 19:08:38 2017 +0000
@@ -18,6 +18,7 @@
 extern int cmd_aur();
 extern int cmd_aus();
 extern int cmd_auw();
+extern int cmd_auw_fir();
 extern int cmd_check_ffs1();
 extern int cmd_dieid();
 extern int cmd_ffs2();
@@ -77,6 +78,7 @@
 	{"aur", 1, 1, cmd_aur},
 	{"aus", 1, 1, cmd_aus},
 	{"auw", 2, 126, cmd_auw},
+	{"auw-fir", 2, 2, cmd_auw_fir},
 	{"check-ffs1", 0, 0, cmd_check_ffs1},
 	{"dieid", 0, 0, cmd_dieid},
 	{"etmpkt", 1, 253, cmd_tmpkt},