linux/sound/soc/sti/uniperif.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) STMicroelectronics SA 2015
 * Authors: Arnaud Pouliquen <[email protected]>
 *          for STMicroelectronics.
 */

#ifndef __SND_ST_AUD_UNIPERIF_H
#define __SND_ST_AUD_UNIPERIF_H

#include <linux/regmap.h>

#include <sound/dmaengine_pcm.h>

/*
 * Register access macros
 */

#define GET_UNIPERIF_REG(ip, offset, shift, mask)
#define SET_UNIPERIF_REG(ip, offset, shift, mask, value)
#define SET_UNIPERIF_BIT_REG(ip, offset, shift, mask, value)

/*
 * UNIPERIF_SOFT_RST reg
 */

#define UNIPERIF_SOFT_RST_OFFSET(ip)
#define GET_UNIPERIF_SOFT_RST(ip)
#define SET_UNIPERIF_SOFT_RST(ip, value)

/* SOFT_RST */
#define UNIPERIF_SOFT_RST_SOFT_RST_SHIFT(ip)
#define UNIPERIF_SOFT_RST_SOFT_RST_MASK(ip)
#define SET_UNIPERIF_SOFT_RST_SOFT_RST(ip)
#define GET_UNIPERIF_SOFT_RST_SOFT_RST(ip)

/*
 * UNIPERIF_FIFO_DATA reg
 */

#define UNIPERIF_FIFO_DATA_OFFSET(ip)
#define SET_UNIPERIF_DATA(ip, value)

/*
 * UNIPERIF_CHANNEL_STA_REGN reg
 */

#define UNIPERIF_CHANNEL_STA_REGN(ip, n)
#define GET_UNIPERIF_CHANNEL_STA_REGN(ip)
#define SET_UNIPERIF_CHANNEL_STA_REGN(ip, n, value)

#define UNIPERIF_CHANNEL_STA_REG0_OFFSET(ip)
#define GET_UNIPERIF_CHANNEL_STA_REG0(ip)
#define SET_UNIPERIF_CHANNEL_STA_REG0(ip, value)

#define UNIPERIF_CHANNEL_STA_REG1_OFFSET(ip)
#define GET_UNIPERIF_CHANNEL_STA_REG1(ip)
#define SET_UNIPERIF_CHANNEL_STA_REG1(ip, value)

#define UNIPERIF_CHANNEL_STA_REG2_OFFSET(ip)
#define GET_UNIPERIF_CHANNEL_STA_REG2(ip)
#define SET_UNIPERIF_CHANNEL_STA_REG2(ip, value)

#define UNIPERIF_CHANNEL_STA_REG3_OFFSET(ip)
#define GET_UNIPERIF_CHANNEL_STA_REG3(ip)
#define SET_UNIPERIF_CHANNEL_STA_REG3(ip, value)

#define UNIPERIF_CHANNEL_STA_REG4_OFFSET(ip)
#define GET_UNIPERIF_CHANNEL_STA_REG4(ip)
#define SET_UNIPERIF_CHANNEL_STA_REG4(ip, value)

#define UNIPERIF_CHANNEL_STA_REG5_OFFSET(ip)
#define GET_UNIPERIF_CHANNEL_STA_REG5(ip)
#define SET_UNIPERIF_CHANNEL_STA_REG5(ip, value)

/*
 *  UNIPERIF_ITS reg
 */

#define UNIPERIF_ITS_OFFSET(ip)
#define GET_UNIPERIF_ITS(ip)

/* MEM_BLK_READ */
#define UNIPERIF_ITS_MEM_BLK_READ_SHIFT(ip)
#define UNIPERIF_ITS_MEM_BLK_READ_MASK(ip)

/* FIFO_ERROR */
#define UNIPERIF_ITS_FIFO_ERROR_SHIFT(ip)
#define UNIPERIF_ITS_FIFO_ERROR_MASK(ip)

/* DMA_ERROR */
#define UNIPERIF_ITS_DMA_ERROR_SHIFT(ip)
#define UNIPERIF_ITS_DMA_ERROR_MASK(ip)

/* UNDERFLOW_REC_DONE */
#define UNIPERIF_ITS_UNDERFLOW_REC_DONE_SHIFT(ip)
#define UNIPERIF_ITS_UNDERFLOW_REC_DONE_MASK(ip)

/* UNDERFLOW_REC_FAILED */
#define UNIPERIF_ITS_UNDERFLOW_REC_FAILED_SHIFT(ip)
#define UNIPERIF_ITS_UNDERFLOW_REC_FAILED_MASK(ip)

