We need some more details at this point. Check the following 2 items with the speaker connected and disconnected:
Does the output of the amp have a (relatively) stable square wave when the pi is playing nothing?
Does the square wave coming from the amp only get jittery when the speaker-test utility gets run?
Yes, the output of the amp appears to be relatively stable, both with and without the speaker connected, when the pi is playing nothing.
and
Yes the square wave coming from the amp only gets jittery when I use the speaker-test utility, or attempt to play a wav file, again both with and without the speaker connected.
basically the only difference I can see between the pi's gpio output square wave, and the square wave coming off of the amp appears to be the voltage levels. The pi's gpio output ranges from about 2V to about 6V, and the amp's output ranges from about 2V to about 8V.
Since this is an amplifier, you would think the output level should be at least as great as the input level, right?
See if you can barely hear the output when the speaker is connected to the amp.
Tried this, and if I hold the speaker up to my ear, as in, touching my ear, I can hear the audio playing. I'm starting to feel stupid over here, thinking there must be some volume control on the pi/alsa layer that I'm missing or something.
Oh, and btw, thanks for all the help on this Rich, it's much appreciated.