From d128791919b5a19d4bd12b63b0962b6196bb23a8 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 19 Apr 2023 11:11:36 +0200 Subject: [PATCH] abis_rsl: fix encoding RSL_IE_IPAC_RTP_CSD_FORMAT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/osmo-bsc/abis_rsl.c | 14 +++++++------- 1 file 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;