Channel map parsing, stream conversion, and audio sample saturation routines.
More...
|
| static uint32_t | chmap_get_size (struct sof_ipc_channel_map *chmap) |
| | Returns the size of an IPC channel map structure in bytes.
|
| |
| struct sof_ipc_channel_map * | chmap_get (struct sof_ipc_stream_map *smap, int index) |
| | Returns a channel map for a given channel index in a stream map.
|
| |
| static int32_t | sat_int32 (int64_t x) |
| | Saturate a 64-bit integer to signed 32-bit integer range.
|
| |
| static int32_t | sat_int24 (int32_t x) |
| | Saturate a 32-bit integer to signed 24-bit integer range.
|
| |
| static int16_t | sat_int16 (int32_t x) |
| | Saturate a 32-bit integer to signed 16-bit integer range.
|
| |
| static int8_t | sat_int8 (int32_t x) |
| | Saturate a 32-bit integer to signed 8-bit integer range.
|
| |
Channel map parsing, stream conversion, and audio sample saturation routines.
◆ chmap_get()
Returns a channel map for a given channel index in a stream map.
- Parameters
-
| [in] | smap | Pointer to the stream map structure. |
| [in] | index | Channel index. |
- Returns
- Pointer to matching channel map structure, or NULL if not found.
◆ chmap_get_size()
Returns the size of an IPC channel map structure in bytes.
- Parameters
-
| [in] | chmap | Pointer to the channel map structure. |
- Returns
- Total size in bytes including dynamic channel coefficients.
◆ sat_int16()
| static int16_t sat_int16 |
( |
int32_t |
x | ) |
|
|
inlinestatic |
Saturate a 32-bit integer to signed 16-bit integer range.
- Parameters
-
| [in] | x | Input 32-bit integer. |
- Returns
- Saturated 16-bit integer clamped between INT16_MIN and INT16_MAX.
◆ sat_int24()
| static int32_t sat_int24 |
( |
int32_t |
x | ) |
|
|
inlinestatic |
Saturate a 32-bit integer to signed 24-bit integer range.
- Parameters
-
| [in] | x | Input 32-bit integer. |
- Returns
- Saturated 24-bit integer clamped between INT24_MINVALUE and INT24_MAXVALUE.
◆ sat_int32()
| static int32_t sat_int32 |
( |
int64_t |
x | ) |
|
|
inlinestatic |
Saturate a 64-bit integer to signed 32-bit integer range.
- Parameters
-
| [in] | x | Input 64-bit integer. |
- Returns
- Saturated 32-bit integer clamped between INT32_MIN and INT32_MAX.
◆ sat_int8()
| static int8_t sat_int8 |
( |
int32_t |
x | ) |
|
|
inlinestatic |
Saturate a 32-bit integer to signed 8-bit integer range.
- Parameters
-
| [in] | x | Input 32-bit integer. |
- Returns
- Saturated 8-bit integer clamped between INT8_MIN and INT8_MAX.