Sound Open Firmware
Loading...
Searching...
No Matches
channel_map.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2019 Intel Corporation. All rights reserved.
4 *
5 * Author: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
6 */
7
14#ifndef __SOF_AUDIO_CHANNEL_MAP_H__
15#define __SOF_AUDIO_CHANNEL_MAP_H__
16
17#include <ipc/channel_map.h>
18#include <sof/common.h>
19#include <stdint.h>
20
30static inline uint32_t chmap_get_size(struct sof_ipc_channel_map *chmap)
31{
32 return sizeof(*chmap) + (popcount(chmap->ch_mask) *
33 sizeof(*chmap->ch_coeffs));
34}
35
43 int index);
44
47#endif /* __SOF_AUDIO_CHANNEL_MAP_H__ */
#define popcount(x)
Definition common.h:139
static uint32_t chmap_get_size(struct sof_ipc_channel_map *chmap)
Returns the size of an IPC channel map structure in bytes.
Definition channel_map.h:30
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.
Channel map, specifies transformation of one-to-many or many-to-one.
Definition channel_map.h:38
int32_t ch_coeffs[]
Definition channel_map.h:43
uint32_t ch_mask
Definition channel_map.h:41
Complete map for each channel of a multichannel stream.
Definition channel_map.h:55