What kind of noobish mistake am I making here?
PCB layout can cause some strange behavior.
Tried two completely different designs, both gave the same result.
The PAM8406 sets maximum RF =142k, minimum RI =18k, so the maximum closed-gain is 24dB.
In the case of the 8304, both Rin resistors should match in value and likely conform to the limits above.
Make sure if you are polarizing any polarized electrolytic caps properly.
Note that the reference design doesn't give any values for Rin.
Rf = 300k and I tried a 10k, 82k, 150k and 330k at Rin. I figured one had to give some result.. No luck. As input I used ceramic X7R caps.
The only way for it to work now is remove the input caps(so one Rin=150k goes to ground directly, the other connected to the source). The source is decoupled with a 1µF cap.
This does in fact work. but I expected much more volume from the speaker. It could be that I'm expecting too much as it is only a 34*40mm 4 Ohm speaker.
At 4 meters distance, you can just hear what the voice is saying in a quiet room.
It is still not as described in the example schematic and I don't understand why! When I analyse the output without speaker I get big short peaks as what I hear so the speaker load is not too big for the chip to handle or at least is not causing the issue.