From f96c04a19801ced59543be44bce6f2f5e27e5153 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 14 Sep 2018 16:58:55 +0200 Subject: 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 --- tests/codec_pref/codec_pref_test.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/codec_pref/codec_pref_test.c b/tests/codec_pref/codec_pref_test.c index b0b9f5e95..efc77f645 100644 --- a/tests/codec_pref/codec_pref_test.c +++ b/tests/codec_pref/codec_pref_test.c @@ -78,11 +78,13 @@ static void make_scl_config(struct gsm0808_speech_codec_list *scl, uint8_t confi 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 @@ static void make_scl_config(struct gsm0808_speech_codec_list *scl, uint8_t confi /* 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 @@ static void make_scl_config(struct gsm0808_speech_codec_list *scl, uint8_t confi 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; } -- cgit v1.2.3