From 37bd20a2795d6c69059b1bd587a2f6e9321788bb Mon Sep 17 00:00:00 2001 From: WojciechX Wittbrodt Date: Wed, 5 Jun 2019 11:50:29 +0200 Subject: [PATCH] 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 852c326ce..8ffc00e2a 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 000000000..9099eb91e --- /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