ΣSigmaStudio Ask AI Русский Log in

Need help for ASRC lock noise and GPIO output

SigmaDSP & SigmaStudio PowerPan Nov 9, 2021 00:00 7 replies Original on forum ↗
Thread Summary

Thread Summary

The user encountered noise issues with the ADAU1452 ASRC when switching input sources or changing sample rates. Dave T provided a solution using a MUX to mute audio when the ASRC is not locked, and suggested monitoring the ASRC lock bit with a counter or exporting it to a GPIO for real-time observation. The user confirmed the solution works well, with occasional lock issues resolved by stopping continuous I2C reads.
AI Generated Content
Subscribe
PowerPan Question
Nov 9, 2021 00:00

Hi

my design has 5 input channels to ASRC and I figure out that sometimes noise coming out when ASRC is locking and I searched the answers to solve this problem and I found the only way out but sometimes it doesn't work. especially there are multi-channels input at the same time, then toggle one source to switch on/off there is the noise from ASRC locking.

any idea how to make it better ? and some channel will often change its sample rate.

so I wanna export the lock bit to GPIO but I got not clue, could anybody show me how ?

DaveThib Reply
Nov 9, 2021 00:00

Hello Power Pan,

I had worked up this project several years ago to monitor the ASRC lock bit and mute the audio when it is not locked.

The ASRC can be setup to mute when the sample rate is changed and that works fairly well. The issues are when clocks are lost or when they have been lost for a while then you relock the audio in the ASRC memory is old. When you power up it is random numbers so that is also a problem.

You will have to adapt this program to respond to the correct ASRC bit for the ASRC that is being used.

I attached two versions. A simpler version that only uses a MUX to switch that has no slew. The second one uses a slewed volume control and it also has a delay so the ASRC lock detect will be detected before the audio has a chance to make any noises.

You can also export this lock detect control signal over to a GPIO if you like. But it is best to just let the DSP handle it.

ADAU1452 ASRC Lock Detect to Mute Simple Example.dspproj

4213.ADAU1452 ASRC Lock Detect Example.zip

Dave T

PowerPan Reply
Nov 10, 2021 00:00

Hello David

many thanks for your kind and prompt reply, will try and send the feed back here ASAP.

actually, I don't really need the lock bit to export when the ASRC auto mute could work properly.

Best regards,

Power Pan

PowerPan Reply
Nov 10, 2021 00:00

Tested, and it works very well. but occasionally it will unlock unexpectedly, don't know why.

DaveThib Reply
Nov 10, 2021 00:00

Hello PowerPan,

I suggest you look at the waveforms on a scope. The BCLK, LRCLK and SDATA and see if the waveform has signal integrity issues. This can cause the ASRC to think the sampling rate has changed and trigger the mute.

This post might help you in setting up the scope properly and what to expect.

(+) How to Take Meaningful Screenshots of I2S Audio Signals - Q&A - Audio - EngineerZone (analog.com)

So that is the first place to look.

One question: What is the sampling rate that is coming into the ASRC?

Dave T

PowerPan Reply
Nov 10, 2021 00:00

when set DSP READ module as continuous read back, sometimes it goes wrong. if use manual click to read, it's fine.

DaveThib Reply
Nov 11, 2021 00:00

Hello PowerPan,

You may be having some issues with the SPI signal when reading or with USB delays. I suggest you setup a counter in the DSP program to count the number of times you lose lock. If these events are happening quickly then you can miss it easily with a manual read or even a continuous read. That only happens every 10ms which is a long time to the DSP.

I will attach a program that shows a few different methods for counting pulses. You can do something like this and see what you find.

6013.ADAU1452 GPIO Pulse length and pulse toggle counter.dspproj

Also, you could output the result of the ASRC lock bit over to a GPIO and watch it on a scope. These are all real time methods to monitor what is going on in the DSP rather than a readback. A readback is not very good for possibly sample length events.

Dave T

PowerPan Reply
Nov 12, 2021 00:00

Hi Dave

thanks for your suggestion. I'm using I2C, not SPI. after I stop continuous read, everything goes fine. that's why I reply so late cause I keep testing this for at lease 24 hours.

I might not get into something that's hard to catch. cause the problem is solved. so many works line up to finish.

Best regards,

Power Pan