linux/include/sound/ak4117.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __SOUND_AK4117_H
#define __SOUND_AK4117_H

/*
 *  Routines for Asahi Kasei AK4117
 *  Copyright (c) by Jaroslav Kysela <[email protected]>,
 */

#define AK4117_REG_PWRDN
#define AK4117_REG_CLOCK
#define AK4117_REG_IO
#define AK4117_REG_INT0_MASK
#define AK4117_REG_INT1_MASK
#define AK4117_REG_RCS0
#define AK4117_REG_RCS1
#define AK4117_REG_RCS2
#define AK4117_REG_RXCSB0
#define AK4117_REG_RXCSB1
#define AK4117_REG_RXCSB2
#define AK4117_REG_RXCSB3
#define AK4117_REG_RXCSB4
#define AK4117_REG_Pc0
#define AK4117_REG_Pc1
#define AK4117_REG_Pd0
#define AK4117_REG_Pd1
#define AK4117_REG_QSUB_ADDR
#define AK4117_REG_QSUB_TRACK
#define AK4117_REG_QSUB_INDEX
#define AK4117_REG_QSUB_MINUTE
#define AK4117_REG_QSUB_SECOND
#define AK4117_REG_QSUB_FRAME
#define AK4117_REG_QSUB_ZERO
#define AK4117_REG_QSUB_ABSMIN
#define AK4117_REG_QSUB_ABSSEC
#define AK4117_REG_QSUB_ABSFRM

/* sizes */
#define AK4117_REG_RXCSB_SIZE
#define AK4117_REG_QSUB_SIZE

/* AK4117_REG_PWRDN bits */
#define AK4117_EXCT
#define AK4117_XTL1
#define AK4117_XTL0
#define AK4117_XTL_11_2896M
#define AK4117_XTL_12_288M
#define AK4117_XTL_24_576M
#define AK4117_XTL_EXT
#define AK4117_PWN
#define AK4117_RST

/* AK4117_REQ_CLOCK bits */
#define AK4117_LP
#define AK4117_PKCS1
#define AK4117_PKCS0
#define AK4117_PKCS_512fs
#define AK4117_PKCS_256fs
#define AK4117_PKCS_128fs
#define AK4117_DIV
#define AK4117_XCKS1
#define AK4117_XCKS0
#define AK4117_XCKS_128fs
#define AK4117_XCKS_256fs
#define AK4117_XCKS_512fs
#define AK4117_XCKS_1024fs
#define AK4117_CM1
#define AK4117_CM0
#define AK4117_CM_PLL
#define AK4117_CM_XTAL
#define AK4117_CM_PLL_XTAL
#define AK4117_CM_MONITOR

/* AK4117_REG_IO */
#define AK4117_IPS
#define AK4117_UOUTE
#define AK4117_CS12
#define AK4117_EFH2
#define AK4117_EFH1
#define AK4117_EFH_512LRCLK
#define AK4117_EFH_1024LRCLK
#define AK4117_EFH_2048LRCLK
#define AK4117_EFH_4096LRCLK
#define AK4117_DIF2
#define AK4117_DIF1
#define AK4117_DIF0
#define AK4117_DIF_16R
#define AK4117_DIF_18R
#define AK4117_DIF_20R
#define AK4117_DIF_24R
#define AK4117_DIF_24L
#define AK4117_DIF_24I2S

/* AK4117_REG_INT0_MASK & AK4117_REG_INT1_MASK */
#define AK4117_MULK
#define AK4117_MPAR
#define AK4117_MAUTO
#define AK4117_MV
#define AK4117_MAUD
#define AK4117_MSTC
#define AK4117_MCIT
#define AK4117_MQIT

/* AK4117_REG_RCS0 */
#define AK4117_UNLCK
#define AK4117_PAR
#define AK4117_AUTO
#define AK4117_V
#define AK4117_AUDION
#define AK4117_STC
#define AK4117_CINT
#define AK4117_QINT

/* AK4117_REG_RCS1 */
#define AK4117_DTSCD
#define AK4117_NPCM
#define AK4117_PEM
#define AK4117_FS3
#define AK4117_FS2
#define AK4117_FS1
#define AK4117_FS0
#define AK4117_FS_44100HZ
#define AK4117_FS_48000HZ
#define AK4117_FS_32000HZ
#define AK4117_FS_88200HZ
#define AK4117_FS_96000HZ
#define AK4117_FS_176400HZ
#define AK4117_FS_192000HZ

/* AK4117_REG_RCS2 */
#define AK4117_CCRC
#define AK4117_QCRC

/* flags for snd_ak4117_check_rate_and_errors() */
#define AK4117_CHECK_NO_STAT
#define AK4117_CHECK_NO_RATE

#define AK4117_CONTROLS

ak4117_write_t;
ak4117_read_t;

enum {};

struct ak4117 {};

int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t *write,
		      const unsigned char pgm[5], void *private_data, struct ak4117 **r_ak4117);
void snd_ak4117_reg_write(struct ak4117 *ak4117, unsigned char reg, unsigned char mask, unsigned char val);
void snd_ak4117_reinit(struct ak4117 *ak4117);
int snd_ak4117_build(struct ak4117 *ak4117, struct snd_pcm_substream *capture_substream);
int snd_ak4117_external_rate(struct ak4117 *ak4117);
int snd_ak4117_check_rate_and_errors(struct ak4117 *ak4117, unsigned int flags);

#endif /* __SOUND_AK4117_H */