view src/condat/com/include/cl_user_spver.h @ 301:4bb5772a05a3

AT%SPVER: new command for setting custom speech version lists The speech version list in the Bearer Capability IE tells the network which speech codecs are supported by the MS, and in which order of preference. The standard behaviour is to list all codecs that are supported by the hw+fw platform, and the standard preference order is newer over older, FR over HR. But sometimes it is desirable (for network testing) to artificially restrict which codecs the test MS will declare as supported, and/or to list them in some peculiar non-standard order of preference. Add a new private AT command, AT%SPVER, allowing the user to set and clear custom speech version lists for the Bearer Capability IE composer in CC.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 May 2023 21:43:10 +0000
parents
children
line wrap: on
line source

/*
 * This header file is a FreeCalypso addition; it is part of the mechanism
 * for setting a user-defined list of accepted speech versions in the Bearer
 * Capability IE for speech calls, with a user-defined order of preference,
 * overriding the standard SV list based on hw+fw platform capabilities
 * and the standard order of preference.
 */

#ifndef CL_USER_SPVER_H
#define CL_USER_SPVER_H

/*
 * This function sets (establishes for use) a user-defined SV list.
 * The input is an array of 5 bytes, giving the list of speech versions
 * in the user-preferred order; if fewer than all 5 possible SVs are listed,
 * the remaining array elements shall be filled with 0xFF.  At least FRv1
 * (GSM full rate speech version 1) must always be included in the list;
 * a corollary of this requirement is that an empty list is not a valid input.
 */
extern UBYTE cl_user_spver_set(const UBYTE *spver_list);

/* cl_user_spver_set() return codes */
#define	CL_USER_SPVER_SET_OK		0
#define	CL_USER_SPVER_SET_ERROR		1

/*
 * This function resets (clears) the user-defined SV list, returning to
 * standard operation of accepting all speech versions supported by the
 * platform with the standard order of preference.
 */
extern void cl_user_spver_reset(void);

/*
 * This function checks to see if a user-defined speech version list is set.
 * If no such list is set, the function returns CL_USER_SPVER_IS_NOT_SET
 * and leaves *spver_list and *rad_chan_req untouched.  If a user-defined
 * SV list is set, the function returns CL_USER_SPVER_IS_SET, writes the list
 * into the *spver_list output array (all 5 bytes are always written,
 * with 0xFF padding as needed), and writes the corresponding radio channel
 * requirement code into *rad_chan_req.
 */
extern UBYTE cl_user_spver_get(UBYTE *spver_list, UBYTE *rad_chan_req);

/* cl_user_spver_get() return codes */
#define	CL_USER_SPVER_IS_NOT_SET	0
#define	CL_USER_SPVER_IS_SET		1

#endif	/* include guard */