diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c index 4f5d6d3cf..9e88ce9e7 100644 --- a/src/osmo-bts-trx/sched_lchan_tchf.c +++ b/src/osmo-bts-trx/sched_lchan_tchf.c @@ -45,6 +45,13 @@ #include #include +/* 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) { diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c index 21fb62c96..17b3a3b3c 100644 --- a/src/osmo-bts-trx/sched_lchan_tchh.c +++ b/src/osmo-bts-trx/sched_lchan_tchh.c @@ -45,6 +45,17 @@ #include #include +/* 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) { diff --git a/src/osmo-bts-trx/sched_utils.h b/src/osmo-bts-trx/sched_utils.h index 398083d9e..f76e49bbd 100644 --- a/src/osmo-bts-trx/sched_utils.h +++ b/src/osmo-bts-trx/sched_utils.h @@ -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. */