The problem with math in kernel space is that the ARM doesn't do floating point. There is floating point emulation in the kernel that supports userland applications, but I'm not sure if it can be used in kernel space, and besides which, it is probably too slow to be desirable there.


I did add a fixed point library in this patch - the sinewave functionality uses it to calculate coefficients for the DSP. It could also be useful for re-implementing bass and treble properly. But although it should be faster than the floating point emulation, it's still slow compared to simple integer addition or mulitiplication. We can live with that if we're only doing a few such operations on an occasional basis, and the fixed point operation truly is necessary (as the DSP calculations are) but I'd still rather not use it if I can get acceptable results without.

Anyway, enough blurbing. Try this;

v320.hijack+sinwave_2.mk2.zImage

Patch attached. (Still against hijack v320)


Attachments
146716-sinewave_2-hj320.diff (219 downloads)

_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.