linux/sound/soc/kirkwood/kirkwood.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * kirkwood.h
 *
 * (c) 2010 Arnaud Patard <[email protected]>
 */

#ifndef _KIRKWOOD_AUDIO_H
#define _KIRKWOOD_AUDIO_H

#define DRV_NAME

#define KIRKWOOD_RECORD_WIN
#define KIRKWOOD_PLAYBACK_WIN
#define KIRKWOOD_MAX_AUDIO_WIN

#define KIRKWOOD_AUDIO_WIN_BASE_REG(win)
#define KIRKWOOD_AUDIO_WIN_CTRL_REG(win)


#define KIRKWOOD_RECCTL
#define KIRKWOOD_RECCTL_SPDIF_EN
#define KIRKWOOD_RECCTL_I2S_EN
#define KIRKWOOD_RECCTL_PAUSE
#define KIRKWOOD_RECCTL_MUTE
#define KIRKWOOD_RECCTL_BURST_MASK
#define KIRKWOOD_RECCTL_BURST_128
#define KIRKWOOD_RECCTL_BURST_32
#define KIRKWOOD_RECCTL_MONO
#define KIRKWOOD_RECCTL_MONO_CHAN_RIGHT
#define KIRKWOOD_RECCTL_MONO_CHAN_LEFT
#define KIRKWOOD_RECCTL_SIZE_MASK
#define KIRKWOOD_RECCTL_SIZE_16
#define KIRKWOOD_RECCTL_SIZE_16_C
#define KIRKWOOD_RECCTL_SIZE_20
#define KIRKWOOD_RECCTL_SIZE_24
#define KIRKWOOD_RECCTL_SIZE_32

#define KIRKWOOD_RECCTL_ENABLE_MASK

#define KIRKWOOD_REC_BUF_ADDR
#define KIRKWOOD_REC_BUF_SIZE
#define KIRKWOOD_REC_BYTE_COUNT

#define KIRKWOOD_PLAYCTL
#define KIRKWOOD_PLAYCTL_PLAY_BUSY
#define KIRKWOOD_PLAYCTL_BURST_MASK
#define KIRKWOOD_PLAYCTL_BURST_128
#define KIRKWOOD_PLAYCTL_BURST_32
#define KIRKWOOD_PLAYCTL_PAUSE
#define KIRKWOOD_PLAYCTL_SPDIF_MUTE
#define KIRKWOOD_PLAYCTL_MONO_MASK
#define KIRKWOOD_PLAYCTL_MONO_BOTH
#define KIRKWOOD_PLAYCTL_MONO_OFF
#define KIRKWOOD_PLAYCTL_I2S_MUTE
#define KIRKWOOD_PLAYCTL_SPDIF_EN
#define KIRKWOOD_PLAYCTL_I2S_EN
#define KIRKWOOD_PLAYCTL_SIZE_MASK
#define KIRKWOOD_PLAYCTL_SIZE_16
#define KIRKWOOD_PLAYCTL_SIZE_16_C
#define KIRKWOOD_PLAYCTL_SIZE_20
#define KIRKWOOD_PLAYCTL_SIZE_24
#define KIRKWOOD_PLAYCTL_SIZE_32

#define KIRKWOOD_PLAYCTL_ENABLE_MASK

#define KIRKWOOD_PLAY_BUF_ADDR
#define KIRKWOOD_PLAY_BUF_SIZE
#define KIRKWOOD_PLAY_BYTE_COUNT

#define KIRKWOOD_DCO_CTL
#define KIRKWOOD_DCO_CTL_OFFSET_MASK
#define KIRKWOOD_DCO_CTL_OFFSET_0
#define KIRKWOOD_DCO_CTL_FREQ_MASK
#define KIRKWOOD_DCO_CTL_FREQ_11
#define KIRKWOOD_DCO_CTL_FREQ_12
#define KIRKWOOD_DCO_CTL_FREQ_24

#define KIRKWOOD_DCO_SPCR_STATUS
#define KIRKWOOD_DCO_SPCR_STATUS_DCO_LOCK

#define KIRKWOOD_CLOCKS_CTRL
#define KIRKWOOD_MCLK_SOURCE_MASK
#define KIRKWOOD_MCLK_SOURCE_DCO
#define KIRKWOOD_MCLK_SOURCE_EXTCLK

#define KIRKWOOD_ERR_CAUSE
#define KIRKWOOD_ERR_MASK

#define KIRKWOOD_INT_CAUSE
#define KIRKWOOD_INT_MASK
#define KIRKWOOD_INT_CAUSE_PLAY_BYTES
#define KIRKWOOD_INT_CAUSE_REC_BYTES
#define KIRKWOOD_INT_CAUSE_DMA_PLAY_END
#define KIRKWOOD_INT_CAUSE_DMA_PLAY_3Q
#define KIRKWOOD_INT_CAUSE_DMA_PLAY_HALF
#define KIRKWOOD_INT_CAUSE_DMA_PLAY_1Q
#define KIRKWOOD_INT_CAUSE_DMA_REC_END
#define KIRKWOOD_INT_CAUSE_DMA_REC_3Q
#define KIRKWOOD_INT_CAUSE_DMA_REC_HALF
#define KIRKWOOD_INT_CAUSE_DMA_REC_1Q

#define KIRKWOOD_REC_BYTE_INT_COUNT
#define KIRKWOOD_PLAY_BYTE_INT_COUNT
#define KIRKWOOD_BYTE_INT_COUNT_MASK

#define KIRKWOOD_I2S_PLAYCTL
#define KIRKWOOD_I2S_RECCTL
#define KIRKWOOD_I2S_CTL_JUST_MASK
#define KIRKWOOD_I2S_CTL_LJ
#define KIRKWOOD_I2S_CTL_I2S
#define KIRKWOOD_I2S_CTL_RJ
#define KIRKWOOD_I2S_CTL_SIZE_MASK
#define KIRKWOOD_I2S_CTL_SIZE_16
#define KIRKWOOD_I2S_CTL_SIZE_20
#define KIRKWOOD_I2S_CTL_SIZE_24
#define KIRKWOOD_I2S_CTL_SIZE_32

#define KIRKWOOD_AUDIO_BUF_MAX

/* Theses values come from the marvell alsa driver */
/* need to find where they come from               */
#define KIRKWOOD_SND_MIN_PERIODS
#define KIRKWOOD_SND_MAX_PERIODS
#define KIRKWOOD_SND_MIN_PERIOD_BYTES
#define KIRKWOOD_SND_MAX_PERIOD_BYTES
#define KIRKWOOD_SND_MAX_BUFFER_BYTES

struct kirkwood_dma_data {};

extern const struct snd_soc_component_driver kirkwood_soc_component;

#endif