1a1533d94SBarry Song /* 2a1533d94SBarry Song * AD193X Audio Codec driver 3a1533d94SBarry Song * 4a1533d94SBarry Song * Copyright 2010 Analog Devices Inc. 5a1533d94SBarry Song * 6a1533d94SBarry Song * Licensed under the GPL-2 or later. 7a1533d94SBarry Song */ 8a1533d94SBarry Song 9a1533d94SBarry Song #ifndef __AD193X_H__ 10a1533d94SBarry Song #define __AD193X_H__ 11a1533d94SBarry Song 12a1533d94SBarry Song #define AD193X_PLL_CLK_CTRL0 0x800 13a1533d94SBarry Song #define AD193X_PLL_POWERDOWN 0x01 14fab90aa4SBarry Song #define AD193X_PLL_INPUT_MASK (~0x6) 15fab90aa4SBarry Song #define AD193X_PLL_INPUT_256 (0 << 1) 16fab90aa4SBarry Song #define AD193X_PLL_INPUT_384 (1 << 1) 17fab90aa4SBarry Song #define AD193X_PLL_INPUT_512 (2 << 1) 18fab90aa4SBarry Song #define AD193X_PLL_INPUT_768 (3 << 1) 19a1533d94SBarry Song #define AD193X_PLL_CLK_CTRL1 0x801 20a1533d94SBarry Song #define AD193X_DAC_CTRL0 0x802 21a1533d94SBarry Song #define AD193X_DAC_POWERDOWN 0x01 22a1533d94SBarry Song #define AD193X_DAC_SERFMT_MASK 0xC0 23a1533d94SBarry Song #define AD193X_DAC_SERFMT_STEREO (0 << 6) 24a1533d94SBarry Song #define AD193X_DAC_SERFMT_TDM (1 << 6) 25a1533d94SBarry Song #define AD193X_DAC_CTRL1 0x803 26a1533d94SBarry Song #define AD193X_DAC_2_CHANNELS 0 27a1533d94SBarry Song #define AD193X_DAC_4_CHANNELS 1 28a1533d94SBarry Song #define AD193X_DAC_8_CHANNELS 2 29a1533d94SBarry Song #define AD193X_DAC_16_CHANNELS 3 30a1533d94SBarry Song #define AD193X_DAC_CHAN_SHFT 1 31a1533d94SBarry Song #define AD193X_DAC_CHAN_MASK (3 << AD193X_DAC_CHAN_SHFT) 32a1533d94SBarry Song #define AD193X_DAC_LCR_MASTER (1 << 4) 33a1533d94SBarry Song #define AD193X_DAC_BCLK_MASTER (1 << 5) 34a1533d94SBarry Song #define AD193X_DAC_LEFT_HIGH (1 << 3) 35a1533d94SBarry Song #define AD193X_DAC_BCLK_INV (1 << 7) 36a1533d94SBarry Song #define AD193X_DAC_CTRL2 0x804 37a1533d94SBarry Song #define AD193X_DAC_WORD_LEN_MASK 0xC 38a1533d94SBarry Song #define AD193X_DAC_MASTER_MUTE 1 39a1533d94SBarry Song #define AD193X_DAC_CHNL_MUTE 0x805 40a1533d94SBarry Song #define AD193X_DACL1_MUTE 0 41a1533d94SBarry Song #define AD193X_DACR1_MUTE 1 42a1533d94SBarry Song #define AD193X_DACL2_MUTE 2 43a1533d94SBarry Song #define AD193X_DACR2_MUTE 3 44a1533d94SBarry Song #define AD193X_DACL3_MUTE 4 45a1533d94SBarry Song #define AD193X_DACR3_MUTE 5 46a1533d94SBarry Song #define AD193X_DACL4_MUTE 6 47a1533d94SBarry Song #define AD193X_DACR4_MUTE 7 48a1533d94SBarry Song #define AD193X_DAC_L1_VOL 0x806 49a1533d94SBarry Song #define AD193X_DAC_R1_VOL 0x807 50a1533d94SBarry Song #define AD193X_DAC_L2_VOL 0x808 51a1533d94SBarry Song #define AD193X_DAC_R2_VOL 0x809 52a1533d94SBarry Song #define AD193X_DAC_L3_VOL 0x80a 53a1533d94SBarry Song #define AD193X_DAC_R3_VOL 0x80b 54a1533d94SBarry Song #define AD193X_DAC_L4_VOL 0x80c 55a1533d94SBarry Song #define AD193X_DAC_R4_VOL 0x80d 56a1533d94SBarry Song #define AD193X_ADC_CTRL0 0x80e 57a1533d94SBarry Song #define AD193X_ADC_POWERDOWN 0x01 58a1533d94SBarry Song #define AD193X_ADC_HIGHPASS_FILTER 1 59a1533d94SBarry Song #define AD193X_ADCL1_MUTE 2 60a1533d94SBarry Song #define AD193X_ADCR1_MUTE 3 61a1533d94SBarry Song #define AD193X_ADCL2_MUTE 4 62a1533d94SBarry Song #define AD193X_ADCR2_MUTE 5 63a1533d94SBarry Song #define AD193X_ADC_CTRL1 0x80f 64a1533d94SBarry Song #define AD193X_ADC_SERFMT_MASK 0x60 65a1533d94SBarry Song #define AD193X_ADC_SERFMT_STEREO (0 << 5) 66a1533d94SBarry Song #define AD193X_ADC_SERFMT_TDM (1 << 2) 67a1533d94SBarry Song #define AD193X_ADC_SERFMT_AUX (2 << 5) 68a1533d94SBarry Song #define AD193X_ADC_WORD_LEN_MASK 0x3 69a1533d94SBarry Song #define AD193X_ADC_CTRL2 0x810 70a1533d94SBarry Song #define AD193X_ADC_2_CHANNELS 0 71a1533d94SBarry Song #define AD193X_ADC_4_CHANNELS 1 72a1533d94SBarry Song #define AD193X_ADC_8_CHANNELS 2 73a1533d94SBarry Song #define AD193X_ADC_16_CHANNELS 3 74a1533d94SBarry Song #define AD193X_ADC_CHAN_SHFT 4 75a1533d94SBarry Song #define AD193X_ADC_CHAN_MASK (3 << AD193X_ADC_CHAN_SHFT) 76a1533d94SBarry Song #define AD193X_ADC_LCR_MASTER (1 << 3) 77a1533d94SBarry Song #define AD193X_ADC_BCLK_MASTER (1 << 6) 78a1533d94SBarry Song #define AD193X_ADC_LEFT_HIGH (1 << 2) 79a1533d94SBarry Song #define AD193X_ADC_BCLK_INV (1 << 1) 80a1533d94SBarry Song 81a1533d94SBarry Song #define AD193X_NUM_REGS 17 82a1533d94SBarry Song 83a1533d94SBarry Song extern struct snd_soc_dai ad193x_dai; 84a1533d94SBarry Song extern struct snd_soc_codec_device soc_codec_dev_ad193x; 85a1533d94SBarry Song 86a1533d94SBarry Song #endif 87