Change in osmo-bsc[master]: gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc()
Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11058 ) Change subject: gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc() .. gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc() At the moment we do not initalize the struct members mr_full and mr_half in struct gsm_bts. The user still has the option to configure reasonable values via vty, but when not VTY configuration is made, the flags for the AMR rates will be all zero. Lets initalize the struct members with reasonable defaults. - Make sure gsm_bts_alloc() populates fr_half and fr_full with reasonable defaults. Change-Id: I68747ae6dd2582e2a7d60337d9f2c43bd06ac525 Related: OS#3548 --- M src/osmo-bsc/gsm_data.c 1 file changed, 28 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 0718e91..8d0b831 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -774,6 +774,7 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, uint8_t bts_num) { struct gsm_bts *bts = talloc_zero(net, struct gsm_bts); + struct gsm48_multi_rate_conf mr_cfg; int i; if (!bts) @@ -885,6 +886,33 @@ .amr = 1, }; + /* Set reasonable defaults for AMR-FR and AMR-HR rate configuration. +* It is possible to set up to 4 codecs per active set, while 5,15K must +* be selected. */ + mr_cfg = (struct gsm48_multi_rate_conf) { + .m4_75 = 0, + .m5_15 = 1, + .m5_90 = 1, + .m6_70 = 0, + .m7_40 = 0, + .m7_95 = 0, + .m10_2 = 1, + .m12_2 = 1 + }; + memcpy(bts->mr_full.gsm48_ie, _cfg, sizeof(bts->mr_full.gsm48_ie)); + + mr_cfg = (struct gsm48_multi_rate_conf) { + .m4_75 = 0, + .m5_15 = 1, + .m5_90 = 1, + .m6_70 = 0, + .m7_40 = 1, + .m7_95 = 1, + .m10_2 = 0, + .m12_2 = 0 + }; + memcpy(bts->mr_half.gsm48_ie, _cfg, sizeof(bts->mr_half.gsm48_ie)); + return bts; } -- To view, visit https://gerrit.osmocom.org/11058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I68747ae6dd2582e2a7d60337d9f2c43bd06ac525 Gerrit-Change-Number: 11058 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102)
Change in osmo-bsc[master]: gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc()
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/11058 ) Change subject: gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc() .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/11058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I68747ae6dd2582e2a7d60337d9f2c43bd06ac525 Gerrit-Change-Number: 11058 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Comment-Date: Mon, 24 Sep 2018 11:10:23 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-bsc[master]: gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc()
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/11058 to look at the new patch set (#3). Change subject: gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc() .. gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc() At the moment we do not initalize the struct members mr_full and mr_half in struct gsm_bts. The user still has the option to configure reasonable values via vty, but when not VTY configuration is made, the flags for the AMR rates will be all zero. Lets initalize the struct members with reasonable defaults. - Make sure gsm_bts_alloc() populates fr_half and fr_full with reasonable defaults. Change-Id: I68747ae6dd2582e2a7d60337d9f2c43bd06ac525 Related: OS#3548 --- M src/osmo-bsc/gsm_data.c 1 file changed, 28 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/58/11058/3 -- To view, visit https://gerrit.osmocom.org/11058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I68747ae6dd2582e2a7d60337d9f2c43bd06ac525 Gerrit-Change-Number: 11058 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder (102)
Change in osmo-bsc[master]: gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc()
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/11058 Change subject: gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc() .. gsm_data.c: Set reasonable AMR codec defaults in gsm_bts_alloc() At the moment we do not initalize the struct members mr_full and mr_half in struct gsm_bts. The user still has the option to configure reasonable values via vty, but when not VTY configuration is made, the flags for the AMR rates will be all zero. Lets initalize the struct members with reasonable defaults. - Make sure gsm_bts_alloc() populates fr_half and fr_full with reasonable defaults. Change-Id: I68747ae6dd2582e2a7d60337d9f2c43bd06ac525 Related: OS#3548 --- M src/osmo-bsc/gsm_data.c 1 file changed, 28 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/58/11058/1 diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 0718e91..6b4e5a7 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -774,6 +774,7 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, uint8_t bts_num) { struct gsm_bts *bts = talloc_zero(net, struct gsm_bts); + struct gsm48_multi_rate_conf mr_cfg; int i; if (!bts) @@ -885,6 +886,33 @@ .amr = 1, }; + /* Set reasonable defaults for AMR-FR and AMR-HR rate configuration. + * See also: 3GPP TS 28.062, Table 7.11.3.1.3-2: Preferred Configurations for + * the Adaptive Multi-Rate Codec Types. */ + mr_cfg = (struct gsm48_multi_rate_conf) { + .m4_75 = 1, + .m5_15 = 1, + .m5_90 = 1, + .m6_70 = 1, + .m7_40 = 1, + .m7_95 = 1, + .m10_2 = 1, + .m12_2 = 1 + }; + memcpy(bts->mr_full.gsm48_ie, _cfg, sizeof(bts->mr_full.gsm48_ie)); + + mr_cfg = (struct gsm48_multi_rate_conf) { + .m4_75 = 1, + .m5_15 = 1, + .m5_90 = 1, + .m6_70 = 1, + .m7_40 = 1, + .m7_95 = 1, + .m10_2 = 0, + .m12_2 = 0 + }; + memcpy(bts->mr_half.gsm48_ie, _cfg, sizeof(bts->mr_half.gsm48_ie)); + return bts; } -- To view, visit https://gerrit.osmocom.org/11058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I68747ae6dd2582e2a7d60337d9f2c43bd06ac525 Gerrit-Change-Number: 11058 Gerrit-PatchSet: 1 Gerrit-Owner: dexter