forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchannel_map.h
More file actions
62 lines (57 loc) · 1.99 KB
/
channel_map.h
File metadata and controls
62 lines (57 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2019 Intel Corporation. All rights reserved.
*
* Author: Marcin Maka <marcin.maka@linux.intel.com>
* Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
*/
#ifndef __IPC_CHANNEL_MAP_H__
#define __IPC_CHANNEL_MAP_H__
#include <ipc/header.h>
#include <sof/compiler_attributes.h>
#include <stdint.h>
/**
* \brief Channel map, specifies transformation of one-to-many or many-to-one.
*
* In case of one-to-many specifies how the output channels are computed out of
* a single source channel,
* in case of many-to-one specifies how a single target channel is computed
* from a multichannel input stream.
*
* Channel index specifies position of the channel in the stream on the 'one'
* side.
*
* Ext ID is the identifier of external part of the transformation. Depending
* on the context, it may be pipeline ID, dai ID, ...
*
* Channel mask describes which channels are taken into account on the "many"
* side. Bit[i] set to 1 means that i-th channel is used for computation
* (either as source or as a target).
*
* Channel mask is followed by array of coefficients in Q2.30 format,
* one per each channel set in the mask (left to right, LS bit set in the
* mask corresponds to ch_coeffs[0]).
*/
struct sof_ipc_channel_map {
uint32_t ch_index;
uint32_t ext_id;
uint32_t ch_mask;
uint32_t reserved;
int32_t ch_coeffs[];
} __attribute__((packed, aligned(4)));
/**
* \brief Complete map for each channel of a multichannel stream.
*
* num_ch_map Specifies number of items in the ch_map.
* More than one transformation per a single channel is allowed (in case
* multiple external entities are transformed).
* A channel may be skipped in the transformation list, then it is filled
* with 0's by the transformation function.
*/
struct sof_ipc_stream_map {
struct sof_ipc_cmd_hdr hdr;
uint32_t num_ch_map;
uint32_t reserved[3];
struct sof_ipc_channel_map ch_map[];
} __attribute__((packed, aligned(4)));
#endif /* __IPC_CHANNEL_MAP_H__ */