[PATCH 0/3] fixp-arith/vivid: update sin/cos implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These patches improve the sine tone generation in the vivid SDR driver (Software
Defined Radio). The main problem in that driver was the poor sin/cos function
implementation.

This started with improvements in vivid sine tone generation. It turned out
that to improve sine tone, we needed to improve the implementation of the sine
and cosine functions. Instead of improving the sin/cos implementation in vivid,
Mauro suggested that we should improve the common implementation in
include/linux/fixp-arith.h. This is a better approach compared to maintaining
a native fixed implementation of sin/cos for every module. Mauro has provided
the patch for improved sin/cos implementation in fixp-arith.h.

Please find patches for:

1. Improved LUT based fixed point implementation for sine/cosine calculation.
2. Use new sin/cos implementation in sine tone generation code in vivid
3. Modify equation used to generate sample for frequency modulated wave

Since patch 1 touches on the ff-memless driver and the gspca ov534 driver
we need Acks from the driver maintainers or (in the case of ff-memless) from
the input subsystem maintainer.

Some background behind changes in vivid sdr:

Vivid generates a frequency modulated (FM) signal (I and Q components) for SDR.
The 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 the 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,
it is found that sine wave is discontinuous and the frequency spectrum is spread
out a lot. Based on my discussion with Hans and Antti we found that the reasons
are:

1. Limited precision and rounding errors in calculations: the current
   implementation in vivid sir uses Taylor series calculation to calculate
   sine/cosine. Using a look up table based implementation improves the
   accuracy.
2. The equation used to compute modulated signal.

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux