aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2023-04-19 11:11:36 +0200
committerOliver Smith <osmith@sysmocom.de>2023-04-19 11:16:02 +0200
commitd128791919b5a19d4bd12b63b0962b6196bb23a8 (patch)
treee339a18acc0a99fe35c8e446a693337ce4daddf1
parenta4cc4ef8eaffb2daa63f89b58b8680b9f6fe4547 (diff)
abis_rsl: fix encoding RSL_IE_IPAC_RTP_CSD_FORMAT
The A-bis/IP RTP CSD Format IR Values need to be shifted by 4 bits instead of 5. See OsmoBTS Abis Protocol Specification ยง 5.8.14 RSL_IE_IPAC_RTP_CSD_FORMAT. Related: https://ftp.osmocom.org/docs/osmo-bts/master/osmobts-abis.pdf Related: OS#4393 Change-Id: I9ce0b2d9b77eef61a6d4dce417efe4e853217dc5
-rw-r--r--src/osmo-bsc/abis_rsl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index dfe7da91d..637094205 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -2590,18 +2590,18 @@ int ipacc_rtp_csd_fmt_transp(const struct channel_mode_and_rate *ch_mode_rate,
switch (ch_mode_rate->data_rate.t) {
case RSL_CMOD_CSD_T_32k0:
case RSL_CMOD_CSD_T_29k0:
- ret |= RSL_IPAC_RTP_CSD_IR_32k << 5;
+ ret |= RSL_IPAC_RTP_CSD_IR_32k << 4;
break;
case RSL_CMOD_CSD_T_14k4:
case RSL_CMOD_CSD_T_9k6:
- ret |= RSL_IPAC_RTP_CSD_IR_16k << 5;
+ ret |= RSL_IPAC_RTP_CSD_IR_16k << 4;
break;
case RSL_CMOD_CSD_T_4k8:
case RSL_CMOD_CSD_T_2k4:
case RSL_CMOD_CSD_T_1k2:
case RSL_CMOD_CSD_T_600:
case RSL_CMOD_CSD_T_1200_75:
- ret |= RSL_IPAC_RTP_CSD_IR_8k << 5;
+ ret |= RSL_IPAC_RTP_CSD_IR_8k << 4;
break;
default:
return -EINVAL;
@@ -2622,19 +2622,19 @@ int ipacc_rtp_csd_fmt_non_transp(const struct channel_mode_and_rate *ch_mode_rat
case RSL_CMOD_CSD_NTA_14k5_43k5:
case RSL_CMOD_CSD_NTA_29k0_43k5:
case RSL_CMOD_CSD_NT_43k5:
- ret |= RSL_IPAC_RTP_CSD_IR_64k << 5;
+ ret |= RSL_IPAC_RTP_CSD_IR_64k << 4;
break;
case RSL_CMOD_CSD_NTA_29k0_14k5:
case RSL_CMOD_CSD_NTA_14k5_29k0:
case RSL_CMOD_CSD_NT_28k8:
- ret |= RSL_IPAC_RTP_CSD_IR_32k << 5;
+ ret |= RSL_IPAC_RTP_CSD_IR_32k << 4;
break;
case RSL_CMOD_CSD_NT_14k5:
case RSL_CMOD_CSD_NT_12k0:
- ret |= RSL_IPAC_RTP_CSD_IR_16k << 5;
+ ret |= RSL_IPAC_RTP_CSD_IR_16k << 4;
break;
case RSL_CMOD_CSD_NT_6k0:
- ret |= RSL_IPAC_RTP_CSD_IR_8k << 5;
+ ret |= RSL_IPAC_RTP_CSD_IR_8k << 4;
break;
default:
return -EINVAL;