Author Topic: Help with digital audio processing project (ALC5616 Codec + STM32F4)  (Read 5248 times)

0 Members and 1 Guest are viewing this topic.

Offline giovanicauzziTopic starter

  • Newbie
  • Posts: 1
  • Country: br
Hello guys,

I'm developing a board to process digital audio (see block diagram attached). The board has a STM32F405 and a Realtek ALC5616 audio Codec.
Between both ICs, there is a I2C interface for Codec registers configuration and a I2S interface of full-duplex audio data transfering.
The I2S is configured as described bellow:
- Sampling Frequency: 48kHz
- 16bits stereo data
- STM32 as master, generating MCLK 12.5MHz (48.828kHz * 256)

The problem that I have is that the Codec always return the same audio data via I2S, 9353 for one channel and 28061 for the other.
(See the logic analyzer print screen attached)
Even if I ground the input, this values doesn't change.
I review the audio path inside the Codec several times, making sure that both single ended inputs are reaching the internal ADC.

I want to know if some of you already developed something with an audio Codec and could share some common issues or probable causes for this kind of problem.
I also attached the circuit schematic for the Codec.
 
 

Offline Amirebr

  • Newbie
  • Posts: 1
  • Country: ir
Re: Help with digital audio processing project (ALC5616 Codec + STM32F4)
« Reply #1 on: August 04, 2026, 04:08:09 am »
Hello

I have a hardware setup like you
 

Offline dietert1

  • Super Contributor
  • ***
  • Posts: 3010
  • Country: br
    • CADT Homepage
Re: Help with digital audio processing project (ALC5616 Codec + STM32F4)
« Reply #2 on: September 15, 2026, 12:28:41 pm »
The codec and the MCU are complex enough, so you cannot expect this to work from the start. This requires work.
Important steps to get things running:
- Check supply voltages.
- Use I2C to read and dump codec registers. Likely there are some patterns to match the description of the codec chip, for example a silicon revision number or so.
- Once this works, try to modify configuration via I2C and read back to see whether configuration works as expected.
- Write realtime trace code to verify audio DMA operation (number of blocks passed to/from application, number of interrupts, error counts ..)
- Verify audio output. Does audio DAC perform as expected?
- What is required as setup for audio recording? Maybe the codec includes some audio routing, for example routing back I2S output data instead of ADC audio. Some codecs have mixers that need to be configured.

In the past i did a lot of this work and know it can be quite tedious. Good Luck!

Regards, Dieter
 
The following users thanked this post: pardo-bsso


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->