diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2018-09-14 16:58:55 +0200 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2018-09-14 20:05:02 +0200 |
commit | f96c04a19801ced59543be44bce6f2f5e27e5153 (patch) | |
tree | d7d632ec183f81fe3d12f35256f40a1e7709a862 /tests | |
parent | 5a87137aadbc8776b365ab21683c16985ac1d20e (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/codec_pref/codec_pref_test.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |