I am using WM8731 Audio Codec taking hints from the Audio Board PROTO and Koalo's blog about I2S, with a 1 W Audio Power Amplifier LM4889 to drive a speaker from CUI INC: CDS-13138-SMT. The setup works but not as expected. I am using the recommended circuitry given in LM4889 Datasheet for high gain amplifier.
My application requires a speaker to output frequencies in 17 to 20 KHz. But when I pass a wave audio of pure 19 KHz(from here) to it, the speaker outputs a frequency at around 9KHz and 15 KHz.(Why?) The playback is slow too.(I tried playing a song. It ran in slow motion)(can't understand Why?)
(I am using Spectrum Analyzer. It shows the two peaks at 9 and 15). The whole setup is interfaced with Raspberry Pi through I2S.
I don't have much experience with audio applications. Is my approach wrong? Am I using a wrong speaker for my application? Can anyone provide any alternative? Is there something wrong with WM8731? Do I need to perform any kind of initialization on the WM8731 to make it work properly? I am sorry if I come across as a complete noob.