/*
 *  UNIPERIF_ITS_BCLR reg
 */

/* FIFO_ERROR */
#define UNIPERIF_ITS_BCLR_FIFO_ERROR_SHIFT(ip)
#define UNIPERIF_ITS_BCLR_FIFO_ERROR_MASK(ip)
#define SET_UNIPERIF_ITS_BCLR_FIFO_ERROR(ip)

#define UNIPERIF_ITS_BCLR_OFFSET(ip)
#define SET_UNIPERIF_ITS_BCLR(ip, value)

/*
 *  UNIPERIF_ITM reg
 */

#define UNIPERIF_ITM_OFFSET(ip)
#define GET_UNIPERIF_ITM(ip)

/* FIFO_ERROR */
#define UNIPERIF_ITM_FIFO_ERROR_SHIFT(ip)
#define UNIPERIF_ITM_FIFO_ERROR_MASK(ip)

/* UNDERFLOW_REC_DONE */
#define UNIPERIF_ITM_UNDERFLOW_REC_DONE_SHIFT(ip)
#define UNIPERIF_ITM_UNDERFLOW_REC_DONE_MASK(ip)

/* UNDERFLOW_REC_FAILED */
#define UNIPERIF_ITM_UNDERFLOW_REC_FAILED_SHIFT(ip)
#define UNIPERIF_ITM_UNDERFLOW_REC_FAILED_MASK(ip)

/*
 *  UNIPERIF_ITM_BCLR reg
 */

#define UNIPERIF_ITM_BCLR_OFFSET(ip)
#define SET_UNIPERIF_ITM_BCLR(ip, value)

/* FIFO_ERROR */
#define UNIPERIF_ITM_BCLR_FIFO_ERROR_SHIFT(ip)
#define UNIPERIF_ITM_BCLR_FIFO_ERROR_MASK(ip)
#define SET_UNIPERIF_ITM_BCLR_FIFO_ERROR(ip)

/* DMA_ERROR */
#define UNIPERIF_ITM_BCLR_DMA_ERROR_SHIFT(ip)
#define UNIPERIF_ITM_BCLR_DMA_ERROR_MASK(ip)
#define SET_UNIPERIF_ITM_BCLR_DMA_ERROR(ip)

/*
 *  UNIPERIF_ITM_BSET reg
 */

#define UNIPERIF_ITM_BSET_OFFSET(ip)
#define SET_UNIPERIF_ITM_BSET(ip, value)

/* FIFO_ERROR */
#define UNIPERIF_ITM_BSET_FIFO_ERROR_SHIFT(ip)
#define UNIPERIF_ITM_BSET_FIFO_ERROR_MASK(ip)
#define SET_UNIPERIF_ITM_BSET_FIFO_ERROR(ip)

/* MEM_BLK_READ */
#define UNIPERIF_ITM_BSET_MEM_BLK_READ_SHIFT(ip)
#define UNIPERIF_ITM_BSET_MEM_BLK_READ_MASK(ip)
#define SET_UNIPERIF_ITM_BSET_MEM_BLK_READ(ip)

/* DMA_ERROR */
#define UNIPERIF_ITM_BSET_DMA_ERROR_SHIFT(ip)
#define UNIPERIF_ITM_BSET_DMA_ERROR_MASK(ip)
#define SET_UNIPERIF_ITM_BSET_DMA_ERROR(ip)

/* UNDERFLOW_REC_DONE */
#define UNIPERIF_ITM_BSET_UNDERFLOW_REC_DONE_SHIFT(ip)
#define UNIPERIF_ITM_BSET_UNDERFLOW_REC_DONE_MASK(ip)
#define SET_UNIPERIF_ITM_BSET_UNDERFLOW_REC_DONE(ip)

/* UNDERFLOW_REC_FAILED */
#define UNIPERIF_ITM_BSET_UNDERFLOW_REC_FAILED_SHIFT(ip)
#define UNIPERIF_ITM_BSET_UNDERFLOW_REC_FAILED_MASK(ip)
#define SET_UNIPERIF_ITM_BSET_UNDERFLOW_REC_FAILED(ip)

/*
 * UNIPERIF_CONFIG reg
 */

#define UNIPERIF_CONFIG_OFFSET(ip)
#define GET_UNIPERIF_CONFIG(ip)
#define SET_UNIPERIF_CONFIG(ip, value)

