r820t: add manual gain controls

Add gain control for LNA, Mixer and IF. Expose controls via DVB
frontend .set_config callback.

Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
rtl2832_sdr: expose R820 gain controls to user space

Provide R820 gain controls to userspace via V4L2 API. LNA, Mixer
and IF gain controls are offered, each one both manual and automode.

Signed-off-by: Antti Palosaari <crope@iki.fi>
e4000: fix PLL calc to allow higher frequencies

There was 32-bit overflow on VCO frequency calculation which blocks
tuning to 1073 - 1104 MHz. Use 64 bit number in order to avoid VCO
frequency overflow.

After that fix device in question tunes to following range:
60 - 1104 MHz
1250 - 2207 MHz

Signed-off-by: Antti Palosaari <crope@iki.fi>
msi3101: fix device caps to advertise SDR receiver

Advertise device as a SDR receiver, not video. After that libv4l
accepts opening device.

Signed-off-by: Antti Palosaari <crope@iki.fi>
rtl2832_sdr: fix device caps to advertise SDR receiver

Advertise device as a SDR receiver, not video. After that libv4l
accepts opening device.

Signed-off-by: Antti Palosaari <crope@iki.fi>
msi3101: add default FMT and ADC frequency

Default ADC to smallest/worst possible configuration on probe.
Also enhance some FMT debug logs.

Signed-off-by: Antti Palosaari <crope@iki.fi>
msi3101: sleep USB ADC and tuner when streaming is stopped

Put USB IF / ADC and RF tuner to sleep when device is not streaming.
It uses around 115 mA power from USB when active, which drops to
32 mA on idle after that patch.

Signed-off-by: Antti Palosaari <crope@iki.fi>
DocBook: document RF tuner gain controls

Add documentation for LNA, mixer and IF gain controls. These
controls are RF tuner specific.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
DocBook: V4L: add V4L2_SDR_FMT_CU8 - 'CU08'

Document V4L2_SDR_FMT_CU8 SDR format.
It is complex unsigned 8-bit IQ sample. Used by software defined
radio devices.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
DocBook: V4L: add V4L2_SDR_FMT_CU16LE - 'CU16'

Document V4L2_SDR_FMT_CU16LE format.
It is complex unsigned 16-bit little endian IQ sample. Used by
software defined radio devices.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
DocBook: media: document V4L2_CTRL_CLASS_RF_TUNER

It is class for RF tuner specific controls, like gain controls,
filters, signal strength.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
xc2028: silence compiler warnings

There is now new tuner types which are not handled on that switch-case.
Print error if unknown tuner type is meet.

drivers/media/tuners/tuner-xc2028.c: In function ‘generic_set_freq’:
drivers/media/tuners/tuner-xc2028.c:1037:2: warning: enumeration value ‘V4L2_TUNER_ADC’ not handled in switch [-Wswitch]
  switch (new_type) {
  ^
drivers/media/tuners/tuner-xc2028.c:1037:2: warning: enumeration value ‘V4L2_TUNER_RF’ not handled in switch [-Wswitch]

Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
v4l: add RF tuner channel bandwidth control

Modern silicon RF tuners has one or more adjustable filters on
signal path, in order to filter noise from desired radio channel.

Add channel bandwidth control to tell the driver which is radio
channel width we want receive. Filters could be then adjusted by
the driver or hardware, using RF frequency and channel bandwidth
as a base of filter calculations.

On automatic mode (normal mode), bandwidth is calculated from sampling
rate or tuning info got from userspace. That new control gives
possibility to set manual mode and let user have more control for
filters.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
msi3101: implement tuner bandwidth control

Implement control that user could adjust tuner filters manually,
if he wish.

Signed-off-by: Antti Palosaari <crope@iki.fi>
rtl2832_sdr: implement tuner bandwidth control

Implement control that user could adjust tuner filters manually,
if he wish.

Signed-off-by: Antti Palosaari <crope@iki.fi>
msi001: Mirics MSi001 silicon tuner driver

That RF tuner driver is bound via SPI bus model and it implements V4L
subdev API. I split it out from MSi3101 SDR driver.
MSi3101 = MSi2500 + MSi001.

Signed-off-by: Antti Palosaari <crope@iki.fi>
msi3101: use msi001 tuner driver

Remove MSi001 RF tuner related code as MSi001 functionality is moved
to own driver.

Implement SPI master adapter.

Attach MSi001 driver via SPI / V4L subdev framework.

Signed-off-by: Antti Palosaari <crope@iki.fi>
MAINTAINERS: add msi001 driver

Mirics MSi001 silicon tuner driver. Currently in staging as SDR API
is not ready.

Signed-off-by: Antti Palosaari <crope@iki.fi>
MAINTAINERS: add msi3101 driver

Mirics MSi2500 (MSi3101) SDR ADC + USB interface driver. Currently
in staging as SDR API is not ready.

Signed-off-by: Antti Palosaari <crope@iki.fi>
MAINTAINERS: add rtl2832_sdr driver

Realtek RTL2832 SDR driver. Currently in staging as SDR API is not
ready.

Signed-off-by: Antti Palosaari <crope@iki.fi>