linux/include/sound/sof/topology.h

/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
/*
 * This file is provided under a dual BSD/GPLv2 license.  When using or
 * redistributing this file, you may do so under either license.
 *
 * Copyright(c) 2018 Intel Corporation
 */

#ifndef __INCLUDE_SOUND_SOF_TOPOLOGY_H__
#define __INCLUDE_SOUND_SOF_TOPOLOGY_H__

#include <sound/sof/header.h>

/*
 * Component
 */

/* types of component */
enum sof_comp_type {};

/* XRUN action for component */
#define SOF_XRUN_STOP
#define SOF_XRUN_UNDER_ZERO
#define SOF_XRUN_OVER_NULL

/* create new generic component - SOF_IPC_TPLG_COMP_NEW */
struct sof_ipc_comp {} __packed __aligned();

/*
 * Component Buffers
 */

/*
 * SOF memory capabilities, add new ones at the end
 */
#define SOF_MEM_CAPS_RAM
#define SOF_MEM_CAPS_ROM
#define SOF_MEM_CAPS_EXT
#define SOF_MEM_CAPS_LP
#define SOF_MEM_CAPS_HP
#define SOF_MEM_CAPS_DMA
#define SOF_MEM_CAPS_CACHE
#define SOF_MEM_CAPS_EXEC
#define SOF_MEM_CAPS_L3

/*
 * overrun will cause ring buffer overwrite, instead of XRUN.
 */
#define SOF_BUF_OVERRUN_PERMITTED

/*
 * underrun will cause readback of 0s, instead of XRUN.
 */
#define SOF_BUF_UNDERRUN_PERMITTED

/* the UUID size in bytes, shared between FW and host */
#define SOF_UUID_SIZE

/* create new component buffer - SOF_IPC_TPLG_BUFFER_NEW */
struct sof_ipc_buffer {} __packed __aligned();

/* generic component config data - must always be after struct sof_ipc_comp */
struct sof_ipc_comp_config {} __packed __aligned();

/* generic host component */
struct sof_ipc_comp_host {} __packed __aligned();

/* generic DAI component */
struct sof_ipc_comp_dai {} __packed __aligned();

/* generic mixer component */
struct sof_ipc_comp_mixer {} __packed __aligned();

/* volume ramping types */
enum sof_volume_ramp {};

/* generic volume component */
struct sof_ipc_comp_volume {} __packed __aligned();

/* generic SRC component */
struct sof_ipc_comp_src {} __packed __aligned();

/* generic ASRC component */
struct sof_ipc_comp_asrc {} __packed __aligned();

/* generic MUX component */
struct sof_ipc_comp_mux {} __packed __aligned();

/* generic tone generator component */
struct sof_ipc_comp_tone {} __packed __aligned();

/** \brief Types of processing components */
enum sof_ipc_process_type {};

/* generic "effect", "codec" or proprietary processing component */
struct sof_ipc_comp_process {} __packed __aligned();

/* frees components, buffers and pipelines
 * SOF_IPC_TPLG_COMP_FREE, SOF_IPC_TPLG_PIPE_FREE, SOF_IPC_TPLG_BUFFER_FREE
 */
struct sof_ipc_free {} __packed __aligned();

struct sof_ipc_comp_reply {} __packed __aligned();

/*
 * Pipeline
 */

/** \brief Types of pipeline scheduling time domains */
enum sof_ipc_pipe_sched_time_domain {};

/* new pipeline - SOF_IPC_TPLG_PIPE_NEW */
struct sof_ipc_pipe_new {} __packed __aligned();

/* pipeline construction complete - SOF_IPC_TPLG_PIPE_COMPLETE */
struct sof_ipc_pipe_ready {} __packed __aligned();

struct sof_ipc_pipe_free {} __packed __aligned();

/* connect two components in pipeline - SOF_IPC_TPLG_COMP_CONNECT */
struct sof_ipc_pipe_comp_connect {} __packed __aligned();

/* external events */
enum sof_event_types {};

#endif