ran_a_channel_type_to_speech_codec_list(): set PI/PT for CSD

As per 3GPP TS 48.008, section 3.2.2.103, the Codec Type is valid if
at least one of FI, PI or PT is set to '1'.  Otherwise the Speech
Codec Element is considered invalid and shall be ignored.

Change-Id: Ibc452d37d4215c961a7946eef3ba2e7efdba078b
Related: OS#6110, OS#4394
This commit is contained in:
Vadim Yanitskiy 2023-07-25 04:57:31 +07:00
parent 9d69655729
commit cc8743c05b
1 changed files with 6 additions and 1 deletions

View File

@ -1349,7 +1349,12 @@ static int ran_a_channel_type_to_speech_codec_list(struct gsm0808_speech_codec_l
switch (ct->ch_indctr) {
case GSM0808_CHAN_DATA:
scl->codec[0].type = GSM0808_SCT_CSD;
scl->codec[0] = (struct gsm0808_speech_codec) {
.pi = true, /* PI indicates CSDoIP is supported */
.pt = false, /* PT indicates CSDoTDM is not supported */
.type = GSM0808_SCT_CSD,
.cfg = 0, /* R2/R3 not set (redundancy not supported) */
};
scl->len = 1;
break;
case GSM0808_CHAN_SPEECH: