# HG changeset patch # User Mychaela Falconia # Date 1726184267 0 # Node ID 13fffc41f989a08dea35ec9dc4e28112db0acb8f # Parent 12415d7ce2626c655c43f53534fbe10735f7d7fa ater: add support for HR-data-16k TRAU-UL frame output diff -r 12415d7ce262 -r 13fffc41f989 ater/activate.c --- 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); } diff -r 12415d7ce262 -r 13fffc41f989 ater/submux.h --- a/ater/submux.h Thu Sep 12 17:43:39 2024 +0000 +++ b/ater/submux.h Thu Sep 12 23:37:47 2024 +0000 @@ -20,6 +20,7 @@ int nr; bool is_active; bool is_data; + bool is_hr_data; bool is_efr; struct osmo_trau_frame ul_frame; unsigned mfrm_count; diff -r 12415d7ce262 -r 13fffc41f989 ater/tx_func.c --- a/ater/tx_func.c Thu Sep 12 17:43:39 2024 +0000 +++ b/ater/tx_func.c Thu Sep 12 23:37:47 2024 +0000 @@ -87,6 +87,13 @@ msgb_free(msg); return; } + /* + * A very ugly/hacky way of setting C5 for HR data, + * working around libosmotrau API that is not designed + * for such hacking. + */ + if (at->is_data && at->is_hr_data) + msg->tail[21] = 1; msgb_put(msg, len); osmo_i460_mux_enqueue(at->schan, msg); }