14#ifndef __SOF_AUDIO_SELECTOR_H__
15#define __SOF_AUDIO_SELECTOR_H__
18#include <sof/trace/trace.h>
21#include <ipc4/base-config.h>
31#define SEL_COEF_ONE_Q10 1024
35#define SEL_SOURCE_1CH 1
36#define SEL_SOURCE_2CH 2
37#define SEL_SOURCE_4CH 4
45#define SEL_SOURCE_CHANNELS_MAX 8
48#define SEL_SINK_CHANNELS_MAX 8
51#define SEL_MAX_NUM_CONFIGS 8
53#define SEL_NUM_IN_PIN_FMTS 1
54#define SEL_NUM_OUT_PIN_FMTS 1
60typedef void (*
sel_func)(
struct processing_module *mod,
struct input_stream_buffer *bsource,
61 struct output_stream_buffer *bsink, uint32_t frames);
64enum ipc4_selector_config_id {
65 IPC4_SELECTOR_COEFFS_CONFIG_ID = 0,
69struct ipc4_selector_coeffs_config {
70 uint8_t source_channels_count;
71 uint8_t sink_channels_count;
72 uint8_t source_channel_config;
73 uint8_t sink_channel_config;
79enum ipc4_selector_init_payload_fmt {
80 IPC4_SEL_INIT_PAYLOAD_BASE_WITH_EXT,
81 IPC4_SEL_INIT_PAYLOAD_BASE_WITH_OUT_FMT,
84struct sof_selector_ipc4_pin_config {
85 struct ipc4_input_pin_format in_pin;
86 struct ipc4_output_pin_format out_pin;
93struct sof_selector_ipc4_config {
100 struct sof_selector_ipc4_pin_config pin_cfg;
101 struct ipc4_audio_format output_format;
103 enum ipc4_selector_init_payload_fmt init_payload_fmt;
106struct sof_selector_avs_ipc4_config {
107 struct ipc4_base_module_cfg base_cfg;
108 struct ipc4_audio_format output_format;
118#if CONFIG_IPC_MAJOR_4
119 struct sof_selector_ipc4_config sel_ipc4_cfg;
120 struct ipc4_selector_coeffs_config coeffs_config;
121 struct ipc4_selector_coeffs_config *multi_coeffs_config;
122 size_t multi_coeffs_config_size;
146#if CONFIG_IPC_MAJOR_4
154void sys_comp_module_selector_interface_init(
void);
164void sys_comp_selector_init(
void);
IPC definitions for streams.
sel_func sel_get_processing_function(struct comp_dev *dev)
Retrieves selector processing function.
#define SEL_SOURCE_CHANNELS_MAX
Maximum supported channel count on input.
Definition selector.h:45
#define SEL_SINK_CHANNELS_MAX
Maximum supported channel count on output.
Definition selector.h:48
const struct comp_func_map func_map[]
Map of formats with dedicated processing functions.
void(* sel_func)(struct comp_dev *dev, struct audio_stream *sink, const struct audio_stream *source, uint32_t frames)
Definition selector.h:112
Audio stream is a circular buffer aware of audio format of the data in the buffer so provides API for...
Definition audio_stream.h:52
Selector component private data.
Definition igo_nr_comp.h:21
struct sof_igo_nr_config config
blob data buffer
Definition igo_nr_comp.h:41
uint32_t source_period_bytes
source number of period bytes
Definition selector.h:125
uint32_t source_format
source frame format
Definition igo_nr_comp.h:36
bool new_config
True if new configuration has been received.
Definition selector.h:133
int num_configs
Number of coefficients sets in configuration blob.
Definition selector.h:131
bool passthrough
Use a passthrough copy function when no up/down mix.
Definition selector.h:132
uint32_t sink_format
sink frame format
Definition igo_nr_comp.h:35
sel_func sel_func
channel selector processing function
Definition selector.h:130
uint32_t sink_period_bytes
sink number of period bytes
Definition selector.h:126
Audio component base device "class".
Definition component.h:645
Selector processing functions map.
Definition selector.h:137
sel_func sel_func
selector processing function
Definition selector.h:140
uint16_t source
source frame format
Definition selector.h:138
uint32_t out_channels
number of output stream channels
Definition selector.h:139
Selector component configuration data.
Definition selector.h:14