Hi, Sharing the patches towards some improvements in sine generation. This was one of the item in to-do list for vivid. Vivid generates a frequency modulated (FM) signal (I and Q components) for SDR. FM signal is generated by varying the phase in proportion to input signal. Basically it is implementing FM by doing a phase modulation. It was reported that on SDR receiver, when the sine signal is recovered after demodulation, the quality of tone is cracky. Looking at time and frequency plot of the signal recovered after demodulation, I found that sine wave discontinuous and frequency spectrum was spread out a lot. Based on my discussion with Hans and Antti, there were two suspected reasons 1. Rounding errors in calculations 2. The equation used to compute modulated signal. Please find the patches for - 1. Use look up table (LUT) for computing (co)sine values (patches 1 to 4) This will replace Taylor series based computation. LUT based implementation for (co)sine calculation have following advantages - a. Rounding errors would be less. b. One could easily control and improve the precision of calculation c. Computationally more efficient 2. Increase precision of calculation (patch 5) Use higher precision for sine LUT as well as all other calculations (phase values etc). 3. Modify equation used to generate sample for frequency modulated wave (patch 6) Please review these patches and share your comments. I will share the time, frequency plots for signal seen before and after the proposed improvements. Thanks to Hans and Antti for helping me to understand the problem and later reviewing the solution for it. Regards, Prashant -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html