I'm using a tfa9879 in a new product and the power output is very low, can anyone give me tips on what might be wrong? I'm supplying 5V with a 10uF ceramic cap to both VDDP pins and driving a 4ohm speaker, but I can't get it to put out more than about 0.1watt. The data sheet says I should be closer to 2.5W. If I turn the volume up (register 0x13) the power output does not increase, but the sound gets very distorted as the amplifier starts clipping. Sound is clear at lower volume levels. The 5V supply is not the bottleneck, voltage is not sagging. Any tips would be greatly appreciated!
I do apologize for my delayed response, I was out of the office last couple of days.
1. Can you share the schematic and I2C settings used?
2. What audio format are you using and what are the frequencies?
3. Did you use any filters at the outputs? If so, when you remove the filter circuit and connect the speaker directly to the amplifier outputs then can you check again?
Thank you for the reply. It seems to be current related. I tried a 30-ohm speaker and the problem is nearly gone, I can turn it up all the way and it's still clear. An 8-ohm speaker is significantly better than the 4-ohm but I still can't turn it up more than about half volume before it starts distorting badly. With the 4-ohm speaker I can barely turn it up at all before it starts distorting, and the volume is much lower than what is possible with the 8 ohm speaker. It's as if the output current is very limited, but as best I can tell I've disabled the power limiting settings, maybe I missed something? When the sound is distorted, status register 0x15 bit 13 is set "1V8 analog regulator is off or output voltage level is too low", but the 1V8 power is not sagging so the error must be internal to the chip. This bit is not set at lower volumes when it is not distorting. I have tried multiple chips all with the same error. Bits 3 (LRCK1 too low) and 5 (SCK1 to LRCK1 ratio invalid) are also set, but I don't think this is related because the sound is very clear at low volumes.
To answer your questions:
(1) I copied my schematic below. I've tried many different register settings but this is how I'm setting it up at the moment:
tfa_write_reg(0x00, 0); //power down
tfa_write_reg(0x01, 0x08D8); // 0x08D8 = 10 0011 011 0 00 == 00 - I2S mode, 0 - No SCK polarity inversion, 011 - I2S data up to 24 bits, 0011 - 16kHz, 10 - left + right; sum of left and right....
tfa_write_reg(0x00, 0x0001); //power up
tfa_write_reg(0x13, 0x1035); // Volume control, with 4-ohm speaker it distorts with any setting lower than 0x1055
tfa_write_reg(0x14, 0x0000); // Disable power limiting
tfa_write_reg(0x0F, 0x0008); // Clipping disabled, max power - bypass control table 27
tfa_write_reg(0x10, 0x92BA); // dynamic range compressor table 28
tfa_write_reg(0x00, 0x0009); //audio output enable
LRCK1 is running at 15873Hz (the closest to 16kHz possible with my processor) and SCK1 is 1523809Hz, giving almost exactly 96:1 ratio. LRCK2 and SCK2 are not connected.
(2) I'm using 258kB audio. 16 bit/sample, 16kHz sample rate, mono
(3) I'm not using any filters on the outputs
My colleague has tried the exact same sequence on the demo board, without any issues.
The problem is in the SCK1 and LRCK1 frequencies.
Using I2S format the TFA9879 does not support 96*Fs ratio. Supported formats are 32*Fs and 64*Fs. See below.
If you would like to make it work, then SCK1 needs to run at 64*LRCK1.
Furthermore the audio format you are sending is 16bit per channel, so if running at 64*Fs make sure that the 16 LSB’s per channel are filled by 0’s.
I hope it helps.
Thanks for the reply. Can you point me to the demo board? I tried finding one myself but had no luck, so I'm using a breakout board. If the demo board works then we can just use that layout for our product.
Using my own breakout board, I changed my timings and it's currently running 32:1 (500kHz SCK, 15.7kHz LRCK, so 31.8:1) and the problem persists, see my scope screenshot below. At low volumes the sound is very clear, the problem is that I get very little volume before it starts to break up. Does your dev board run the amp at 5V?
New data point; I turned VDDP down to 3V and I can turn it up really loud, but the more I go beyond 3V the more it breaks up and quieter it gets, and at 5V I can get very little volume before it starts breaking up. Is this expected? I was expecting a lot more output power at 5V than 3V, not the opposite. I'm using a 8 ohm speaker.
Edit --> It appears to be a current problem; I tried a 4-ohm speaker and it's much worse than the 8-ohm speaker. With the 4-ohm speaker and 3V to VDDP I get barely any volume at all before it starts to break up, and the higher the voltage to VDDP the less volume I get before it breaks up.