[PATCH 6/6] Vivid SDR: Modified equation used for generating FM

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

 



FM (frequency modulated) signal for SDR is generated by varying the
phase. The phase variation is proportional to input signal. It was
observed that, the larger phase increments leads to discontinuties
in the signal recovered after demodulation. This was one of the
reason for broken (cracky) sine tone after SDR receiver.

This patch modifies the phase calculation on two counts -
1. Phase of modulated signal, is varied around a center value.
2. The extent of phase variation with respect to input
signal is reduced. This is equivalent to reducing modulation index.

FM signal generated using modifed equation, do not lead to broken
sine tone.

Cc: Hans Verkuil <hans.verkuil@xxxxxxxxx>
Cc: Antti Palosaari <crope@xxxxxx>
Signed-off-by: Prashant Laddha <prladdha@xxxxxxxxx>
---
 drivers/media/platform/vivid/vivid-sdr-cap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/vivid/vivid-sdr-cap.c b/drivers/media/platform/vivid/vivid-sdr-cap.c
index 1e5abd7..1e77771 100644
--- a/drivers/media/platform/vivid/vivid-sdr-cap.c
+++ b/drivers/media/platform/vivid/vivid-sdr-cap.c
@@ -455,7 +455,9 @@ void vivid_sdr_cap_process(struct vivid_dev *dev, struct vivid_buffer *buf)
 
 	for (i = 0; i < plane_size; i += 2) {
 
-		mod_phase_inc = calc_cos(dev->sdr_fixp_src_phase);
+		mod_phase_inc = calc_cos(dev->sdr_fixp_src_phase) / 4 +
+						src_phase_inc;
+
 		dev->sdr_fixp_src_phase += src_phase_inc;
 
 		while (dev->sdr_fixp_src_phase >= FIX_PT_2PI)
-- 
1.9.1

--
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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux