blob: f048a6e3bc7f5f93694476d7d84fed77173d1814 [file] [log] [blame]
Philipp Maier898c9c62020-02-06 14:25:01 +01001/*! \file gsm0503_amr_dtx.h
2 * GSM TS 05.03 coding
3 */
4
5#pragma once
6
7#include <stdint.h>
8
9#include <osmocom/core/defs.h>
10#include <osmocom/core/bits.h>
11
12/*! \addtogroup coding
13 * @{
14 * \file gsm0503_amr_dtx.h */
15
16enum gsm0503_amr_dtx_frames {
17 AMR_OTHER,
18 AFS_SID_FIRST,
19 AFS_SID_UPDATE,
20 AFS_SID_UPDATE_CN,
21 AFS_ONSET,
22 AHS_SID_UPDATE,
23 AHS_SID_UPDATE_CN,
24 AHS_SID_FIRST_P1,
25 AHS_SID_FIRST_P2,
26 AHS_ONSET,
27 AHS_SID_FIRST_INH,
28 AHS_SID_UPDATE_INH,
29};
30
31extern const struct value_string gsm0503_amr_dtx_frame_names[];
32static inline const char *gsm0503_amr_dtx_frame_name(enum gsm0503_amr_dtx_frames frame)
33{
34 return get_value_string(gsm0503_amr_dtx_frame_names, frame);
35}
36
37enum gsm0503_amr_dtx_frames gsm0503_detect_afs_dtx_frame(int *n_errors, int *n_bits_total, const ubit_t *ubits);
38enum gsm0503_amr_dtx_frames gsm0503_detect_ahs_dtx_frame(int *n_errors, int *n_bits_total, const ubit_t *ubits);
39
40/*! @} */