SGTL500 Audio Codec

cancel
Showing results for 
Search instead for 
Did you mean: 

SGTL500 Audio Codec

172 Views
eoin_oconnell
Contributor I

I have an imx7 based solution from Toradex, the PCB has an SGTL5000 audio codec, I connect an analog microphone to the codec. I have observed that the audio codec on the imx7 colibri is trying to do some automatic gain control on my analog microphone input, does anybody know how to turn this off? The recording always starts with a pop where the SGTL5000 AGC is taking place on the first couple hundred samples. I tried disabling what they called AVC in register address 0x124 DAP_AVC_CTRL

0 Kudos
4 Replies

135 Views
eoin_oconnell
Contributor I

I have a series capacitor, it is built into imx7 toradex module. I am using the standard Linux driver, it is not very easy for me to poke individual bits in the registers ( but not impossible ).

The waveform I showed is from a recording, my problem is in recording not playback. How can I turn off all AGC features of the analog mic in?

0 Kudos

122 Views
reyes
NXP TechSupport
NXP TechSupport

Hi,

There is a known issue on the SGTL5000 on this Toradex board where there is Noise on Audio Output during Reset Cycle (https://docs.toradex.com/103543-colibri-imx7-errata.pdf), however, since the noise you are seen is in the input (MIC IN), then I don’t think this issue is related.

 

What I’m not fully understanding is how is it possible that the SGTL5000 is affecting this input signal right at the MIC_IN pin.  My understanding is that, on the SGTL5000 side, only the CHIP_MIC_CTRL 0x002A register can affect this input signal, and by default this register is 0x00, which means that the MIC Bias Output Impedance Adjustment is OFF, the MIC Bias Voltage Adjustment is set to 1.25V, and the MIC Amplifier Gain is set to 0dB. So, from my understanding, the SGTL5000 should not be affecting the signal.

 

However, I did a investigation and found a code of the SGTL5000 where it is mentioned:

// AVC has its own enable/disable bit

// you can use audioShield.autoVolumeEnable(0); to turn off AVC

 

Which, I believe is what you are looking for. You can find this at lines 43 and 44 of the code in the following link: https://github.com/PaulStoffregen/Audio/blob/master/examples/HardwareTesting/SGTL5000/dap_avc_agc/da...

 

I hope this helps.

Regards,

Jose

0 Kudos

171 Views
eoin_oconnell
Contributor I

This what the AGC looks like at the start of a recording

0 Kudos

150 Views
reyes
NXP TechSupport
NXP TechSupport

Hi,

From the SGTL5000 point of view, I have some comments/suggestion to avoid noise/pop audio anomalies:

  1. The microphone should be connected through a series coupling capacitor.
  2. All outputs (LINEOUT, HP_OUT, I2S_OUT) should be muted on power up. To avoid any pops/clicks, the outputs should remain muted during the chip initialization/configuration steps.
  3. Use CHIP_REF_CTRL bit 0 (SMALL_POP) to slows down the VAG ramp to reduce the startup pop.

Regards,

Jose

0 Kudos