/* PARITY_CNTR */
#define UNIPERIF_CONFIG_PARITY_CNTR_SHIFT(ip)
#define UNIPERIF_CONFIG_PARITY_CNTR_MASK(ip)
#define GET_UNIPERIF_CONFIG_PARITY_CNTR(ip)
#define SET_UNIPERIF_CONFIG_PARITY_CNTR_BY_HW(ip)
#define SET_UNIPERIF_CONFIG_PARITY_CNTR_BY_SW(ip)

/* CHANNEL_STA_CNTR */
#define UNIPERIF_CONFIG_CHANNEL_STA_CNTR_SHIFT(ip)
#define UNIPERIF_CONFIG_CHANNEL_STA_CNTR_MASK(ip)
#define GET_UNIPERIF_CONFIG_CHANNEL_STA_CNTR(ip)
#define SET_UNIPERIF_CONFIG_CHANNEL_STA_CNTR_BY_SW(ip)
#define SET_UNIPERIF_CONFIG_CHANNEL_STA_CNTR_BY_HW(ip)

/* USER_DAT_CNTR */
#define UNIPERIF_CONFIG_USER_DAT_CNTR_SHIFT(ip)
#define UNIPERIF_CONFIG_USER_DAT_CNTR_MASK(ip)
#define GET_UNIPERIF_CONFIG_USER_DAT_CNTR(ip)
#define SET_UNIPERIF_CONFIG_USER_DAT_CNTR_BY_HW(ip)
#define SET_UNIPERIF_CONFIG_USER_DAT_CNTR_BY_SW(ip)

/* VALIDITY_DAT_CNTR */
#define UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_SHIFT(ip)
#define UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_MASK(ip)
#define GET_UNIPERIF_CONFIG_VALIDITY_DAT_CNTR(ip)
#define SET_UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_BY_SW(ip)
#define SET_UNIPERIF_CONFIG_VALIDITY_DAT_CNTR_BY_HW(ip)

/* ONE_BIT_AUD_SUPPORT */
#define UNIPERIF_CONFIG_ONE_BIT_AUD_SHIFT(ip)
#define UNIPERIF_CONFIG_ONE_BIT_AUD_MASK(ip)
#define GET_UNIPERIF_CONFIG_ONE_BIT_AUD(ip)
#define SET_UNIPERIF_CONFIG_ONE_BIT_AUD_DISABLE(ip)
#define SET_UNIPERIF_CONFIG_ONE_BIT_AUD_ENABLE(ip)

/* MEMORY_FMT */
#define UNIPERIF_CONFIG_MEM_FMT_SHIFT(ip)
#define UNIPERIF_CONFIG_MEM_FMT_MASK(ip)
#define VALUE_UNIPERIF_CONFIG_MEM_FMT_16_0(ip)
#define VALUE_UNIPERIF_CONFIG_MEM_FMT_16_16(ip)
#define GET_UNIPERIF_CONFIG_MEM_FMT(ip)
#define SET_UNIPERIF_CONFIG_MEM_FMT(ip, value)
#define SET_UNIPERIF_CONFIG_MEM_FMT_16_0(ip)
#define SET_UNIPERIF_CONFIG_MEM_FMT_16_16(ip)

/* REPEAT_CHL_STS */
#define UNIPERIF_CONFIG_REPEAT_CHL_STS_SHIFT(ip)
#define UNIPERIF_CONFIG_REPEAT_CHL_STS_MASK(ip)
#define GET_UNIPERIF_CONFIG_REPEAT_CHL_STS(ip)
#define SET_UNIPERIF_CONFIG_REPEAT_CHL_STS_ENABLE(ip)
#define SET_UNIPERIF_CONFIG_REPEAT_CHL_STS_DISABLE(ip)

/* BACK_STALL_REQ */
#define UNIPERIF_CONFIG_BACK_STALL_REQ_SHIFT(ip)
#define UNIPERIF_CONFIG_BACK_STALL_REQ_MASK(ip)
#define GET_UNIPERIF_CONFIG_BACK_STALL_REQ(ip)
#define SET_UNIPERIF_CONFIG_BACK_STALL_REQ_DISABLE(ip)
#define SET_UNIPERIF_CONFIG_BACK_STALL_REQ_ENABLE(ip)

/* FDMA_TRIGGER_LIMIT */
#define UNIPERIF_CONFIG_DMA_TRIG_LIMIT_SHIFT(ip)
#define UNIPERIF_CONFIG_DMA_TRIG_LIMIT_MASK(ip)
#define GET_UNIPERIF_CONFIG_DMA_TRIG_LIMIT(ip)
#define SET_UNIPERIF_CONFIG_DMA_TRIG_LIMIT(ip, value)

