Hi Jing Pan,
I'm back in the lab and I've been able to give this a proper go. First of all: The audio firmware in dev_audio_speaker_bm is functional on my test computers (Win10/32, Win7/32, OS X). It plays music and test patterns for long periods of time!
So you were completely correct about that! But on my development computer (Win10/64) Windows reports errors and doesn't play music (see below).
Playing from the test computers the volume output is low but functional. To investigate I made a .wav test pattern to check it. (Right channel 0b010010001000010000010000 for 50 samples, 0 for 50 samples. Left constant 0. Only 16 MSBs expected to survive USB interface.) Four things emerge from 'scope plots of this:
- The desired waveform is present, and there is square wave audio in only the right channel
- The interface to the DAC is not I2S, at first inspection it looks like left-justified with R on SAI1_TX_SYNC = 1
- There is some +-1LSB noise at the 16-bit level, possibly dither from the OS, I don't bother for now
- No signs of long-tail FIR filtering (=sample rate conversion)
Now to my Win10/64 machine. "Open sound settings" shows the dev kit as a perfectly good DAC. Device Manager also looks happy, but when I look closer it says under "Events" for the device: "was not migrated due to partial or ambigous match.". I re-built the code with a different USB PID which made Win10 re-discover it. The same error persisted on the development machine, and the new build is still functional on the Mac.
Next, I will investigate this Windows error and reconfigure the dev-kit for I2S communication with another DAC board I will patch in.
Thanks,
Børge