diff ater/activate.c @ 47:13fffc41f989

ater: add support for HR-data-16k TRAU-UL frame output
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 12 Sep 2024 23:37:47 +0000
parents 16715bd149e0
children 40f781efdbe1
line wrap: on
line diff
--- a/ater/activate.c	Thu Sep 12 17:43:39 2024 +0000
+++ b/ater/activate.c	Thu Sep 12 23:37:47 2024 +0000
@@ -76,11 +76,11 @@
 void cmd_activate_csd(int argc, char **argv)
 {
 	int nr;
-	bool ir_16k;
+	bool ir_16k, is_hr;
 	struct ater_subslot *at;
 
-	if (argc != 3) {
-usage:		fprintf(stderr, "usage: %s 0|1|2|3 8|16\n", argv[0]);
+	if (argc < 3 || argc > 4) {
+usage:		fprintf(stderr, "usage: %s 0|1|2|3 8|16 [hr]\n", argv[0]);
 		return;
 	}
 	if (argv[1][0] < '0' || argv[1][0] > '3' || argv[1][1])
@@ -92,6 +92,12 @@
 		ir_16k = true;
 	else
 		goto usage;
+	if (argv[3]) {
+		if (strcmp(argv[3], "hr"))
+			goto usage;
+		is_hr = true;
+	} else
+		is_hr = false;
 
 	at = &subslots[nr];
 	if (at->is_active) {
@@ -102,6 +108,7 @@
 	/* good to proceed now */
 	at->is_active = true;
 	at->is_data = true;
+	at->is_hr_data = is_hr;
 	init_trau_ul_frame_csd(nr, ir_16k);
 }