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 <wojciechx.wittbrodt@linux.intel.com>
This commit is contained in:
WojciechX Wittbrodt 2019-06-05 11:50:29 +02:00 committed by Liam Girdwood
parent 4d956d5eee
commit 37bd20a279
2 changed files with 23 additions and 11 deletions

View File

@ -18,6 +18,7 @@
#include <sof/audio/component.h>
#include <sof/audio/pipeline.h>
#include <sof/audio/format.h>
#include <user/selector.h>
/** \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 */

View File

@ -0,0 +1,22 @@
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2019 Intel Corporation. All rights reserved.
*
* Author: Lech Betlej <lech.betlej@linux.intel.com>
*/
#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