/* CHL_STS_UPDATE */
#define UNIPERIF_CONFIG_CHL_STS_UPDATE_SHIFT(ip)
#define UNIPERIF_CONFIG_CHL_STS_UPDATE_MASK(ip)
#define GET_UNIPERIF_CONFIG_CHL_STS_UPDATE(ip)
#define SET_UNIPERIF_CONFIG_CHL_STS_UPDATE(ip)

/* IDLE_MOD */
#define UNIPERIF_CONFIG_IDLE_MOD_SHIFT(ip)
#define UNIPERIF_CONFIG_IDLE_MOD_MASK(ip)
#define GET_UNIPERIF_CONFIG_IDLE_MOD(ip)
#define SET_UNIPERIF_CONFIG_IDLE_MOD_DISABLE(ip)
#define SET_UNIPERIF_CONFIG_IDLE_MOD_ENABLE(ip)

/* SUBFRAME_SELECTION */
#define UNIPERIF_CONFIG_SUBFRAME_SEL_SHIFT(ip)
#define UNIPERIF_CONFIG_SUBFRAME_SEL_MASK(ip)
#define GET_UNIPERIF_CONFIG_SUBFRAME_SEL(ip)
#define SET_UNIPERIF_CONFIG_SUBFRAME_SEL_SUBF1_SUBF0(ip)
#define SET_UNIPERIF_CONFIG_SUBFRAME_SEL_SUBF0_SUBF1(ip)

/* FULL_SW_CONTROL */
#define UNIPERIF_CONFIG_SPDIF_SW_CTRL_SHIFT(ip)
#define UNIPERIF_CONFIG_SPDIF_SW_CTRL_MASK(ip)
#define GET_UNIPERIF_CONFIG_SPDIF_SW_CTRL(ip)
#define SET_UNIPERIF_CONFIG_SPDIF_SW_CTRL_ENABLE(ip)
#define SET_UNIPERIF_CONFIG_SPDIF_SW_CTRL_DISABLE(ip)

/* MASTER_CLKEDGE */
#define UNIPERIF_CONFIG_MSTR_CLKEDGE_SHIFT(ip)
#define UNIPERIF_CONFIG_MSTR_CLKEDGE_MASK(ip)
#define GET_UNIPERIF_CONFIG_MSTR_CLKEDGE(ip)
#define SET_UNIPERIF_CONFIG_MSTR_CLKEDGE_FALLING(ip)
#define SET_UNIPERIF_CONFIG_MSTR_CLKEDGE_RISING(ip)

/*
 * UNIPERIF_CTRL reg
 */

#define UNIPERIF_CTRL_OFFSET(ip)
#define GET_UNIPERIF_CTRL(ip)
#define SET_UNIPERIF_CTRL(ip, value)

/* OPERATION */
#define UNIPERIF_CTRL_OPERATION_SHIFT(ip)
#define UNIPERIF_CTRL_OPERATION_MASK(ip)
#define GET_UNIPERIF_CTRL_OPERATION(ip)
#define VALUE_UNIPERIF_CTRL_OPERATION_OFF(ip)
#define SET_UNIPERIF_CTRL_OPERATION_OFF(ip)
#define VALUE_UNIPERIF_CTRL_OPERATION_MUTE_PCM_NULL(ip)
#define SET_UNIPERIF_CTRL_OPERATION_MUTE_PCM_NULL(ip)
#define VALUE_UNIPERIF_CTRL_OPERATION_MUTE_PAUSE_BURST(ip)
#define SET_UNIPERIF_CTRL_OPERATION_MUTE_PAUSE_BURST(ip)
#define VALUE_UNIPERIF_CTRL_OPERATION_PCM_DATA(ip)
#define SET_UNIPERIF_CTRL_OPERATION_PCM_DATA(ip)
/* This is the same as above! */
#define VALUE_UNIPERIF_CTRL_OPERATION_AUDIO_DATA(ip)
#define SET_UNIPERIF_CTRL_OPERATION_AUDIO_DATA(ip)
#define VALUE_UNIPERIF_CTRL_OPERATION_ENC_DATA(ip)
#define SET_UNIPERIF_CTRL_OPERATION_ENC_DATA(ip)
#define VALUE_UNIPERIF_CTRL_OPERATION_CD_DATA(ip)
#define SET_UNIPERIF_CTRL_OPERATION_CD_DATA(ip)
#define VALUE_UNIPERIF_CTRL_OPERATION_STANDBY(ip)
#define SET_UNIPERIF_CTRL_OPERATION_STANDBY(ip)

/* EXIT_STBY_ON_EOBLOCK */
#define UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_SHIFT(ip)
#define UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_MASK(ip)
#define GET_UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK(ip)
#define SET_UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_OFF(ip)
#define SET_UNIPERIF_CTRL_EXIT_STBY_ON_EOBLOCK_ON(ip)

/* ROUNDING */
#define UNIPERIF_CTRL_ROUNDING_SHIFT(ip)
#define UNIPERIF_CTRL_ROUNDING_MASK(ip)
#define GET_UNIPERIF_CTRL_ROUNDING(ip)
#define SET_UNIPERIF_CTRL_ROUNDING_OFF(ip)
#define SET_UNIPERIF_CTRL_ROUNDING_ON(ip)

/* DIVIDER */
#define UNIPERIF_CTRL_DIVIDER_SHIFT(ip)
#define UNIPERIF_CTRL_DIVIDER_MASK(ip)
#define GET_UNIPERIF_CTRL_DIVIDER(ip)
#define SET_UNIPERIF_CTRL_DIVIDER(ip, value)

/* BYTE_SWAP */
#define UNIPERIF_CTRL_BYTE_SWP_SHIFT(ip)
#define UNIPERIF_CTRL_BYTE_SWP_MASK(ip)
#define GET_UNIPERIF_CTRL_BYTE_SWP(ip)
#define SET_UNIPERIF_CTRL_BYTE_SWP_OFF(ip)
#define SET_UNIPERIF_CTRL_BYTE_SWP_ON(ip)

/* ZERO_STUFFING_HW_SW */
#define UNIPERIF_CTRL_ZERO_STUFF_SHIFT(ip)
#define UNIPERIF_CTRL_ZERO_STUFF_MASK(ip)
#define GET_UNIPERIF_CTRL_ZERO_STUFF(ip)
#define SET_UNIPERIF_CTRL_ZERO_STUFF_HW(ip)
#define SET_UNIPERIF_CTRL_ZERO_STUFF_SW(ip)

/* SPDIF_LAT */
#define UNIPERIF_CTRL_SPDIF_LAT_SHIFT(ip)
#define UNIPERIF_CTRL_SPDIF_LAT_MASK(ip)
#define GET_UNIPERIF_CTRL_SPDIF_LAT(ip)
#define SET_UNIPERIF_CTRL_SPDIF_LAT_ON(ip)
#define SET_UNIPERIF_CTRL_SPDIF_LAT_OFF(ip)

/* EN_SPDIF_FORMATTING */
#define UNIPERIF_CTRL_SPDIF_FMT_SHIFT(ip)
#define UNIPERIF_CTRL_SPDIF_FMT_MASK(ip)
#define GET_UNIPERIF_CTRL_SPDIF_FMT(ip)
#define SET_UNIPERIF_CTRL_SPDIF_FMT_ON(ip)
#define SET_UNIPERIF_CTRL_SPDIF_FMT_OFF(ip)

/* READER_OUT_SELECT */
#define UNIPERIF_CTRL_READER_OUT_SEL_SHIFT(ip)
#define UNIPERIF_CTRL_READER_OUT_SEL_MASK(ip)
#define GET_UNIPERIF_CTRL_READER_OUT_SEL(ip)
#define SET_UNIPERIF_CTRL_READER_OUT_SEL_IN_MEM(ip)
#define SET_UNIPERIF_CTRL_READER_OUT_SEL_ON_I2S_LINE(ip)

/* UNDERFLOW_REC_WINDOW */
#define UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW_SHIFT(ip)
#define UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW_MASK(ip)
#define GET_UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW(ip)
#define SET_UNIPERIF_CTRL_UNDERFLOW_REC_WINDOW(ip, value)

/*
 * UNIPERIF_I2S_FMT a.k.a UNIPERIF_FORMAT reg
 */

#define UNIPERIF_I2S_FMT_OFFSET(ip)
#define GET_UNIPERIF_I2S_FMT(ip)
#define SET_UNIPERIF_I2S_FMT(ip, value)

/* NBIT */
#define UNIPERIF_I2S_FMT_NBIT_SHIFT(ip)
#define UNIPERIF_I2S_FMT_NBIT_MASK(ip)
#define GET_UNIPERIF_I2S_FMT_NBIT(ip)
#define SET_UNIPERIF_I2S_FMT_NBIT_32(ip)
#define SET_UNIPERIF_I2S_FMT_NBIT_16(ip)

