Well, yes, if I make a 10-second stereo track of A440 in Audacity, it plays in around 8 seconds and the tone is close to the D above A. It is a Teensy Audio Adapter. I copied all of the power settings from the Teensy library, but with different timing settings. But whether it's timing master or slave, it plays the same speed.Orbital6 wrote: How are you certain it's playing it too fast? If you feed it ten seconds of data, how many seconds does it play? OR is it 10 seconds but higher pitched?
If you play back audio via the i2s 'sound card' at a sample rate that's different to the source, then you will get a lower or higher frequency playback, it may or may not be your issue.
I'd also find a way of being certain of your BCLK frequency - look at the datasheet for your chip (same chip as the teensy audio right?) and make sure you're following it's recommendations. Are you just using the teensy audio board? Or your own sgtl5000 setup?
The thing is that I have complete control over what the codec is doing; that is the only part that is well-documented. I am following its recommendations as far as the settings I send to it, but my problem is that I don't know what settings ALSA is using. I do see that, if I play this A440 at 48k, 24 bit depth,
Code: Select all
It's ironic, when I started using Debian, suggesting that things could be more automatic was enough to get you banned from some forums and IRC channels, but now the problem is that I don't want all of this automatic default business, I just want to specifically tell my RPi what format to write. I'd use bare metal except that I need to run some synth or sampler software.
Again, I don't know where ALSA is choosing its seemingly arbitrary sample rates and formats, but none of the possible combinations the SGTL5000 is capable of make the sound come out at the right speed!
EDIT: P.S. I ordered two different crystal oscillators to try, expecting them about tomorrow. Maybe the problem is simply that the RPi oscillator is not giving me 9.6 MHz but something faster??