ADAU1451 Multirate processing and clocks/start pulse/sampling rate settings problem
Hi,
I’m having some troubles with multirate processing on the ADAU1451 (scheme below).
I want to receive :
1) audio data at 48 kHz
2) have a first stage of processing at 48 kHz
3) then upsample the audio at 192 kHz
4) do some more processing at 192 kHz
5) then output the audio data at 192 kHz.
I have two audio input sources : one coming from an ADC and another from the SPDIF Rx. Both sources are input at 48 kHz (I use two stereo ASRC, configured in the routing matrix pannel). The audio sources can be switched, and the chosen source is copied onto the SPDIF Tx.
The DSP sample rate is set to 48 kHz, as well as the start pulse. Input clocks are set to 48 kHz (clock generator 1) and output clocks to 192 kHz (clock generator 2).
My problem is that with this configuration, the audio does not output at 192 kHz as it should be, but it outputs at 48 kHz and so aliasing appears.
If I set the start pulse at 192 kHz (BaseFs x 4), the audio outputs at 192 kHz, but there is a problem with the SPDIF Tx which also outputs a signal at 192 kHz instead of 48 kHz (and then aliasing appears again because each audio sample is duplicated 4 times like if it were upsampled but not filtered).
I think I may have a misunderstanding with the way multirate processing should be done.
Could you help me setting the hardware configuration (sample rate of the DSP, start pulse, clocks) to :
Receive a signal at 48 kHz from ADC or SPDIF Rx
Output the signal at 192 kHz after multirate processing (one stage at 48 kHz and the other at 192 kHz)
Copy my input signal to the SPDIF Tx at 48 kHz
Below is a simplified version of my program.
Thanks in advance for your help.
Edit Notes
space
[edited by: ClementG at 9:16 AM (GMT -4) on 9 Apr 2021]
Audio Signal Processors
dsp
adau1451
sigmastudio
adau145x
SigmaDSP Audio Processors
Show More
Hello Clement,
Yes, after upsampling you would need to filter because the new samples are either having the samples repeated ( zero order hold) or add zeros ( zero insertion). There are options to select this in the GUI by right clicking on it. However, there are several other issues.
First, the SPDIF output rate will follow the DSP Start Pulse setting. So the data being sent to the SPDIF output will need to be at that rate or samples will be duplicated.
Then the multirate processing has to be done a certain way. The DSP core must be running at the highest rate. Then the block processing style of interrupts is used to run the slower rate once every X times the higher rate program is executed. But, I do not think you need to do this at all.
Standing back and looking at your application, it makes no sense to go up to 192kHz in the core. You are not processing any audio that was sampled at that rate. All your input is at 48kHz so there is no audio information above 24kHz in the audio. So going up to 192kHz will not add any information or any fidelity of any kind. All it will do is use more MIPS for no gain.
So I am assuming there is a reason why you want the output of the DSP to be at 192kHz to perhaps integrate into another system? So run everything in the DSP at 48kHz then use the ASRC on the output side of the DSP core going to the serial ports. Then run the serial port at 192kHz. The ASRC will filter that data properly and take care of all that using no MIPS at all. It is a hardware based feature.
Zip up and attach your project once you have made the changes. I can check the settings.
Dave T
Hello Dave,
Thanks for your answer.
To add more precision to the description of our problem, I need to use the multirate processing because I'm targeting ultrasonic applications. Thereby, my project contains :
- A first processing stage for input sounds in the audible domain, with a 48kHz sample rate.
- A second processing stage where the first processed input sound is used to generate and monitor an ultrasonic signal between 30kHz and 80kHz, hence the need to use 192kHz sample rate.
My output is the ultrasonic signal.
From your explanation, I understand that the DSP core should run at 192kHz (Fs = 192kHz), the ASRC should be used to input my audio at 192kHz, downsample it to 48kHz in the first processing stage, then upsample it at 192kHz for my ultraprocessing.
Is the output ASRC necessary if the DSP core rate is set to 192kHz ?
With this setting, is it possible to use a start pulse at 48kHz s I can use a SPDIF Tx at the same rate ?
You can download a simplified project here. It is not representative of the real processing we are doing for the audio and ultrasonic part.
In this project, we use an oscillator to generate a 40kHz tone. As I was explaining in my first message, when we used a DSP core rate at 48kHz, and upsampling the signal to 192kHz, the 40kHz ultrasonic tone was aliased to 10kHz. The only possiblity to have an oscilllator outputing a 40kHz tone was to set the start pulse to BaseFs * 4 (192kHz). But then, the SPDIF output was also at 192kHz, which is not suported by the hardware.
Thanks for you help,
Clement
Hello Support,
Any update on my issue ?
I couldn't find a way to acheive what we want to do...
We found a workaround that can suit us for testings but we can't get a working product with all the features described previously.
Clement
Please log in to reply.