/* DATA_SIZE */
#define UNIPERIF_I2S_FMT_DATA_SIZE_SHIFT(ip)
#define UNIPERIF_I2S_FMT_DATA_SIZE_MASK(ip)
#define GET_UNIPERIF_I2S_FMT_DATA_SIZE(ip)
#define SET_UNIPERIF_I2S_FMT_DATA_SIZE_16(ip)
#define SET_UNIPERIF_I2S_FMT_DATA_SIZE_18(ip)
#define SET_UNIPERIF_I2S_FMT_DATA_SIZE_20(ip)
#define SET_UNIPERIF_I2S_FMT_DATA_SIZE_24(ip)
#define SET_UNIPERIF_I2S_FMTL_DATA_SIZE_28(ip)
#define SET_UNIPERIF_I2S_FMT_DATA_SIZE_32(ip)

/* LR_POL */
#define UNIPERIF_I2S_FMT_LR_POL_SHIFT(ip)
#define UNIPERIF_I2S_FMT_LR_POL_MASK(ip)
#define VALUE_UNIPERIF_I2S_FMT_LR_POL_LOW(ip)
#define VALUE_UNIPERIF_I2S_FMT_LR_POL_HIG(ip)
#define GET_UNIPERIF_I2S_FMT_LR_POL(ip)
#define SET_UNIPERIF_I2S_FMT_LR_POL(ip, value)
#define SET_UNIPERIF_I2S_FMT_LR_POL_LOW(ip)
#define SET_UNIPERIF_I2S_FMT_LR_POL_HIG(ip)

/* SCLK_EDGE */
#define UNIPERIF_I2S_FMT_SCLK_EDGE_SHIFT(ip)
#define UNIPERIF_I2S_FMT_SCLK_EDGE_MASK(ip)
#define GET_UNIPERIF_I2S_FMT_SCLK_EDGE(ip)
#define SET_UNIPERIF_I2S_FMT_SCLK_EDGE_RISING(ip)
#define SET_UNIPERIF_I2S_FMT_SCLK_EDGE_FALLING(ip)

/* PADDING */
#define UNIPERIF_I2S_FMT_PADDING_SHIFT(ip)
#define UNIPERIF_I2S_FMT_PADDING_MASK(ip)
#define UNIPERIF_I2S_FMT_PADDING_MASK(ip)
#define VALUE_UNIPERIF_I2S_FMT_PADDING_I2S_MODE(ip)
#define VALUE_UNIPERIF_I2S_FMT_PADDING_SONY_MODE(ip)
#define GET_UNIPERIF_I2S_FMT_PADDING(ip)
#define SET_UNIPERIF_I2S_FMT_PADDING(ip, value)
#define SET_UNIPERIF_I2S_FMT_PADDING_I2S_MODE(ip)
#define SET_UNIPERIF_I2S_FMT_PADDING_SONY_MODE(ip)

/* ALIGN */
#define UNIPERIF_I2S_FMT_ALIGN_SHIFT(ip)
#define UNIPERIF_I2S_FMT_ALIGN_MASK(ip)
#define GET_UNIPERIF_I2S_FMT_ALIGN(ip)
#define SET_UNIPERIF_I2S_FMT_ALIGN_LEFT(ip)
#define SET_UNIPERIF_I2S_FMT_ALIGN_RIGHT(ip)

/* ORDER */
#define UNIPERIF_I2S_FMT_ORDER_SHIFT(ip)
#define UNIPERIF_I2S_FMT_ORDER_MASK(ip)
#define GET_UNIPERIF_I2S_FMT_ORDER(ip)
#define SET_UNIPERIF_I2S_FMT_ORDER_LSB(ip)
#define SET_UNIPERIF_I2S_FMT_ORDER_MSB(ip)

/* NUM_CH */
#define UNIPERIF_I2S_FMT_NUM_CH_SHIFT(ip)
#define UNIPERIF_I2S_FMT_NUM_CH_MASK(ip)
#define GET_UNIPERIF_I2S_FMT_NUM_CH(ip)
#define SET_UNIPERIF_I2S_FMT_NUM_CH(ip, value)

/* NO_OF_SAMPLES_TO_READ */
#define UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ_SHIFT(ip)
#define UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ_MASK(ip)
#define GET_UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ(ip)
#define SET_UNIPERIF_I2S_FMT_NO_OF_SAMPLES_TO_READ(ip, value)

