This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello,
I want to know whether the TLV320AIC3204 speaker can output the ambient stereo collected from the microphone and the sound transmitted from the I2S of the MCU at the same time.
Now I open D4 bit of P0_R29, the speaker can output ambient stereo, but there is no sound transmitted from MCU. Turn off D4 bit of P0_R29, there will be sound transmitted from MCU, but there is no ambient stereo.
Hi Luo,
You are describing the correct operation of p0_R29. That is a loopback setting so it will override the output path.
To mix multiple sources you must use the output routing registers P1_R12 through P1_R15. Connect both the DAC reconstruction filter output and the Mixer Amplifier output (MAL/MAR). Be sure to also power up the MAL/MAR with P1_R9.
Best regards,
Jeff McPherson
Hi Jeff,
I configured the output routing channels MAL and MAR according to what you said, and used TLV320TI3204EVM-K to connect to the computer, but I could only hear the stereo environment sound of the microphone instead of the audio on the computer, and I could only hear the stereo environment sound when P0_R29 was on or off, could you help me analyze it, thank you!
############################################### # Software Reset ############################################### # # Select Page 0 w 30 00 00 # # Initialize the device through software reset w 30 01 01 # ############################################### ############################################### # Clock Settings # --------------------------------------------- #The input clock signal : MCLK = 11.2896 MHz,BLCK = 1.4 MHz, WCLK = 44.1 kHz ############################################### # # Select Page 0 w 30 00 00 # # NADC = 1, MADC = 2 w 30 12 81 82 # ############################################### ############################################### #AGC ############################################### w 30 00 00 w 30 57 7E w 30 56 F0 w 30 58 3E w 30 59 08 w 30 5A 32 w 30 5B 18 w 30 5C 06 w 30 5F 7E w 30 5E F0 w 30 60 3E w 30 61 08 w 30 62 32 w 30 63 18 w 30 64 06 ############################################### ############################################### # Enable Loopback Page 0 register 29 ############################################### # # Loopback enable for stereo audio data w 30 1D 10 # ############################################### ############################################### # Signal Processing Settings ############################################### # # Select Page 0 w 30 00 00 # # Set the ADC Mode to PRB_R1 w 30 3d 01 # ############################################### ############################################### # Initialize Codec ############################################### # # Select Page 1 w 30 00 01 # # Disable weak AVDD in presence of external # AVDD supply w 30 01 08 # # Enable Master Analog Power Control w 30 02 00 # # Select ADC PTM_R4 w 30 3d 00 # # Set the input powerup time to 3.1ms (for ADC) w 30 47 32 # # Set the REF charging time to 40ms w 30 7b 01 # ############################################### ############################################### # Recording Setup ############################################### # # Select Page 1 w 30 00 01 #MICBIAS w 30 33 50 # Route IN3L to LEFT_PGA_P with 20K input impedance w 30 34 08 # Route IN3R to LEFT_PGA_N with 20K input impedance w 30 36 08 # Route IN1R to Right_PGA_N with 20K input impedance w 30 37 80 # Route IN1L to Right_PGA_P with 20K input impedance w 30 39 20 # # Unmute Left MICPGA, Gain selection of 6dB to make channel gain 0dB # Register of 6dB with input impedance of 20K => Channel Gain of 0dB w 30 3b 00 # # Unmute Right MICPGA, Gain selection of 6dB to make channel gain 0dB # Register of 6dB with input impedance of 20K => Channel Gain of 0dB w 30 3c 00 # # Select Page 0 w 30 00 00 # # Power up LADC/RADC w 30 51 c0 # # Unmute LADC/RADC w 30 52 00 # ############################################### ############################################### # High Performance Stereo Playback # --------------------------------------------- # PowerTune mode PTM_P3 is used for high # performance 16-bit audio. For PTM_P4, # an external audio interface that provides # 20-bit audio is required. # # For normal USB Audio, no hardware change # is required. # # If using an external interface, SW2.4 and # SW2.5 of the USB-ModEVM must be set to # HI and clocks can be connected to J14 of # the USB-ModEVM. # # Audio is routed to both headphone and # line outputs. ############################################### ############################################### # Clock Settings # --------------------------------------------- # The input clock signal : MCLK = 11.2896 MHz,BLCK = 1.4 MHz, WCLK = 44.1 kHz: MCLK = 11.2896 MHz, ############################################### # # Select Page 0 w 30 00 00 # # NDAC = 1, MDAC = 2 w 30 0b 81 82 # ############################################### ############################################### # Signal Processing Settings ############################################### # # Select Page 0 # w 30 00 00 # # Set the DAC Mode to PRB_P8 w 30 3c 08 # ############################################### ############################################### # Playback Setup ############################################### # # Select Page 1 w 30 00 01 # # De-pop w 30 14 16 # # Route LDAC to HPL/HPR w 30 0c 02 01 # # Route RDAC to LOL/LOR w 30 0e 10 08 # # Power up HPL/HPR and LOL/LOR drivers w 30 09 3f # # Unmute HPL/HPR driver, 0dB Gain w 30 10 00 00 # # Unmute LOL/LOR driver, 0dB Gain w 30 12 00 00 # # Select Page 0 w 30 00 00 # # DAC => 0dB #w 30 41 00 00 # DRC w 30 41 FC FC w 30 44 73 w 30 45 00 w 30 46 B6 # # # Power up LDAC/RDAC w 30 3f d6 # # Unmute LDAC/RDAC w 30 40 00 # ###############################################
Hi Luo,
At line 189 and 192, you've connected the MAL and MAR to the HPL/R output but you have not connected the DAC output. This might be why you can only hear the microphone and not the computer audio. Try replacing the lines as follows:
# Route LDAC and MAL to HPL/HPR
w 30 0c 0a 01
#
# Route RDAC and MAR to LOL/LOR
w 30 0e 01 0a
Best regards,
Jeff McPherson