# Setup script for TLV320AIC3204 # # I2C device address is assumed to be 0x30 # # Command format consists of: # # w aa dd # w = I2C write # aa = hex register address # dd = hex data to be written # ############################################### # Software Reset ############################################### # # Select Page 0 w 00 00 # # Initialize the device through software reset w 01 01 # ############################################### ############################################### # Configure Power Supplies ############################################### # # Select Page 1 w 00 01 # # Power up AVDD LDO w 02 a9 # # Disable weak AVDD in presence of external # AVDD supply w 01 08 # # Enable Master Analog Power Control # Power up AVDD LDO w 02 a1 # # Set the input power-up time to 3.1ms (for ADC) w 47 32 # # Set the REF charging time to 40ms w 7b 01 # ############################################### ############################################### # Clock and Interface Settings # --------------------------------------------- # The codec receives: MCLK = 12MHz, # The codec outputs: # - BLCK = 3.072 MHz # - WCLK = 48 kHz ############################################### # # Select Page 0 w 00 00 # # PLL_clkin = MCLK, codec_clkin = PLL_CLK w 04 03 # # PLL on, P = 1, R = 1 w 05 91 # # J = 7 w 06 07 # # D = 560 (MSB) w 07 02 # # D (LSB) w 08 30 # # NDAC = 5, divider powered on w 0b 85 # # MDAC = 3, divider powered on w 0c 83 # # DOSR = 128 (MSB) w 0d 00 # # DOSR (LSB) w 0e 80 # # NADC = 5, divider powered on w 12 85 # # MADC = 3, divider powered on w 13 83 # # AOSR = 128 w 14 80 # # BDIV_CLKIN = DAC_MOD_CLK w 1d 01 # # BCLK N = 2, powered w 1e 82 # # BCLK/WCLK are outputs w 1b 0c # ############################################### ############################################### # Configure Processing Blocks ############################################### # # Select Page 0 w 00 00 # # PRB_P2 selected w 3c 02 # # PRB_R2 selected w 3d 02 # ############################################### ############################################### # Configure ADC Channel ############################################### # # Select Page 1 w 00 01 # # Route IN1L to LEFT_P with 20K input impedance w 34 80 # # Route CM1L to LEFT_M with 20K input impedance w 36 80 # # Route IN1R to RIGHT_P with 20K input impedance w 37 80 # # Route CM1R to RIGHT_M with 20K input impedance w 39 80 #Setup microphone input #w 34 10 #w 36 40 #w 37 10 #w 39 40 # MicPGA_L = 0dB w 3b 00 # # MicPGA_R = 0dB w 3c 00 # # Select Page 0 w 00 00 # # Power up LADC/RADC w 51 c0 # # Unmute LADC/RADC w 52 00 # ############################################### ############################################### # Configure DAC Channel ############################################### # # Select Page 1 w 00 01 # # De-pop: 5 time constants, 6k resistance w 14 25 # # Route LDAC/RDAC to HPL/HPR w 0c 08 w 0d 08 # # Route LDAC/RDAC to LOL/LOR w 0e 08 w 0f 08 # # Power up HPL/HPR/LOL/LOR w 09 3c # # Unmute HPL driver, 0dB Gain w 10 00 # # Unmute HPR driver, 0dB Gain w 11 00 # # Unmute LOL driver, 0dB Gain w 12 00 # # Unmute LOR driver, 0dB Gain w 13 00 # # # Select Page 0 w 00 00 # # LDAC => 0dB w 41 00 # # RDAC => 0dB w 42 00 # # Power up LDAC/RDAC w 3f d6 # # Unmute LDAC/RDAC w 40 00 # ###############################################