From f3589715c984f294b19a560ae7abd04fd4857170 Mon Sep 17 00:00:00 2001 From: WojciechX Wittbrodt Date: Wed, 5 Jun 2019 11:50:29 +0200 Subject: [PATCH 1/2] include: user: selector: Move selector configuration structure Move selector configuration structure to user header folder to expose it to users such as applications/tools. The configuration structure is needed to create a binary blob that allows to control the component. Signed-off-by: WojciechX Wittbrodt --- src/include/sof/audio/selector.h | 12 +----------- src/include/user/selector.h | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 src/include/user/selector.h diff --git a/src/include/sof/audio/selector.h b/src/include/sof/audio/selector.h index 852c326ce0f3..8ffc00e2a50e 100644 --- a/src/include/sof/audio/selector.h +++ b/src/include/sof/audio/selector.h @@ -18,6 +18,7 @@ #include #include #include +#include /** \brief Selector trace function. */ #define trace_selector(__e, ...) \ @@ -40,17 +41,6 @@ #define SEL_SINK_2CH 2 #define SEL_SINK_4CH 4 -/** \brief Selector component configuration data. */ -struct sof_sel_config { - /* selector supports 1 input and 1 output */ - uint32_t in_channels_count; /**< accepted values 2 or 4 */ - uint32_t out_channels_count; /**< accepted values 1 or 2 or 4 */ - /* note: if 2 or 4 output channels selected the component works in - * a passthrough mode - */ - uint32_t sel_channel; /**< 0..3 */ -}; - /** \brief Selector component private data. */ struct comp_data { uint32_t source_period_bytes; /**< source number of period bytes */ diff --git a/src/include/user/selector.h b/src/include/user/selector.h new file mode 100644 index 000000000000..9099eb91e619 --- /dev/null +++ b/src/include/user/selector.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * + * Copyright(c) 2019 Intel Corporation. All rights reserved. + * + * Author: Lech Betlej + */ + +#ifndef __INCLUDE_USER_SELECTOR_H__ +#define __INCLUDE_USER_SELECTOR_H__ + +/** \brief Selector component configuration data. */ +struct sof_sel_config { + /* selector supports 1 input and 1 output */ + uint32_t in_channels_count; /**< accepted values 2 or 4 */ + uint32_t out_channels_count; /**< accepted values 1 or 2 or 4 */ + /* note: if 2 or 4 output channels selected the component works in + * a passthrough mode + */ + uint32_t sel_channel; /**< 0..3 */ +}; + +#endif From 3e7c44046ed202257e2ab7d1d24be88f3a7daa94 Mon Sep 17 00:00:00 2001 From: WojciechX Wittbrodt Date: Wed, 5 Jun 2019 11:51:37 +0200 Subject: [PATCH 2/2] include: user: kpb: Move kpb configuration structure Move kpb configuration structure to user header folder to expose it to users such as applications/tools. The configuration structure is needed to create a binary blob that allows to control the component. Signed-off-by: WojciechX Wittbrodt --- src/include/sof/audio/kpb.h | 11 +---------- src/include/user/kpb.h | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 src/include/user/kpb.h diff --git a/src/include/sof/audio/kpb.h b/src/include/sof/audio/kpb.h index 7b1e2f1a2226..5686fcd8198e 100644 --- a/src/include/sof/audio/kpb.h +++ b/src/include/sof/audio/kpb.h @@ -12,6 +12,7 @@ #include #include #include +#include /* KPB tracing */ #define trace_kpb(__e, ...) trace_event(TRACE_CLASS_KPB, __e, ##__VA_ARGS__) @@ -97,16 +98,6 @@ struct dd { enum kpb_state *state; }; -/** \brief kpb component configuration data. */ -struct sof_kpb_config { - uint32_t size; /**< kpb size in bytes */ - uint32_t caps; /**< SOF_MEM_CAPS_ */ - uint32_t no_channels; /**< no of channels */ - uint32_t history_depth; /**< time of buffering in milliseconds */ - uint32_t sampling_freq; /**< frequency in hertz */ - uint32_t sampling_width; /**< number of bits */ -}; - #ifdef UNIT_TEST void sys_comp_kpb_init(void); #endif diff --git a/src/include/user/kpb.h b/src/include/user/kpb.h new file mode 100644 index 000000000000..8de2a83cf85b --- /dev/null +++ b/src/include/user/kpb.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * + * Copyright(c) 2019 Intel Corporation. All rights reserved. + * + * Author: Marcin Rajwa + */ + +#ifndef __INCLUDE_USER_KPB_H__ +#define __INCLUDE_USER_KPB_H__ + +/** \brief kpb component configuration data. */ +struct sof_kpb_config { + uint32_t size; /**< kpb size in bytes */ + uint32_t caps; /**< SOF_MEM_CAPS_ */ + uint32_t no_channels; /**< no of channels */ + uint32_t history_depth; /**< time of buffering in milliseconds */ + uint32_t sampling_freq; /**< frequency in hertz */ + uint32_t sampling_width; /**< number of bits */ +}; + +#endif