Change in osmo-bsc[master]: codec_pref: add AMR configuration bits to make_scl_config() in unit-test

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Sep 15 07:56:05 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10963 )

Change subject: codec_pref: add AMR configuration bits to make_scl_config() in unit-test
......................................................................

codec_pref: add AMR configuration bits to make_scl_config() in unit-test

The the function make_scl_config() is used to generate realistically
looking speech codec lists to perform the unit tests for codec_pref.c.
This function does not yet populate the S0-S15 bits for AMR codecs. Lets
make sure that at least the default configuration is populated here.

Change-Id: I534239416c038ea856c128659f314aa521f85c15
---
M tests/codec_pref/codec_pref_test.c
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/codec_pref/codec_pref_test.c b/tests/codec_pref/codec_pref_test.c
index b0b9f5e..efc77f6 100644
--- a/tests/codec_pref/codec_pref_test.c
+++ b/tests/codec_pref/codec_pref_test.c
@@ -78,11 +78,13 @@
 	case 3:
 		/* FR3 only */
 		scl->codec[0].type = GSM0808_SCT_FR3;
+		scl->codec[0].cfg = GSM0808_SC_CFG_DEFAULT_FR_AMR;
 		scl->len = 1;
 		break;
 	case 4:
 		/* HR3 only */
 		scl->codec[0].type = GSM0808_SCT_HR3;
+		scl->codec[0].cfg = GSM0808_SC_CFG_DEFAULT_HR_AMR;
 		scl->len = 1;
 		break;
 	case 5:
@@ -102,7 +104,9 @@
 		/* FR1, FR3 and HR3 */
 		scl->codec[0].type = GSM0808_SCT_FR1;
 		scl->codec[1].type = GSM0808_SCT_FR3;
+		scl->codec[1].cfg = GSM0808_SC_CFG_DEFAULT_FR_AMR;
 		scl->codec[2].type = GSM0808_SCT_HR3;
+		scl->codec[2].cfg = GSM0808_SC_CFG_DEFAULT_HR_AMR;
 		scl->len = 3;
 		break;
 	case 8:
@@ -110,8 +114,10 @@
 		scl->codec[0].type = GSM0808_SCT_FR1;
 		scl->codec[1].type = GSM0808_SCT_FR2;
 		scl->codec[2].type = GSM0808_SCT_FR3;
+		scl->codec[2].cfg = GSM0808_SC_CFG_DEFAULT_FR_AMR;
 		scl->codec[3].type = GSM0808_SCT_HR1;
 		scl->codec[4].type = GSM0808_SCT_HR3;
+		scl->codec[4].cfg = GSM0808_SC_CFG_DEFAULT_HR_AMR;
 		scl->len = 5;
 		break;
 	}

-- 
To view, visit https://gerrit.osmocom.org/10963
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: I534239416c038ea856c128659f314aa521f85c15
Gerrit-Change-Number: 10963
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180915/84e75346/attachment.htm>


More information about the gerrit-log mailing list