I'm trying to configure the codec such that data from my PC is played to the headset speaker. Microphone data is then sent from the headset mic to the PC.
What I'm experiencing is audio from the PC not only plays in the headset but is also looped back to the ADC. The PC gets the microphone plus the audio playing on the PC. By the diagrams and user guides I don't see how this is possible.
There is no analog coupling int he circuit. Mic is not simply picking up on the speaker output which I validated via scope as well as physically disconnecting the speaker output.
The mic works just fine, as does the speaker individually. Just not together. I want digital audio data from the PC in on DIN1 and Mic and mic ONLY on Dout1. My configuration is listed below. What am I doing wrong?
#########################################################################################
# Headphone Playback, Setup A, High Performance, High Output Power, 48kHz Sampling Rate
# AVDDx_18, HVDD_18, CPVDD_18 = 1.8V; IOVDDx, MICBIAS_VDD, RECVDD_33 = 3.3V;
# SVDD, SPK_V = 5V, DVdd = 1.8V
# MCLK = 12.288MHz
# PLL Disabled, DOSR = 128, PRB_P1
# Audio Serial Interface #1 used with WCLK & BCLK as inputs to the device
#########################################################################################
#########################################################################################
# Software Reset
#########################################################################################
w 30 00 00 # Initialize to Page 0
w 30 7f 00 # Initialize to Book 0
w 30 01 01 # Initialize the device through software reset
d 1 # Delay 1 millisecond
#########################################################################################
# FIFO Configuration
#########################################################################################
w 30 00 00 # Select Page 0
w 30 7f 78 # Select Book 120
w 30 32 80 # Enable DAC FIFO
w 30 7f 64 # Select Book 100
w 30 32 80 # Enable ADC FIFO
w 30 7f 00 # Select Book 0
#########################################################################################
# Power and Analog Configuration
#########################################################################################
w 30 00 01 # Select Page 1
w 30 01 00 # Disable weak AVDD to DVDD connection, make analog supplies available
w 30 7a 01 # REF charging time = 40ms
w 30 21 28 # CP divider = 4, 500kHz, Runs off 8MHz oscillator
w 30 23 10 # Charge Pump to power up on Ground-Centered Headphone Power-up
w 30 08 00 # Full chip CM = 0.9V (Setup A)
w 30 03 00 # PTM_P3, High Performance (Setup A)
w 30 04 00 # PTM_P3, High Performance (Setup A)
#########################################################################################
# Clock configuration
# MCLK = 12.288 MHz, BCLK = 3.072 MHz, WCLK = 48 kHz (slave)
#########################################################################################
w 30 00 00 # Select Page 0
w 30 04 00 # Set DAC_CLKIN as MCLK -- default not mandatory to program
w 30 0b 81 # NDAC = 1
w 30 0c 82 # MDAC = 2 (Setup A)
w 30 0d 00 # Program the OSR of DAC to 128 to get
w 30 0e 80 # DAC_FS = DAC_MOD_CLK / DOSR = 6.144MHz / 128 = 48kHz
#########################################################################################
# Audio Serial Interface Routing Configuration - Audio Serial Interface #1
# ASI #1 playback
#########################################################################################
w 30 00 04 # Select Page 4
w 30 01 00 # I2S mode, 16-bit
w 30 0a 00 # Route ASI#1 WCLK and BCLK to WCLK1 pin and BCLK1 pin
w 30 08 50 # Left Channel DAC and Primary ASI's Right channel data to
# Right Channel DAC
#########################################################################################
# ADC Input Channel Configuration --- IN1L
#########################################################################################
w 30 00 01 # Select Page 1
w 30 08 00 # Set the input common mode to 0.9V
w 30 33 40 # Mic Bias enabled, Source = Avdd, 1.62V
w 30 34 80 # Route IN1L and CM1 to LEFT ADCPGA with 20K input impedance
w 30 36 80
w 30 3B 3C # Left Channel Analog ADC PGA = 30 dB
w 30 3D 00 # ADC Analog programmed for PTM_R4
w 30 00 00 # Select Page 0
w 30 51 C0 # Power-up ADC Channel
w 30 52 00 # Unmute ADC channel and Fine Gain = 0dB
#########################################################################################
# Signal Processing Settings
#########################################################################################
w 30 00 00 # Select Page 0
w 30 3c 01 # Set the DAC Mode to PRB_P1 (Setup A)
#########################################################################################
# Output Channel Configuration
#########################################################################################
w 30 00 00 # Select Page 0
w 30 3f c0 # Power up the Left and Right DAC Channels with route the Primary
# ASI's left channel data to Left DAC and right channel to Right DAC
w 30 40 00 # Unmute the DAC digital volume control
w 30 00 01 # Select Page 1
w 30 09 00 # HP Sizing = 100% (Setup A)
w 30 1f 85 # Headphone in Ground-centered Mode, HPL Gain=5dB (Setup A)
w 30 20 85 # HPR To have same gain as HPL, set to 5dB (Setup A)
w 30 1b 33 # Enable DAC to HPL/R and power-up HPL/R
#########################################################################################
# ADC Input Channel Configuration --- IN1L
#########################################################################################
w 30 00 01 # Select Page 1
w 30 08 00 # Set the input common mode to 0.9V
w 30 33 40 # Mic Bias enabled, Source = Avdd, 1.62V
w 30 34 80 # Route IN1L and CM1 to LEFT ADCPGA with 20K input impedance
w 30 36 80
w 30 3B 3C # Left Channel Analog ADC PGA = 30 dB
w 30 3D 00 # ADC Analog programmed for PTM_R4
w 30 00 00 # Select Page 0
w 30 51 C0 # Power-up ADC Channel
w 30 52 00 # Unmute ADC channel and Fine Gain = 0dB