ADAU1452 Safeload Poping
Hello I using a rather large ADAU program integrated into a board with a core processor running linux. At run time we load the device and expose the DSP parameters via a web interface. We origionaly just loaded the parameters to their coefficient address given in the code export but this was causing a pop when updating parameters with audio playing. I have since updated to load the parameters via safeload. In the driver i write to the safeload address given by the code export, MOD_SAFELOADMODULE_DATA_SAFELOAD0_ADDR, then write to the address location, MOD_SAFELOADMODULE_ADDRESS_SAFELOAD_ADDR, and finally i write to the MOD_SAFELOADMODULE_NUM_SAFELOAD_ADDR. We are doing this 1 parameter at a time as it is just simpler using an IOCTRL interface in the linux driver. After the write I added a 40uS delay to make sure a new write does not come in on top of the current write which should be more then enough time for the 48kHz rate. The coefficients seem to be updating since i can change volume and hear noticeable changes in the EQ but i am getting a pop still on parameter updates. I also tried the default load address from the data sheet with the same results. Also this is over a SPI interface and each write is separate with the chip select for data, address and number being separate writes. Any help would be appreciated. Below is the write source code.
int dsp_safeloadwriteparam(u8 devaddr, u16 addr, u32 data )
{
uint32_t addr32 = 0;
int ret = -1;
/* Set Address */
addr32 = addr;
//printk("Safeload Param\n");
/* Write Data to safeload address */
dsp_writeparam(devaddr, MOD_SAFELOADMODULE_DATA_SAFELOAD0_ADDR, data);
/* Write address for data to be written to */
dsp_writeparam(devaddr, MOD_SAFELOADMODULE_ADDRESS_SAFELOAD_ADDR, addr32);
/* Write number of params to be written */
ret = dsp_writeparam(devaddr, MOD_SAFELOADMODULE_NUM_SAFELOAD_ADDR, 1);
/* Delay one sample period */
udelay(SW_DELAY_US);
return ret;
}
int dsp_writeparam(u8 devaddr, u16 addr, u32 data )
{
int ret = -1;
if(spi_dsp_device != NULL)
{
/* Read Header */
char txdata[7];
txdata[0] = (devaddr << 1) | SPI_WRITE;
txdata[1] = (addr >> 8);
txdata[2] = (addr & 0xFF);
txdata[3] = (data >> 24);
txdata[4] = (data >> 16);
txdata[5] = (data >> 8);
txdata[6] = (data & 0xFF);
ret = spi_write( spi_dsp_device, &txdata, sizeof(txdata));
//printk("Write Param %d \t Value %x \n", addr, data);
}
return ret;
}
Audio Signal Processors
adau1452
adau1452 + mcu
SigmaDSP Audio Processors
Hi emc:
The problem is:
>> We are doing this 1 parameter at a time as it is just simpler using an IOCTRL interface in the linux driver.
Safload is meant to be used to upload 5 (or the size of the filter) parameters at once, followed by the number of parameters to upload and the first address.
Doing so one parameter at a time defeats it's purpose and will cause filter instability (pops and clicks) due to unknown intermediate filter states.
Also, if the transfer function being changed is vastly different, even doing safeload will cause cause a step function (pop noise) caused by the immediate filter change. I suggest you experiment with Blend Filters.
Miguel
Please log in to reply.