osmo-bts-trx: move AMR CMI lookup tables to the respective files

It makes no sense to have these tables in the header file, because
they're not used anywhere outside of the respective lchan handlers.

Change-Id: Ibdebfb9b1ef78c960b08240ebdb4c7af92cbed11
Related: SYS#5916
This commit is contained in:
Vadim Yanitskiy 2022-04-08 18:35:52 +03:00
parent f5b756e484
commit c4368ce3ab
3 changed files with 18 additions and 18 deletions

View File

@ -45,6 +45,13 @@
#include <sched_utils.h>
#include <loops.h>
/* 3GPP TS 45.009, table 3.2.1.3-{1,3}: AMR on Uplink TCH/F */
static const uint8_t sched_tchf_ul_amr_cmi_map[26] = {
[7] = 1, /* TCH/F: first=0 / last=7 */
[16] = 1, /* TCH/F: first=8 / last=16 */
[24] = 1, /* TCH/F: first=17 / last=24 */
};
/*! \brief a single TCH/F burst was received by the PHY, process it */
int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
{

View File

@ -45,6 +45,17 @@
#include <sched_utils.h>
#include <loops.h>
/* 3GPP TS 45.009, table 3.2.1.3-{2,4}: AMR on Uplink TCH/H */
static const uint8_t sched_tchh_ul_amr_cmi_map[26] = {
[6] = 1, /* TCH/H(0): first=0 / last=6 */
[15] = 1, /* TCH/H(0): first=8 / last=15 */
[23] = 1, /* TCH/H(0): first=17 / last=23 */
[7] = 1, /* TCH/H(1): first=1 / last=7 */
[16] = 1, /* TCH/H(1): first=9 / last=16 */
[24] = 1, /* TCH/H(1): first=18 / last=24 */
};
/*! \brief a single TCH/H burst was received by the PHY, process it */
int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
{

View File

@ -37,24 +37,6 @@ static inline uint16_t compute_ber10k(int n_bits_total, int n_errors)
return 10000 * n_errors / n_bits_total;
}
/* 3GPP TS 45.009, table 3.2.1.3-{1,3}: AMR on Uplink TCH/F */
static const uint8_t sched_tchf_ul_amr_cmi_map[26] = {
[7] = 1, /* TCH/F: first=0 / last=7 */
[16] = 1, /* TCH/F: first=8 / last=16 */
[24] = 1, /* TCH/F: first=17 / last=24 */
};
/* 3GPP TS 45.009, table 3.2.1.3-{2,4}: AMR on Uplink TCH/H */
static const uint8_t sched_tchh_ul_amr_cmi_map[26] = {
[6] = 1, /* TCH/H(0): first=0 / last=6 */
[15] = 1, /* TCH/H(0): first=8 / last=15 */
[23] = 1, /* TCH/H(0): first=17 / last=23 */
[7] = 1, /* TCH/H(1): first=1 / last=7 */
[16] = 1, /* TCH/H(1): first=9 / last=16 */
[24] = 1, /* TCH/H(1): first=18 / last=24 */
};
/*! determine whether an uplink AMR block is CMI according to 3GPP TS 45.009.
* \param[in] fn_begin frame number of the beginning of the block.
* \returns true in case of CMI; false otherwise. */