diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-10-03 22:34:37 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-10-03 22:34:37 +0200 |
commit | 1009a87f3c0f8527290957aaf2ccc6f1a2cce531 (patch) | |
tree | 8bde5e7a02842444ec3f25f87a82cfbb99d1b771 | |
parent | f1fb0fa3af174c605f60458388bba61ef4f40fa8 (diff) |
amr: Catch up with the amr_mode changes
Use the bts_modes for all the types. As there are two instances
know. One for the ms and one for the bts.
Manual compile fix and not tested on HW
-rw-r--r-- | src/common/amr.c | 20 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/tch.c | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/common/amr.c b/src/common/amr.c index b0ff1b9c..80c5fb62 100644 --- a/src/common/amr.c +++ b/src/common/amr.c @@ -16,9 +16,9 @@ void amr_log_mr_conf(int ss, int logl, const char *pfx, for (i = 0; i < amr_mrc->num_modes; i++) LOGPC(ss, logl, ", mode[%u] = %u/%u/%u", - i, amr_mrc->mode[i].mode, - amr_mrc->mode[i].threshold_bts, - amr_mrc->mode[i].hysteresis_bts); + i, amr_mrc->bts_mode[i].mode, + amr_mrc->bts_mode[i].threshold, + amr_mrc->bts_mode[i].hysteresis); LOGPC(ss, logl, "\n"); } @@ -64,23 +64,23 @@ int amr_parse_mr_conf(struct amr_multirate_conf *amr_mrc, for (i = 0; i < 8; i++) { if (mr_conf[1] & (1 << i)) { - amr_mrc->mode[j++].mode = i; + amr_mrc->bts_mode[j++].mode = i; } } if (num_codecs >= 2) { - amr_mrc->mode[0].threshold_bts = mr_conf[1] & 0x3F; - amr_mrc->mode[0].hysteresis_bts = mr_conf[2] >> 4; + amr_mrc->bts_mode[0].threshold = mr_conf[1] & 0x3F; + amr_mrc->bts_mode[0].hysteresis = mr_conf[2] >> 4; } if (num_codecs >= 3) { - amr_mrc->mode[1].threshold_bts = + amr_mrc->bts_mode[1].threshold = ((mr_conf[2] & 0xF) << 2) | (mr_conf[3] >> 6); - amr_mrc->mode[1].hysteresis_bts = (mr_conf[3] >> 2) & 0xF; + amr_mrc->bts_mode[1].hysteresis = (mr_conf[3] >> 2) & 0xF; } if (num_codecs >= 4) { - amr_mrc->mode[2].threshold_bts = + amr_mrc->bts_mode[2].threshold = ((mr_conf[3] & 0x3) << 4) | (mr_conf[4] >> 4); - amr_mrc->mode[2].hysteresis_bts = mr_conf[4] & 0xF; + amr_mrc->bts_mode[2].hysteresis = mr_conf[4] & 0xF; } return num_codecs; diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index 7cf49e3c..1ab36d0c 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -313,7 +313,7 @@ int get_amr_mode_idx(const struct amr_multirate_conf *amr_mrc, uint8_t cmi) { unsigned int i; for (i = 0; i < amr_mrc->num_modes; i++) { - if (amr_mrc->mode[i].mode == cmi) + if (amr_mrc->bts_mode[i].mode == cmi) return i; } return -EINVAL; |