From 884ba0f2bcaf385cabee0b4228a2598d61fa406b Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 2 Jun 2017 13:49:16 +0200 Subject: gsm0808: add function gsm0808_speech_codec_from_chan_type() The contents of the speech codec element (struct gsm0808_speech_codec), that is also used in the speech codec list element (struct gsm0808_speech_codec_list) can be generated directly from the permitted speech parameter in the channel type field (struct gsm0808_channel_type) when full AoIP with compressed speech via RTP/UDP/IP is assumed and when the codec configuration on the air interface exactly matches the codec configuration on the IP backhaul. This patch adds a function that can be used as a helper to fill out spech codec fields by only giving a permitted speech parameter as input. Change-Id: I257c972e9fdf0dfe940a8d483447085bd62e50a2 --- include/osmocom/gsm/gsm0808_utils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index b5106447..cb53e0c0 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -73,3 +73,5 @@ int gsm0808_dec_cell_id_list(struct gsm0808_cell_id_list *cil, const uint8_t *elem, uint8_t len); int gsm0808_chan_type_to_speech_code(uint8_t perm_spch); +int gsm0808_speech_codec_from_chan_type(struct gsm0808_speech_codec *sc, + uint8_t perm_spch); -- cgit v1.2.3