linux/include/sound/sof/dai.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_DAI_H__
#define __INCLUDE_SOUND_SOF_DAI_H__

#include <sound/sof/header.h>
#include <sound/sof/dai-intel.h>
#include <sound/sof/dai-imx.h>
#include <sound/sof/dai-amd.h>
#include <sound/sof/dai-mediatek.h>

/*
 * DAI Configuration.
 *
 * Each different DAI type will have it's own structure and IPC cmd.
 */

#define SOF_DAI_FMT_I2S
#define SOF_DAI_FMT_RIGHT_J
#define SOF_DAI_FMT_LEFT_J
#define SOF_DAI_FMT_DSP_A
#define SOF_DAI_FMT_DSP_B
#define SOF_DAI_FMT_PDM

#define SOF_DAI_FMT_CONT
#define SOF_DAI_FMT_GATED

#define SOF_DAI_FMT_NB_NF
#define SOF_DAI_FMT_NB_IF
#define SOF_DAI_FMT_IB_NF
#define SOF_DAI_FMT_IB_IF

#define SOF_DAI_FMT_CBP_CFP
#define SOF_DAI_FMT_CBC_CFP
#define SOF_DAI_FMT_CBP_CFC
#define SOF_DAI_FMT_CBC_CFC

/* keep old definitions for backwards compatibility */
#define SOF_DAI_FMT_CBM_CFM
#define SOF_DAI_FMT_CBS_CFM
#define SOF_DAI_FMT_CBM_CFS
#define SOF_DAI_FMT_CBS_CFS

#define SOF_DAI_FMT_FORMAT_MASK
#define SOF_DAI_FMT_CLOCK_MASK
#define SOF_DAI_FMT_INV_MASK
#define SOF_DAI_FMT_CLOCK_PROVIDER_MASK

/*
 * DAI_CONFIG flags. The 4 LSB bits are used for the commands, HW_PARAMS, HW_FREE and PAUSE
 * representing when the IPC is sent. The 4 MSB bits are used to add quirks along with the above
 * commands.
 */
#define SOF_DAI_CONFIG_FLAGS_CMD_MASK
#define SOF_DAI_CONFIG_FLAGS_NONE
#define SOF_DAI_CONFIG_FLAGS_HW_PARAMS
#define SOF_DAI_CONFIG_FLAGS_HW_FREE
/**< DAI_CONFIG sent during pause trigger. Only available ABI 3.20 onwards */
#define SOF_DAI_CONFIG_FLAGS_PAUSE
#define SOF_DAI_CONFIG_FLAGS_QUIRK_SHIFT
#define SOF_DAI_CONFIG_FLAGS_QUIRK_MASK
/*
 * This should be used along with the SOF_DAI_CONFIG_FLAGS_HW_PARAMS to indicate that pipeline
 * stop/pause and DAI DMA stop/pause should happen in two steps. This change is only available
 * ABI 3.20 onwards.
 */
#define SOF_DAI_CONFIG_FLAGS_2_STEP_STOP

/** \brief Types of DAI */
enum sof_ipc_dai_type {};

/* general purpose DAI configuration */
struct sof_ipc_dai_config {} __packed;

struct sof_dai_private_data {};

#endif