public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Daniel Glöckner" <daniel-gl@gmx.net>
To: Antti Palosaari <crope@iki.fi>
Cc: Alistair Buxton <a.j.buxton@gmail.com>,
	linux-media <linux-media@vger.kernel.org>
Subject: Re: SDR FM demodulation
Date: Sat, 11 Feb 2012 16:15:48 +0100	[thread overview]
Message-ID: <20120211151548.GA23806@minime.bse> (raw)
In-Reply-To: <4F36632A.3010700@iki.fi>

On Sat, Feb 11, 2012 at 02:46:34PM +0200, Antti Palosaari wrote:
> I did that whole last night up to 6 am. I also ended up very similar
> blocks, but failed to convert bytes as UChar. I tried to add
> constant between Deinterleave and UChar To Float but it wasn't
> possible. So my first idea was to make Python script to make for the
> sample when I wake-up. But no need anymore :)

I ended up writing a FM demodulator in C before I found Alistair's
mail in my inbox. Using a 65536 element table for arc tangent and
integer arithmetics, it is pretty fast.

> Now someone should make Linux driver that can tune that device to
> different frequencies and look what it really can do.
> 
> What kind of driver architecture should be used? Use device 100%
> userspace or make it working as Kernel driver? I suspect making it
> as Kernel driver could be too limited since V4L/DVB API
> restrictions?

There is also the CX23880/1/2/3 series with two 10 bit ADCs (usually)
sampling at 28.7MHz. The video part can be switched to raw mode, where
it provides 8 bit samples at full or 16 bit samples at half the sampling
rate from the luma ADC.

In non-Y/C mode the chroma ADC is used by the audio part, where the data
can be fed through a configurable chain of filters, demodulatos, and sample
rate converters. Just grep 0x320 cx88-reg.h to get a glimpse of its
capabilities. There is absolutely no documentation to be found about most
of these registers.

A reconfigurable silicon tuner like the XC3028 again increases the number
of possibilities by a large factor.

BT87x aka CX2587x is used for SDR as well, but its video raw mode is
good just for analog tv signals, as it expects vsyncs and the audio ADC
usually just samples the tuner's baseband sound output at 448kHz.
Some variants claim to support FM stereo and BTSC decoding capabilities,
but AFAIR there is no support in the Linux driver and the public data
sheet just tells us there is a "DAP" between the decimation filter and
the DMA FIFO.

If only there was completely open documentation...

All in all, I don't think there can be one API that fits all devices
without limiting their functionality. Maybe a UVC or LabVIEW like interface
with blocks for tuners, ADCs, decimators, DMA sinks, etc. is suitable,
but then applications will end up being tailored to a small number
of topologies or require manual configuration. For most people the
only use would probably be to listen to FM radio.

  Daniel


  reply	other threads:[~2012-02-11 15:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09 15:01 SDR FM demodulation Antti Palosaari
2012-02-09 15:11 ` Patrick Boettcher
2012-02-09 15:21   ` Antti Palosaari
2012-02-09 21:47     ` Andy Walls
2012-02-11  2:08     ` Andy Walls
2012-02-11  2:29       ` David Hagood
2012-02-11 16:03         ` Andy Walls
2012-02-11  7:00 ` Alistair Buxton
2012-02-11 11:33   ` Daniel Glöckner
2012-02-11 12:46   ` Antti Palosaari
2012-02-11 15:15     ` Daniel Glöckner [this message]
2012-02-11 15:33       ` Antti Palosaari
2012-02-11 15:55         ` Daniel Glöckner
2012-03-12  1:09     ` Steve Markgraf

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=20120211151548.GA23806@minime.bse \
    --to=daniel-gl@gmx.net \
    --cc=a.j.buxton@gmail.com \
    --cc=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox