[media] vivid sdr: fix broken sine tone generated for sdr FM
authorPrashant Laddha <prladdha@cisco.com>
Wed, 4 Feb 2015 09:07:32 +0000 (06:07 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 2 Mar 2015 17:53:04 +0000 (14:53 -0300)
FM (frequency modulated) signal for SDR is generated by varying the
phase, where phase variation is proportional to input signal. It is
seen that, the larger phase increments leads to discontinuities in
the signal recovered after demodulation. Reducing the extent of phase
variation with respect to input signal, equivalent to reducing the
modulation index.

Tested using FM receiver flow graph in gnuradio-companion.

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/vivid/vivid-sdr-cap.c

index 5e089cb58a38c29c99dadc006b4587a9498e8b1c..caf131666e37426f63029462b10839c83634fcdd 100644 (file)
@@ -454,7 +454,7 @@ void vivid_sdr_cap_process(struct vivid_dev *dev, struct vivid_buffer *buf)
                                                FIXP_2PI) >> (31 - FIXP_N);
 
                dev->sdr_fixp_src_phase += src_phase_step;
-               dev->sdr_fixp_mod_phase += mod_phase_step;
+               dev->sdr_fixp_mod_phase += mod_phase_step / 4;
 
                /*
                 * Transfer phases to [0 / 2xPI] in order to avoid variable