linux/sound/soc/codecs/cs4349.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * ALSA SoC CS4349 codec driver
 *
 * Copyright 2015 Cirrus Logic, Inc.
 *
 * Author: Tim Howe <[email protected]>
 */

#ifndef __CS4349_H__
#define __CS4349_H__

/* CS4349 registers addresses */
#define CS4349_CHIPID
#define CS4349_MODE
#define CS4349_VMI
#define CS4349_MUTE
#define CS4349_VOLA
#define CS4349_VOLB
#define CS4349_RMPFLT
#define CS4349_MISC

#define CS4349_I2C_INCR


/* Device and Revision ID */
#define CS4349_REVA
#define CS4349_REVB
#define CS4349_REVC2


/* PDN_DONE Poll Maximum
 * If soft ramp is set it will take much longer to power down
 * the system.
 */
#define PDN_POLL_MAX


/* Bitfield Definitions */

/* CS4349_MODE */
/* (Digital Interface Format, De-Emphasis Control, Functional Mode */
#define DIF2
#define DIF1
#define DIF0
#define DEM1
#define DEM0
#define FM1
#define DIF_LEFT_JST
#define DIF_I2S
#define DIF_RGHT_JST16
#define DIF_RGHT_JST24
#define DIF_TDM0
#define DIF_TDM1
#define DIF_TDM2
#define DIF_TDM3
#define DIF_MASK
#define MODE_FORMAT(x)
#define DEM_MASK
#define NO_DEM
#define DEM_441
#define DEM_48K
#define DEM_32K
#define FM_AUTO
#define FM_SNGL
#define FM_DBL
#define FM_QUAD
#define FM_SNGL_MIN
#define FM_SNGL_MAX
#define FM_DBL_MAX
#define FM_QUAD_MAX
#define FM_MASK

/* CS4349_VMI (VMI = Volume, Mixing and Inversion Controls) */
#define VOLBISA
#define VOLAISB
/* INVERT_A only available for Left Jstfd, Right Jstfd16 and Right Jstfd24 */
#define INVERT_A
/* INVERT_B only available for Left Jstfd, Right Jstfd16 and Right Jstfd24 */
#define INVERT_B
#define ATAPI3
#define ATAPI2
#define ATAPI1
#define ATAPI0
#define MUTEAB
#define MUTEA_RIGHTB
#define MUTEA_LEFTB
#define MUTEA_SUMLRDIV2B
#define RIGHTA_MUTEB
#define RIGHTA_RIGHTB
#define RIGHTA_LEFTB
#define RIGHTA_SUMLRDIV2B
#define LEFTA_MUTEB
#define LEFTA_RIGHTB
#define LEFTA_LEFTB
#define LEFTA_SUMLRDIV2B
#define SUMLRDIV2A_MUTEB
#define SUMLRDIV2A_RIGHTB
#define SUMLRDIV2A_LEFTB
#define SUMLRDIV2_AB
#define CHMIX_MASK

/* CS4349_MUTE */
#define AUTOMUTE
#define MUTEC_AB
#define MUTE_A
#define MUTE_B
#define MUTE_AB_MASK

/* CS4349_RMPFLT (Ramp and Filter Control) */
#define SCZ1
#define SCZ0
#define RMP_UP
#define RMP_DN
#define FILT_SEL
#define IMMDT_CHNG
#define ZEROCRSS
#define SOFT_RMP
#define SFTRMP_ZEROCRSS
#define SR_ZC_MASK

/* CS4349_MISC */
#define PWR_DWN
#define FREEZE
#define POPG_EN

#endif	/* __CS4349_H__ */