1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2a9d3cc48SClemens Ladisch /* register 1 */ 3a9d3cc48SClemens Ladisch #define CS4398_REV_MASK 0x07 4a9d3cc48SClemens Ladisch #define CS4398_PART_MASK 0xf8 5a9d3cc48SClemens Ladisch #define CS4398_PART_CS4398 0x70 6a9d3cc48SClemens Ladisch /* register 2 */ 7a9d3cc48SClemens Ladisch #define CS4398_FM_MASK 0x03 8a9d3cc48SClemens Ladisch #define CS4398_FM_SINGLE 0x00 9a9d3cc48SClemens Ladisch #define CS4398_FM_DOUBLE 0x01 10a9d3cc48SClemens Ladisch #define CS4398_FM_QUAD 0x02 11a9d3cc48SClemens Ladisch #define CS4398_FM_DSD 0x03 12a9d3cc48SClemens Ladisch #define CS4398_DEM_MASK 0x0c 13a9d3cc48SClemens Ladisch #define CS4398_DEM_NONE 0x00 14a9d3cc48SClemens Ladisch #define CS4398_DEM_44100 0x04 15a9d3cc48SClemens Ladisch #define CS4398_DEM_48000 0x08 16a9d3cc48SClemens Ladisch #define CS4398_DEM_32000 0x0c 17a9d3cc48SClemens Ladisch #define CS4398_DIF_MASK 0x70 18a9d3cc48SClemens Ladisch #define CS4398_DIF_LJUST 0x00 19a9d3cc48SClemens Ladisch #define CS4398_DIF_I2S 0x10 20a9d3cc48SClemens Ladisch #define CS4398_DIF_RJUST_16 0x20 21a9d3cc48SClemens Ladisch #define CS4398_DIF_RJUST_24 0x30 22a9d3cc48SClemens Ladisch #define CS4398_DIF_RJUST_20 0x40 23a9d3cc48SClemens Ladisch #define CS4398_DIF_RJUST_18 0x50 24a9d3cc48SClemens Ladisch #define CS4398_DSD_SRC 0x80 25a9d3cc48SClemens Ladisch /* register 3 */ 26a9d3cc48SClemens Ladisch #define CS4398_ATAPI_MASK 0x1f 27a9d3cc48SClemens Ladisch #define CS4398_ATAPI_B_MUTE 0x00 28a9d3cc48SClemens Ladisch #define CS4398_ATAPI_B_R 0x01 29a9d3cc48SClemens Ladisch #define CS4398_ATAPI_B_L 0x02 30a9d3cc48SClemens Ladisch #define CS4398_ATAPI_B_LR 0x03 31a9d3cc48SClemens Ladisch #define CS4398_ATAPI_A_MUTE 0x00 32a9d3cc48SClemens Ladisch #define CS4398_ATAPI_A_R 0x04 33a9d3cc48SClemens Ladisch #define CS4398_ATAPI_A_L 0x08 34a9d3cc48SClemens Ladisch #define CS4398_ATAPI_A_LR 0x0c 35a9d3cc48SClemens Ladisch #define CS4398_ATAPI_MIX_LR_VOL 0x10 36a9d3cc48SClemens Ladisch #define CS4398_INVERT_B 0x20 37a9d3cc48SClemens Ladisch #define CS4398_INVERT_A 0x40 38a9d3cc48SClemens Ladisch #define CS4398_VOL_B_EQ_A 0x80 39a9d3cc48SClemens Ladisch /* register 4 */ 40a9d3cc48SClemens Ladisch #define CS4398_MUTEP_MASK 0x03 41a9d3cc48SClemens Ladisch #define CS4398_MUTEP_AUTO 0x00 42a9d3cc48SClemens Ladisch #define CS4398_MUTEP_LOW 0x02 43a9d3cc48SClemens Ladisch #define CS4398_MUTEP_HIGH 0x03 44a9d3cc48SClemens Ladisch #define CS4398_MUTE_B 0x08 45a9d3cc48SClemens Ladisch #define CS4398_MUTE_A 0x10 46a9d3cc48SClemens Ladisch #define CS4398_MUTEC_A_EQ_B 0x20 47a9d3cc48SClemens Ladisch #define CS4398_DAMUTE 0x40 48a9d3cc48SClemens Ladisch #define CS4398_PAMUTE 0x80 49a9d3cc48SClemens Ladisch /* register 5 */ 50a9d3cc48SClemens Ladisch #define CS4398_VOL_A_MASK 0xff 51a9d3cc48SClemens Ladisch /* register 6 */ 52a9d3cc48SClemens Ladisch #define CS4398_VOL_B_MASK 0xff 53a9d3cc48SClemens Ladisch /* register 7 */ 54a9d3cc48SClemens Ladisch #define CS4398_DIR_DSD 0x01 55a9d3cc48SClemens Ladisch #define CS4398_FILT_SEL 0x04 56a9d3cc48SClemens Ladisch #define CS4398_RMP_DN 0x10 57a9d3cc48SClemens Ladisch #define CS4398_RMP_UP 0x20 58a9d3cc48SClemens Ladisch #define CS4398_ZERO_CROSS 0x40 59a9d3cc48SClemens Ladisch #define CS4398_SOFT_RAMP 0x80 60a9d3cc48SClemens Ladisch /* register 8 */ 61a9d3cc48SClemens Ladisch #define CS4398_MCLKDIV3 0x08 62a9d3cc48SClemens Ladisch #define CS4398_MCLKDIV2 0x10 63a9d3cc48SClemens Ladisch #define CS4398_FREEZE 0x20 64a9d3cc48SClemens Ladisch #define CS4398_CPEN 0x40 65a9d3cc48SClemens Ladisch #define CS4398_PDN 0x80 66a9d3cc48SClemens Ladisch /* register 9 */ 67a9d3cc48SClemens Ladisch #define CS4398_DSD_PM_EN 0x01 68a9d3cc48SClemens Ladisch #define CS4398_DSD_PM_MODE 0x02 69a9d3cc48SClemens Ladisch #define CS4398_INVALID_DSD 0x04 70a9d3cc48SClemens Ladisch #define CS4398_STATIC_DSD 0x08 71