Contributing to rtl-sdr (fc0012)

David Basden davidb-sdr at rcpt.to
Tue Mar 27 14:00:30 UTC 2012


On Tue, Mar 27, 2012 at 05:17:37AM -0700, Mathias Coinchon wrote:
> It works on my Ezcap eztv646 ! Congratulations and thank you.
> 
> However I had to tweak main.c and force fc0002 tuner because it was always taking elonics e4000 tuner.
> This because the Ezcap seems to have clash with the VID&PID, mine is 0BDA:2838, 
> the same codes as for the model with an elonics tuner.
> I don't know if there's another way to differentiate them. Otherwise, rtl-sdr 
> will need to have a flag to force a certain type of tuner.

It seems that the DVB driver detects the actual tuner types rather than
hardcoding them (check_tuner_type in rtl2832u_fe.c). It goes through each
type of tuner it knows about, and tries to read a value over the I2C bus
at the address it expects that tuner, for a value that will distinguish it
(so many different types of tuners use the same I2C address that responding
isn't alone enough to distinguish a particular tuner)

It shouldn't be too hard to do. Both the FC0012 and FC0013 will respond
to a read from (base 0xc6) address 0x0. After powerup, the FC0012 with return
0xa1, and the FC0013 will return 0xa3. The E4000 will respond to a read
from (base 0xc8) address 0x02 with 0x40.

I don't know if it's going to be much use putting in the detection stuff
while the rest of the structure is being refactored towards sanity though;
I'm trying (and failing) to alter main.c as little as possible.

> It works on FM band but with bad performance and I have noticed unwanted images (at +/-400kHz) and also adjacent interference problems.
> 
> There is not this problem with the Noxon DAB+ key that has a FC0013 tuner. My interpretation is that the FC0013 has got enhanced filtering (looking at the driver code).

I've updated https://gist.github.com/2171926 just now with some changes I made
today that have improved things quite significantly for me. I've also started
trying to document the different registers a bit more, and removed code that was
never being called, and that may not have as much use to SDR, such as the DTV
RSSI LNA auto-adjustment. (If the latter is a mistake, at least the code is in the
DTV module still, and some of the more readable in there at that).

At the end of the day, I think you're right about the enhanced filtering in the
FC0013. Also, I still haven't fixed the V/U band filter switching, which is bound
to be affecting some things.

I've also noticed that my key's tuner occasionally seems to get confused and won't
change frequencies without being taken out and plugged in again. I have also been
probably feeding it strange inputs more than once though.

> There may be ways to adjust gains in FC0012 but there's very few information about this chip unfortunately.

There is actually a fair bit of control over the LNA for the FC0012 at least.
Setting register 0x13 will give you from -9.9dB to 19.7dB gain, with at least
20 steps in between. I just noticed FC0012_LNA_GAIN_TABLE in rtl2832u_fe.c of
the DVB code (strange place for it; It just happened to be near the tuner detection
code) which gives a whole lot of useful values.

Thanks for testing it out!

Cheers,

David




More information about the osmocom-sdr mailing list