ADAU1761 Safeload or Block Write
Hello,
We are developing a product using the ADAU1761 as the main audio DSP, and we have a microcontroller with on-board flash which will boot the ADAU1761 and write to its parameter ram as necessary to control gain blocks, muxes, etc. in real time. I have been using the Capture Window in SigmaStudio to determine the addresses and values that should be written from the MCU over I2C, but I am wondering whether they should be Safeload written or Block written. I have been looking in the Capture Window to see how it is written (with the DSP is running and processing audio), but is this the correct way to determine this? For instance, if I want to change the value of a Linear Gain block, the capture window shows it as a Block write, but shouldn't it be a Safeload write? Here's an excerpt from the datasheet which suggests the same thing:
Address 0x0007 designates the number of words to be written into the parameter RAM during the safeload. A biquad filter uses all five safeload data addresses. A simple mono gain cell uses only one safeload data address. Writing to Address 0x0007 also triggers the safeload write to occur in the next audio frame.
Thank you,
- Jeremy
Audio Signal Processors
microcontroller
block_write
safeload_write
SigmaDSP Audio Processors
adau1761
Show More
In essence, you can write any parameters as safeload or block - either way, the data will get there. Writing a single word (like a gain cell) will have no potential side-effects because only one program calculation uses that parameter per frame.
An IIR biquad filter, on the other hand, has 5 coefficients used in its calculations. The calculations utilizing those coefficients are spread over several processing cycles (and indeed over several frames due to the delays involved). By doing a standard control port write, it's possible that you could update some coefficients on one audio frame and the remaining coefficients on the following frame. This means that for at least one frame, the filter will have unanticipated or unstable behavior. In the worst case, this would basically cause a small click on the audio outputs.
In practice, block writes should only be used for updating parameters that are not directly tied to other parameters, OR for downloading large chunks of data (i.e. in the initialization stage, when the audio should be muted anyway). All other parameter updates should use safeload.
SigmaStudio does not follow this rule 100% of the time - I will point this out to the software team.
Message was edited by: BrettG - made a few clarifications.
BrettG,
OK, thank you for the clarification. As it turns out, I don't think I will have to safeload any parameters, since I am only changing muxes and gain blocks, one at any given time.
Thanks,
- Jeremy
This question has been closed by the EZ team and is assumed answered.
Please log in to reply.