/*
 * UNIPERIF_BIT_CONTROL reg
 */

#define UNIPERIF_BIT_CONTROL_OFFSET(ip)
#define GET_UNIPERIF_BIT_CONTROL(ip)
#define SET_UNIPERIF_BIT_CONTROL(ip, value)

/* CLR_UNDERFLOW_DURATION */
#define UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION_SHIFT(ip)
#define UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION_MASK(ip)
#define GET_UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION(ip)
#define SET_UNIPERIF_BIT_CONTROL_CLR_UNDERFLOW_DURATION(ip)

/* CHL_STS_UPDATE */
#define UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE_SHIFT(ip)
#define UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE_MASK(ip)
#define GET_UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE(ip)
#define SET_UNIPERIF_BIT_CONTROL_CHL_STS_UPDATE(ip)

/*
 * UNIPERIF_STATUS_1 reg
 */

#define UNIPERIF_STATUS_1_OFFSET(ip)
#define GET_UNIPERIF_STATUS_1(ip)
#define SET_UNIPERIF_STATUS_1(ip, value)

/* UNDERFLOW_DURATION */
#define UNIPERIF_STATUS_1_UNDERFLOW_DURATION_SHIFT(ip)
#define UNIPERIF_STATUS_1_UNDERFLOW_DURATION_MASK(ip)
#define GET_UNIPERIF_STATUS_1_UNDERFLOW_DURATION(ip)
#define SET_UNIPERIF_STATUS_1_UNDERFLOW_DURATION(ip, value)

/*
 * UNIPERIF_CHANNEL_STA_REGN reg
 */

#define UNIPERIF_CHANNEL_STA_REGN(ip, n)
#define GET_UNIPERIF_CHANNEL_STA_REGN(ip)
#define SET_UNIPERIF_CHANNEL_STA_REGN(ip, n, value)

/*
 * UNIPERIF_USER_VALIDITY reg
 */

#define UNIPERIF_USER_VALIDITY_OFFSET(ip)
#define GET_UNIPERIF_USER_VALIDITY(ip)
#define SET_UNIPERIF_USER_VALIDITY(ip, value)

/* VALIDITY_LEFT_AND_RIGHT */
#define UNIPERIF_USER_VALIDITY_VALIDITY_LR_SHIFT(ip)
#define UNIPERIF_USER_VALIDITY_VALIDITY_LR_MASK(ip)
#define GET_UNIPERIF_USER_VALIDITY_VALIDITY_LR(ip)
#define SET_UNIPERIF_USER_VALIDITY_VALIDITY_LR(ip, value)

/*
 * UNIPERIF_DBG_STANDBY_LEFT_SP reg
 */
#define UNIPERIF_DBG_STANDBY_LEFT_SP_OFFSET(ip)
#define UNIPERIF_DBG_STANDBY_LEFT_SP_SHIFT(ip)
#define UNIPERIF_DBG_STANDBY_LEFT_SP_MASK(ip)
#define GET_UNIPERIF_DBG_STANDBY_LEFT_SP(ip)
#define SET_UNIPERIF_DBG_STANDBY_LEFT_SP(ip, value)

/*
 * UNIPERIF_TDM_ENABLE
 */
#define UNIPERIF_TDM_ENABLE_OFFSET(ip)
#define GET_UNIPERIF_TDM_ENABLE(ip)
#define SET_UNIPERIF_TDM_ENABLE(ip, value)

/* TDM_ENABLE */
#define UNIPERIF_TDM_ENABLE_EN_TDM_SHIFT(ip)
#define UNIPERIF_TDM_ENABLE_EN_TDM_MASK(ip)
#define GET_UNIPERIF_TDM_ENABLE_EN_TDM(ip)
#define SET_UNIPERIF_TDM_ENABLE_TDM_ENABLE(ip)
#define SET_UNIPERIF_TDM_ENABLE_TDM_DISABLE(ip)

/*
 * UNIPERIF_TDM_FS_REF_FREQ
 */
#define UNIPERIF_TDM_FS_REF_FREQ_OFFSET(ip)
#define GET_UNIPERIF_TDM_FS_REF_FREQ(ip)
#define SET_UNIPERIF_TDM_FS_REF_FREQ(ip, value)

