I´m doing a few experiments with capturing audio and displaying some spectrums with Qwt. I have a generator for white noise connected to the audio input of the Mini2440. Now when I capture the white noise several times, I randomly get one of the following results: some times a flat spectrum, and sometimes a sort of high-cut behaviour. here with highcut behaviour: http://imageshack.us/photo/my-images/846/highcut.png/ here with a flat spectrum: http://imageshack.us/photo/my-images/88/flatq.png/ So alsalib, alsa driver or something else does some filtering on the input signal, but only sometimes and sometimes not. I recorded the wav-Files with arecord, a programm that came with alsa-utils. No changes on the alsa config, alsamixer or whatelse were made between these recordings, that always endup in different result. any idea, how this could be fixed ?
ALSA - weird audio capture behaviour (mini2440)
Any chance you could try to do a realtime plot instead of saving to file, directly on mini2440 i.e. ?
dont know if the mini2440 is fast enough for realtime fft. But what could I find out with doing realtime fft instead of analyzing recorded wav files ? I think I should find out which hardware- or software component does this high-cut filtering. Then I could analyze why this happens randomly. I´ll have a look in the audio codec datasheet ...
Daniel, the Mini2440 audio hardware has some restrictions with the sampling rates. The internal divider to generate the audio sampling clock can only generate some very ugly frequencies. If you do not use one of these hardware frequencies some kind of re-sampling happens in software. Maybe the re-sampling generates the effects you see?