bearer_cap_set_radio() traverse all matches
It's a minor technicality, but it seems the newly added API to iterate the codec_mapping can slightly improve this implementation: For some reason, the Bearer Capabilities should reflect whether any HR codec is possible with its listed Speech Versions. So far we looked only whether the first match for a given Speech Version in the global const codec_mapping is a HR codec. Instead, look through *all* entries for a Speech Version, and see if any one of them indicates HR. For example, an AMR-FR codec with a well adjusted mode-set can work with a half rate channel. Change-Id: Ic964af4bec21598836748279f3fee480e470738c
This commit is contained in:
parent
3e4429af5e
commit
f091db0f20
|
@ -432,13 +432,13 @@ int bearer_cap_set_radio(struct gsm_mncc_bearer_cap *bearer_cap)
|
|||
if (bearer_cap->speech_ver[i] == -1)
|
||||
break;
|
||||
|
||||
m = codec_mapping_by_speech_ver(bearer_cap->speech_ver[i]);
|
||||
codec_mapping_foreach (m) {
|
||||
if (!codec_mapping_matches_speech_ver(m, bearer_cap->speech_ver[i]))
|
||||
continue;
|
||||
|
||||
if (!m)
|
||||
continue;
|
||||
|
||||
if (m->frhr == CODEC_FRHR_HR)
|
||||
hr_present = true;
|
||||
if (m->frhr == CODEC_FRHR_HR)
|
||||
hr_present = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (hr_present)
|
||||
|
|
Loading…
Reference in New Issue