/* REF_FREQ */
#define UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_SHIFT(ip)
#define VALUE_UNIPERIF_TDM_FS_REF_FREQ_8KHZ(ip)
#define VALUE_UNIPERIF_TDM_FS_REF_FREQ_16KHZ(ip)
#define VALUE_UNIPERIF_TDM_FS_REF_FREQ_32KHZ(ip)
#define VALUE_UNIPERIF_TDM_FS_REF_FREQ_48KHZ(ip)
#define UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ_MASK(ip)
#define GET_UNIPERIF_TDM_FS_REF_FREQ_REF_FREQ(ip)
#define SET_UNIPERIF_TDM_FS_REF_FREQ_8KHZ(ip)
#define SET_UNIPERIF_TDM_FS_REF_FREQ_16KHZ(ip)
#define SET_UNIPERIF_TDM_FS_REF_FREQ_32KHZ(ip)
#define SET_UNIPERIF_TDM_FS_REF_FREQ_48KHZ(ip)

/*
 * UNIPERIF_TDM_FS_REF_DIV
 */
#define UNIPERIF_TDM_FS_REF_DIV_OFFSET(ip)
#define GET_UNIPERIF_TDM_FS_REF_DIV(ip)
#define SET_UNIPERIF_TDM_FS_REF_DIV(ip, value)

/* NUM_TIMESLOT */
#define UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT_SHIFT(ip)
#define UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT_MASK(ip)
#define GET_UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT(ip)
#define SET_UNIPERIF_TDM_FS_REF_DIV_NUM_TIMESLOT(ip, value)

/*
 * UNIPERIF_TDM_WORD_POS_X_Y
 * 32 bits of UNIPERIF_TDM_WORD_POS_X_Y register shall be set in 1 shot
 */
#define UNIPERIF_TDM_WORD_POS_1_2_OFFSET(ip)
#define UNIPERIF_TDM_WORD_POS_3_4_OFFSET(ip)
#define UNIPERIF_TDM_WORD_POS_5_6_OFFSET(ip)
#define UNIPERIF_TDM_WORD_POS_7_8_OFFSET(ip)
#define GET_UNIPERIF_TDM_WORD_POS(ip, words)
#define SET_UNIPERIF_TDM_WORD_POS(ip, words, value)
/*
 * uniperipheral IP capabilities
 */

#define UNIPERIF_FIFO_SIZE
#define UNIPERIF_FIFO_FRAMES

#define UNIPERIF_TYPE_IS_HDMI(p)
#define UNIPERIF_TYPE_IS_PCM(p)
#define UNIPERIF_TYPE_IS_SPDIF(p)
#define UNIPERIF_TYPE_IS_IEC958(p)
#define UNIPERIF_TYPE_IS_TDM(p)

/*
 * Uniperipheral IP revisions
 */
enum uniperif_version {};

enum uniperif_type {};

enum uniperif_state {};

enum uniperif_iec958_encoding_mode {};

enum uniperif_word_pos {};

struct uniperif_iec958_settings {};

struct dai_tdm_slot {};

struct uniperif {};

struct sti_uniperiph_dai {};

struct sti_uniperiph_data {};

static __maybe_unused const struct snd_pcm_hardware uni_tdm_hw =;

/* uniperiph player*/
int uni_player_init(struct platform_device *pdev,
		    struct uniperif *player);
int uni_player_resume(struct uniperif *player);

/* uniperiph reader */
int uni_reader_init(struct platform_device *pdev,
		    struct uniperif *reader);

/* common */
int sti_uniperiph_dai_probe(struct snd_soc_dai *dai);
int sti_uniperiph_dai_set_fmt(struct snd_soc_dai *dai,
			      unsigned int fmt);

int sti_uniperiph_dai_hw_params(struct snd_pcm_substream *substream,
				struct snd_pcm_hw_params *params,
				struct snd_soc_dai *dai);

static inline int sti_uniperiph_get_user_frame_size(
	struct snd_pcm_runtime *runtime)
{}

static inline int sti_uniperiph_get_unip_tdm_frame_size(struct uniperif *uni)
{}

int  sti_uniperiph_reset(struct uniperif *uni);

int sti_uniperiph_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
			       unsigned int rx_mask, int slots,
			       int slot_width);

int sti_uniperiph_get_tdm_word_pos(struct uniperif *uni,
				   unsigned int *word_pos);

int sti_uniperiph_fix_tdm_chan(struct snd_pcm_hw_params *params,
			       struct snd_pcm_hw_rule *rule);

int sti_uniperiph_fix_tdm_format(struct snd_pcm_hw_params *params,
				 struct snd_pcm_hw_rule *rule);

#endif