public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org,
	Mauro Carvalho Chehab <m.chehab@samsung.com>
Subject: Re: [PATCH RFC v3 6/7] rtl2832_sdr: convert to SDR API
Date: Thu, 19 Dec 2013 18:50:56 +0200	[thread overview]
Message-ID: <52B323F0.2050701@iki.fi> (raw)
In-Reply-To: <52B2BA92.8080706@xs4all.nl>

Hi Hans!

On 19.12.2013 11:21, Hans Verkuil wrote:
> On 12/16/2013 11:08 PM, Antti Palosaari wrote:
>> It was abusing video device API. Use SDR API instead.
>>
>> Signed-off-by: Antti Palosaari <crope@iki.fi>
>> ---
>>   drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c | 291 ++++++++++++++++++-----
>>   1 file changed, 227 insertions(+), 64 deletions(-)
>>
>
> A question: does this driver only do SDR, or does it also
> do 'regular' video and/or radio?
>
> If it does, then how does it switch from one tuner mode to another?
>
> E.g. from ANALOG_TV to RADIO to SDR?
>
> During the Barcelona summit in 2012 we discussed this. See the last two
> slides of my presentation:
>
> http://linuxtv.org/downloads/presentations/media_ws_2012_EU/ambiguities2.odp
>
> Basically this proposal was accepted provided that the code to handle tuner
> ownership should be shared between DVB and V4L2.
>
> I made an initial attempt for this here:
>
> http://git.linuxtv.org/hverkuil/media_tree.git/shortlog/refs/heads/tuner
>
> I never had the time to continue with it, but it might be useful for rtl2832.

Yes, that driver sits on both DVB and V4L2 API. It is USB DVB-T stick, 
which could be abused as a SDR.

There is following software blocks:
1) dvb_usb + dvb_usb_rtl28xxu modules to provide USB interface
2) rtl2832 module to provide DVB-T demodulator (implements DVB frontend, 
which logical entity representing DVB hardware)
3) various silicon RF tuners, eg. e4000, r820t, fc0013... These tuners 
are provided via DVB API, frontend tuners.
4) rtl2832_sdr module, which is attached to DVB frontend using "sec". 
Term sec stays satellite equipment controller (provides typically LNB 
voltage)

It should be also noted that DVB-T demodulator and SDR functionality is 
provided "physically" by same RTL2832 demod - whilst I decided to split 
those own drivers. And make situation looks even more complex, I can say 
RTL2832 demod is integrated physically to same silicon than USB-bridge 
(but logically those seems to be totally different chip sill).

Hope those explanations could give some light what kind of connections 
and blocks there is involved.

So indeed there is that same hybrid tuner problem to resolve. And not 
only that hybrid problem, but you will need to expose much more 
properties from RF tuner than DVB API or V4L2 API tuner model does 
currently. I haven't looked situation more carefully yet, but one thing 
that must be done at the very first is to add some lock to prevent only 
DVB or V4L2 API could access the hardware at time.

regards
Antti

-- 
http://palosaari.fi/

  reply	other threads:[~2013-12-19 16:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 22:08 [PATCH RFC v3 0/7] SDR API Antti Palosaari
2013-12-16 22:08 ` [PATCH RFC v3 1/7] v4l: add new tuner types for SDR Antti Palosaari
2013-12-17  7:31   ` Hans Verkuil
2013-12-16 22:08 ` [PATCH RFC v3 2/7] v4l: 1 Hz resolution flag for tuners Antti Palosaari
2013-12-17  7:31   ` Hans Verkuil
2013-12-16 22:08 ` [PATCH RFC v3 3/7] v4l: add stream format for SDR receiver Antti Palosaari
2013-12-17  7:32   ` Hans Verkuil
2013-12-16 22:08 ` [PATCH RFC v3 4/7] v4l: define own IOCTL ops for SDR FMT Antti Palosaari
2013-12-17  7:32   ` Hans Verkuil
2013-12-16 22:08 ` [PATCH RFC v3 5/7] v4l: enable some IOCTLs for SDR receiver Antti Palosaari
2013-12-17  7:34   ` Hans Verkuil
2013-12-17 16:40     ` Antti Palosaari
2013-12-18  7:32       ` Hans Verkuil
2013-12-16 22:08 ` [PATCH RFC v3 6/7] rtl2832_sdr: convert to SDR API Antti Palosaari
2013-12-17  7:45   ` Hans Verkuil
2013-12-19  9:21   ` Hans Verkuil
2013-12-19 16:50     ` Antti Palosaari [this message]
2013-12-19 16:59       ` Devin Heitmueller
2013-12-19 18:38         ` Antti Palosaari
2013-12-19 19:12           ` Devin Heitmueller
2013-12-16 22:08 ` [PATCH RFC v3 7/7] msi3101: " Antti Palosaari
2013-12-17  7:36 ` [PATCH RFC v3 0/7] " Hans Verkuil
2013-12-17 16:46   ` Antti Palosaari

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=52B323F0.2050701@iki.fi \
    --to=crope@iki.fi \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox