All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Hans de Goede <hdegoede@redhat.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, Antti Palosaari <crope@iki.fi>,
	Prashant Laddha <prladdha@cisco.com>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: [PATCH 3/3] vivid sdr: fix broken sine tone generated for sdr FM
Date: Wed,  4 Feb 2015 10:07:32 +0100	[thread overview]
Message-ID: <1423040852-7470-4-git-send-email-hverkuil@xs4all.nl> (raw)
In-Reply-To: <1423040852-7470-1-git-send-email-hverkuil@xs4all.nl>

From: Prashant Laddha <prladdha@cisco.com>

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>
---
 drivers/media/platform/vivid/vivid-sdr-cap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/vivid/vivid-sdr-cap.c b/drivers/media/platform/vivid/vivid-sdr-cap.c
index 5e089cb..caf1316 100644
--- a/drivers/media/platform/vivid/vivid-sdr-cap.c
+++ b/drivers/media/platform/vivid/vivid-sdr-cap.c
@@ -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
-- 
2.1.4


      parent reply	other threads:[~2015-02-04  9:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04  9:07 [PATCH 0/3] fixp-arith/vivid: update sin/cos implementation Hans Verkuil
2015-02-04  9:07 ` [PATCH 1/3] fixp-arith: replace sin/cos table by a better precision one Hans Verkuil
2015-02-04 19:33   ` Dmitry Torokhov
2015-02-04  9:07 ` [PATCH 2/3] vivid sdr: Use LUT based implementation for sin/cos() Hans Verkuil
2015-02-04  9:07 ` Hans Verkuil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423040852-7470-4-git-send-email-hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=crope@iki.fi \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=prladdha@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.