This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/19458 ) Change subject: firmware: add possibility to configure TCH loops in the DSP ...................................................................... firmware: add possibility to configure TCH loops in the DSP Change-Id: Ide7b0527ad64a044977a10da4a82a8ecd1fbd8dc --- M include/l1ctl_proto.h M src/target/firmware/include/layer1/sync.h M src/target/firmware/layer1/l23_api.c M src/target/firmware/layer1/prim_tch.c 4 files changed, 25 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/58/19458/1 diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h index 05d65de..cf41ac7 100644 --- a/include/l1ctl_proto.h +++ b/include/l1ctl_proto.h @@ -149,11 +149,24 @@ uint8_t padding[3]; } __attribute__((packed)); +/* 3GPP TS 44.014, section 5.1 (Calypso specific numbers) */ +enum l1ctl_tch_loop_mode { + L1CTL_TCH_LOOP_OPEN = 0x00, + L1CTL_TCH_LOOP_A = 0x01, + L1CTL_TCH_LOOP_B = 0x02, + L1CTL_TCH_LOOP_C = 0x03, + L1CTL_TCH_LOOP_D = 0x04, + L1CTL_TCH_LOOP_E = 0x05, + L1CTL_TCH_LOOP_F = 0x06, + L1CTL_TCH_LOOP_I = 0x07, +}; + /* TCH mode was changed */ struct l1ctl_tch_mode_conf { uint8_t tch_mode; /* enum tch_mode */ uint8_t audio_mode; - uint8_t padding[2]; + uint8_t tch_loop_mode; /* enum l1ctl_tch_loop_mode */ + uint8_t padding[1]; } __attribute__((packed)); /* data on the CCCH was found. This is following the header */ @@ -231,7 +244,8 @@ #define AUDIO_RX_SPEAKER (1<<2) #define AUDIO_RX_TRAFFIC_IND (1<<3) uint8_t audio_mode; - uint8_t padding[2]; + uint8_t tch_loop_mode; /* enum l1ctl_tch_loop_mode */ + uint8_t padding[1]; } __attribute__((packed)); /* the l1_info_ul header is in front */ diff --git a/src/target/firmware/include/layer1/sync.h b/src/target/firmware/include/layer1/sync.h index 6ed3890..dd93242 100644 --- a/src/target/firmware/include/layer1/sync.h +++ b/src/target/firmware/include/layer1/sync.h @@ -83,6 +83,9 @@ uint8_t tch_sync; uint8_t audio_mode; + /* 3GPP TS 44.014, section 5.1 (Calypso DSP specific numbers) */ + enum l1ctl_tch_loop_mode tch_loop_mode; + /* Transmit queues of pending packets for main DCCH and ACCH */ struct llist_head tx_queue[_NUM_L1S_CHAN]; struct msgb *tx_meas; diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c index d52d8f6..62c21f6 100644 --- a/src/target/firmware/layer1/l23_api.c +++ b/src/target/firmware/layer1/l23_api.c @@ -352,6 +352,7 @@ dsp_load_ciph_param(0, NULL); l1a_tch_mode_set(GSM48_CMODE_SIGN); audio_set_enabled(GSM48_CMODE_SIGN, 0); + l1s.tch_loop_mode = L1CTL_TCH_LOOP_OPEN; l1s.neigh_pm.n = 0; } @@ -521,6 +522,7 @@ msgb_put(msg, sizeof(*mode_conf)); mode_conf->tch_mode = tch_mode; mode_conf->audio_mode = audio_mode; + mode_conf->tch_loop_mode = l1s.tch_loop_mode; l1_queue_for_l2(msg); } @@ -542,6 +544,7 @@ audio_set_enabled(tch_mode, audio_mode); l1s.tch_sync = 1; /* Needed for audio to work */ + l1s.tch_loop_mode = tch_mode_req->tch_loop_mode; l1ctl_tx_tch_mode_conf(tch_mode, audio_mode); } diff --git a/src/target/firmware/layer1/prim_tch.c b/src/target/firmware/layer1/prim_tch.c index 0254654..40ef8f3 100644 --- a/src/target/firmware/layer1/prim_tch.c +++ b/src/target/firmware/layer1/prim_tch.c @@ -526,7 +526,7 @@ dsp_load_tch_param( &l1s.next_time, tch_mode, tch_f_hn ? TCH_F : TCH_H, tch_sub, - 0, sync, tn + l1s.tch_loop_mode, sync, tn ); dsp_load_rx_task( @@ -585,7 +585,7 @@ dsp_load_tch_param( &l1s.next_time, tch_mode, tch_f_hn ? TCH_F : TCH_H, tch_sub, - 0, 0, tn + l1s.tch_loop_mode, 0, tn ); dsp_load_rx_task(TCHD_DSP_TASK, 0, tsc); /* burst_id unused for TCH */ @@ -791,7 +791,7 @@ dsp_load_tch_param( &l1s.next_time, tch_mode, tch_f_hn ? TCH_F : TCH_H, tch_sub, - 0, 0, tn + l1s.tch_loop_mode, 0, tn ); dsp_load_rx_task( -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/19458 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ide7b0527ad64a044977a10da4a82a8ecd1fbd8dc Gerrit-Change-Number: 19458 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200730/30e34375/attachment.htm>