linux/sound/soc/fsl/fsl_asrc.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * fsl_asrc.h - Freescale ASRC ALSA SoC header file
 *
 * Copyright (C) 2014 Freescale Semiconductor, Inc.
 *
 * Author: Nicolin Chen <[email protected]>
 */

#ifndef _FSL_ASRC_H
#define _FSL_ASRC_H

#include  "fsl_asrc_common.h"

#define ASRC_DMA_BUFFER_NUM
#define ASRC_INPUTFIFO_THRESHOLD
#define ASRC_OUTPUTFIFO_THRESHOLD
#define ASRC_FIFO_THRESHOLD_MIN
#define ASRC_FIFO_THRESHOLD_MAX
#define ASRC_DMA_BUFFER_SIZE
#define ASRC_MAX_BUFFER_SIZE
#define ASRC_OUTPUT_LAST_SAMPLE

#define IDEAL_RATIO_RATE

#define REG_ASRCTR
#define REG_ASRIER
#define REG_ASRCNCR
#define REG_ASRCFG
#define REG_ASRCSR

#define REG_ASRCDR1
#define REG_ASRCDR2
#define REG_ASRCDR(i)

#define REG_ASRSTR
#define REG_ASRRA
#define REG_ASRRB
#define REG_ASRRC
#define REG_ASRPM1
#define REG_ASRPM2
#define REG_ASRPM3
#define REG_ASRPM4
#define REG_ASRPM5
#define REG_ASRTFR1
#define REG_ASRCCR

#define REG_ASRDIA
#define REG_ASRDOA
#define REG_ASRDIB
#define REG_ASRDOB
#define REG_ASRDIC
#define REG_ASRDOC
#define REG_ASRDI(i)
#define REG_ASRDO(i)
#define REG_ASRDx(x, i)

#define REG_ASRIDRHA
#define REG_ASRIDRLA
#define REG_ASRIDRHB
#define REG_ASRIDRLB
#define REG_ASRIDRHC
#define REG_ASRIDRLC
#define REG_ASRIDRH(i)
#define REG_ASRIDRL(i)

#define REG_ASR76K
#define REG_ASR56K

#define REG_ASRMCRA
#define REG_ASRFSTA
#define REG_ASRMCRB
#define REG_ASRFSTB
#define REG_ASRMCRC
#define REG_ASRFSTC
#define REG_ASRMCR(i)
#define REG_ASRFST(i)

#define REG_ASRMCR1A
#define REG_ASRMCR1B
#define REG_ASRMCR1C
#define REG_ASRMCR1(i)


/* REG0 0x00 REG_ASRCTR */
#define ASRCTR_ATSi_SHIFT(i)
#define ASRCTR_ATSi_MASK(i)
#define ASRCTR_ATS(i)
#define ASRCTR_USRi_SHIFT(i)
#define ASRCTR_USRi_MASK(i)
#define ASRCTR_USR(i)
#define ASRCTR_IDRi_SHIFT(i)
#define ASRCTR_IDRi_MASK(i)
#define ASRCTR_IDR(i)
#define ASRCTR_SRST_SHIFT
#define ASRCTR_SRST_MASK
#define ASRCTR_SRST
#define ASRCTR_ASRCEi_SHIFT(i)
#define ASRCTR_ASRCEi_MASK(i)
#define ASRCTR_ASRCE(i)
#define ASRCTR_ASRCEi_ALL_MASK
#define ASRCTR_ASRCEN_SHIFT
#define ASRCTR_ASRCEN_MASK
#define ASRCTR_ASRCEN

/* REG1 0x04 REG_ASRIER */
#define ASRIER_AFPWE_SHIFT
#define ASRIER_AFPWE_MASK
#define ASRIER_AFPWE
#define ASRIER_AOLIE_SHIFT
#define ASRIER_AOLIE_MASK
#define ASRIER_AOLIE
#define ASRIER_ADOEi_SHIFT(i)
#define ASRIER_ADOEi_MASK(i)
#define ASRIER_ADOE(i)
#define ASRIER_ADIEi_SHIFT(i)
#define ASRIER_ADIEi_MASK(i)
#define ASRIER_ADIE(i)

/* REG2 0x0C REG_ASRCNCR */
#define ASRCNCR_ANCi_SHIFT(i, b)
#define ASRCNCR_ANCi_MASK(i, b)
#define ASRCNCR_ANCi(i, v, b)

/* REG3 0x10 REG_ASRCFG */
#define ASRCFG_INIRQi_SHIFT(i)
#define ASRCFG_INIRQi_MASK(i)
#define ASRCFG_INIRQi
#define ASRCFG_NDPRi_SHIFT(i)
#define ASRCFG_NDPRi_MASK(i)
#define ASRCFG_NDPRi_ALL_SHIFT
#define ASRCFG_NDPRi_ALL_MASK
#define ASRCFG_NDPRi
#define ASRCFG_POSTMODi_SHIFT(i)
#define ASRCFG_POSTMODi_WIDTH
#define ASRCFG_POSTMODi_MASK(i)
#define ASRCFG_POSTMODi_ALL_MASK
#define ASRCFG_POSTMOD(i, v)
#define ASRCFG_POSTMODi_UP(i)
#define ASRCFG_POSTMODi_DCON(i)
#define ASRCFG_POSTMODi_DOWN(i)
#define ASRCFG_PREMODi_SHIFT(i)
#define ASRCFG_PREMODi_WIDTH
#define ASRCFG_PREMODi_MASK(i)
#define ASRCFG_PREMODi_ALL_MASK
#define ASRCFG_PREMOD(i, v)
#define ASRCFG_PREMODi_UP(i)
#define ASRCFG_PREMODi_DCON(i)
#define ASRCFG_PREMODi_DOWN(i)
#define ASRCFG_PREMODi_BYPASS(i)

/* REG4 0x14 REG_ASRCSR */
#define ASRCSR_AxCSi_WIDTH
#define ASRCSR_AxCSi_MASK
#define ASRCSR_AOCSi_SHIFT(i)
#define ASRCSR_AOCSi_MASK(i)
#define ASRCSR_AOCS(i, v)
#define ASRCSR_AICSi_SHIFT(i)
#define ASRCSR_AICSi_MASK(i)
#define ASRCSR_AICS(i, v)

/* REG5&6 0x18 & 0x1C REG_ASRCDR1 & ASRCDR2 */
#define ASRCDRi_AxCPi_WIDTH
#define ASRCDRi_AICPi_SHIFT(i)
#define ASRCDRi_AICPi_MASK(i)
#define ASRCDRi_AICP(i, v)
#define ASRCDRi_AICDi_SHIFT(i)
#define ASRCDRi_AICDi_MASK(i)
#define ASRCDRi_AICD(i, v)
#define ASRCDRi_AOCPi_SHIFT(i)
#define ASRCDRi_AOCPi_MASK(i)
#define ASRCDRi_AOCP(i, v)
#define ASRCDRi_AOCDi_SHIFT(i)
#define ASRCDRi_AOCDi_MASK(i)
#define ASRCDRi_AOCD(i, v)

/* REG7 0x20 REG_ASRSTR */
#define ASRSTR_DSLCNT_SHIFT
#define ASRSTR_DSLCNT_MASK
#define ASRSTR_DSLCNT
#define ASRSTR_ATQOL_SHIFT
#define ASRSTR_ATQOL_MASK
#define ASRSTR_ATQOL
#define ASRSTR_AOOLi_SHIFT(i)
#define ASRSTR_AOOLi_MASK(i)
#define ASRSTR_AOOL(i)
#define ASRSTR_AIOLi_SHIFT(i)
#define ASRSTR_AIOLi_MASK(i)
#define ASRSTR_AIOL(i)
#define ASRSTR_AODOi_SHIFT(i)
#define ASRSTR_AODOi_MASK(i)
#define ASRSTR_AODO(i)
#define ASRSTR_AIDUi_SHIFT(i)
#define ASRSTR_AIDUi_MASK(i)
#define ASRSTR_AIDU(i)
#define ASRSTR_FPWT_SHIFT
#define ASRSTR_FPWT_MASK
#define ASRSTR_FPWT
#define ASRSTR_AOLE_SHIFT
#define ASRSTR_AOLE_MASK
#define ASRSTR_AOLE
#define ASRSTR_AODEi_SHIFT(i)
#define ASRSTR_AODFi_MASK(i)
#define ASRSTR_AODF(i)
#define ASRSTR_AIDEi_SHIFT(i)
#define ASRSTR_AIDEi_MASK(i)
#define ASRSTR_AIDE(i)

/* REG10 0x54 REG_ASRTFR1 */
#define ASRTFR1_TF_BASE_WIDTH
#define ASRTFR1_TF_BASE_SHIFT
#define ASRTFR1_TF_BASE_MASK
#define ASRTFR1_TF_BASE(i)

/*
 * REG22 0xA0 REG_ASRMCRA
 * REG24 0xA8 REG_ASRMCRB
 * REG26 0xB0 REG_ASRMCRC
 */
#define ASRMCRi_ZEROBUFi_SHIFT
#define ASRMCRi_ZEROBUFi_MASK
#define ASRMCRi_ZEROBUFi
#define ASRMCRi_EXTTHRSHi_SHIFT
#define ASRMCRi_EXTTHRSHi_MASK
#define ASRMCRi_EXTTHRSHi
#define ASRMCRi_BUFSTALLi_SHIFT
#define ASRMCRi_BUFSTALLi_MASK
#define ASRMCRi_BUFSTALLi
#define ASRMCRi_BYPASSPOLYi_SHIFT
#define ASRMCRi_BYPASSPOLYi_MASK
#define ASRMCRi_BYPASSPOLYi
#define ASRMCRi_OUTFIFO_THRESHOLD_WIDTH
#define ASRMCRi_OUTFIFO_THRESHOLD_SHIFT
#define ASRMCRi_OUTFIFO_THRESHOLD_MASK
#define ASRMCRi_OUTFIFO_THRESHOLD(v)
#define ASRMCRi_RSYNIFi_SHIFT
#define ASRMCRi_RSYNIFi_MASK
#define ASRMCRi_RSYNIFi
#define ASRMCRi_RSYNOFi_SHIFT
#define ASRMCRi_RSYNOFi_MASK
#define ASRMCRi_RSYNOFi
#define ASRMCRi_INFIFO_THRESHOLD_WIDTH
#define ASRMCRi_INFIFO_THRESHOLD_SHIFT
#define ASRMCRi_INFIFO_THRESHOLD_MASK
#define ASRMCRi_INFIFO_THRESHOLD(v)

/*
 * REG23 0xA4 REG_ASRFSTA
 * REG25 0xAC REG_ASRFSTB
 * REG27 0xB4 REG_ASRFSTC
 */
#define ASRFSTi_OAFi_SHIFT
#define ASRFSTi_OAFi_MASK
#define ASRFSTi_OAFi
#define ASRFSTi_OUTPUT_FIFO_WIDTH
#define ASRFSTi_OUTPUT_FIFO_SHIFT
#define ASRFSTi_OUTPUT_FIFO_MASK
#define ASRFSTi_IAEi_SHIFT
#define ASRFSTi_IAEi_MASK
#define ASRFSTi_IAEi
#define ASRFSTi_INPUT_FIFO_WIDTH
#define ASRFSTi_INPUT_FIFO_SHIFT
#define ASRFSTi_INPUT_FIFO_MASK

/* REG28 0xC0 & 0xC4 & 0xC8 REG_ASRMCR1i */
#define ASRMCR1i_IWD_WIDTH
#define ASRMCR1i_IWD_SHIFT
#define ASRMCR1i_IWD_MASK
#define ASRMCR1i_IWD(v)
#define ASRMCR1i_IMSB_SHIFT
#define ASRMCR1i_IMSB_MASK
#define ASRMCR1i_IMSB_MSB
#define ASRMCR1i_IMSB_LSB
#define ASRMCR1i_OMSB_SHIFT
#define ASRMCR1i_OMSB_MASK
#define ASRMCR1i_OMSB_MSB
#define ASRMCR1i_OMSB_LSB
#define ASRMCR1i_OSGN_SHIFT
#define ASRMCR1i_OSGN_MASK
#define ASRMCR1i_OSGN
#define ASRMCR1i_OW16_SHIFT
#define ASRMCR1i_OW16_MASK
#define ASRMCR1i_OW16(v)

#define ASRC_PAIR_MAX_NUM

enum asrc_inclk {};

enum asrc_outclk {};

#define ASRC_CLK_MAX_NUM
#define ASRC_CLK_MAP_LEN

enum asrc_word_width {};

struct asrc_config {};

struct asrc_req {};

struct asrc_querybuf {};

struct asrc_convert_buffer {};

struct asrc_status_flags {};

enum asrc_error_status {};

struct dma_block {};

/**
 * fsl_asrc_soc_data: soc specific data
 *
 * @use_edma: using edma as dma device or not
 * @channel_bits: width of ASRCNCR register for each pair
 */
struct fsl_asrc_soc_data {};

/**
 * fsl_asrc_pair_priv: ASRC Pair private data
 *
 * @config: configuration profile
 */
struct fsl_asrc_pair_priv {};

/**
 * fsl_asrc_priv: ASRC private data
 *
 * @asrck_clk: clock sources to driver ASRC internal logic
 * @soc: soc specific data
 * @clk_map: clock map for input/output clock
 * @regcache_cfg: store register value of REG_ASRCFG
 */
struct fsl_asrc_priv {};

#endif /* _FSL_ASRC_H */