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
8#ifndef __SOF_AUDIO_CHANNEL_MAP_H__
9#define __SOF_AUDIO_CHANNEL_MAP_H__
10
11#include <ipc/channel_map.h>
12#include <sof/common.h>
13#include <stdint.h>
14
15/* Returns the size of a channel map in bytes */
16static inline uint32_t chmap_get_size(struct sof_ipc_channel_map *chmap)
17{
18 return sizeof(*chmap) + (popcount(chmap->ch_mask) *
19 sizeof(*chmap->ch_coeffs));
20}
21
22/* Returns a channel map valid for a given index in a given stream map */
24 int index);
25
26#endif /* __SOF_AUDIO_CHANNEL_MAP_H__ */
#define popcount(x)
Definition common.h:141
static uint32_t chmap_get_size(struct sof_ipc_channel_map *chmap)
Definition channel_map.h:16
struct sof_ipc_channel_map * chmap_get(struct sof_ipc_stream_map *smap, int index)
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