mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-07 11:28:32 +00:00
[media] rtl2832_sdr: Realtek RTL2832 SDR driver module
Implement SDR driver for Realtek RTL2832U chip as a DVB extension module. SDR module is attached by DVB USB RTL28XXU driver as a DVB SEC (satellite equipment controller) module. Abusing unused SEC here has no harm as that is DVB-T only frontend. SDR functionality is provided by RTL2832 DVB-T demodulator. I suspect it is originally planned for DAB and FM, but it could be abused general SDR, due to modern silicon tuners that has wide frequency range and a lot of configurable parameters (filters, gains, ...). http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/44461 Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
parent
ecfb7ca3c8
commit
771138920e
6 changed files with 1542 additions and 0 deletions
|
@ -41,6 +41,8 @@ source "drivers/staging/media/solo6x10/Kconfig"
|
||||||
|
|
||||||
source "drivers/staging/media/omap4iss/Kconfig"
|
source "drivers/staging/media/omap4iss/Kconfig"
|
||||||
|
|
||||||
|
source "drivers/staging/media/rtl2832u_sdr/Kconfig"
|
||||||
|
|
||||||
# Keep LIRC at the end, as it has sub-menus
|
# Keep LIRC at the end, as it has sub-menus
|
||||||
source "drivers/staging/media/lirc/Kconfig"
|
source "drivers/staging/media/lirc/Kconfig"
|
||||||
|
|
||||||
|
|
|
@ -11,3 +11,5 @@ obj-$(CONFIG_VIDEO_OMAP4) += omap4iss/
|
||||||
obj-$(CONFIG_USB_SN9C102) += sn9c102/
|
obj-$(CONFIG_USB_SN9C102) += sn9c102/
|
||||||
obj-$(CONFIG_VIDEO_OMAP2) += omap24xx/
|
obj-$(CONFIG_VIDEO_OMAP2) += omap24xx/
|
||||||
obj-$(CONFIG_VIDEO_TCM825X) += omap24xx/
|
obj-$(CONFIG_VIDEO_TCM825X) += omap24xx/
|
||||||
|
obj-$(CONFIG_DVB_RTL2832_SDR) += rtl2832u_sdr/
|
||||||
|
|
||||||
|
|
7
drivers/staging/media/rtl2832u_sdr/Kconfig
Normal file
7
drivers/staging/media/rtl2832u_sdr/Kconfig
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
config DVB_RTL2832_SDR
|
||||||
|
tristate "Realtek RTL2832 SDR"
|
||||||
|
depends on USB && DVB_CORE && I2C && VIDEO_V4L2 && DVB_USB_RTL28XXU
|
||||||
|
select DVB_RTL2832
|
||||||
|
select VIDEOBUF2_VMALLOC
|
||||||
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
||||||
|
|
6
drivers/staging/media/rtl2832u_sdr/Makefile
Normal file
6
drivers/staging/media/rtl2832u_sdr/Makefile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
obj-$(CONFIG_DVB_RTL2832_SDR) += rtl2832_sdr.o
|
||||||
|
|
||||||
|
ccflags-y += -Idrivers/media/dvb-core
|
||||||
|
ccflags-y += -Idrivers/media/dvb-frontends
|
||||||
|
ccflags-y += -Idrivers/media/tuners
|
||||||
|
ccflags-y += -Idrivers/media/usb/dvb-usb-v2
|
1471
drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
Normal file
1471
drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
Normal file
File diff suppressed because it is too large
Load diff
54
drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.h
Normal file
54
drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.h
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* Realtek RTL2832U SDR driver
|
||||||
|
*
|
||||||
|
* Copyright (C) 2013 Antti Palosaari <crope@iki.fi>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* GNU Radio plugin "gr-kernel" for device usage will be on:
|
||||||
|
* http://git.linuxtv.org/anttip/gr-kernel.git
|
||||||
|
*
|
||||||
|
* TODO:
|
||||||
|
* Help is very highly welcome for these + all the others you could imagine:
|
||||||
|
* - move controls to V4L2 API
|
||||||
|
* - use libv4l2 for stream format conversions
|
||||||
|
* - gr-kernel: switch to v4l2_mmap (current read eats a lot of cpu)
|
||||||
|
* - SDRSharp support
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef RTL2832_SDR_H
|
||||||
|
#define RTL2832_SDR_H
|
||||||
|
|
||||||
|
#include <linux/kconfig.h>
|
||||||
|
#include <media/v4l2-subdev.h>
|
||||||
|
|
||||||
|
/* for config struct */
|
||||||
|
#include "rtl2832.h"
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_DVB_RTL2832_SDR)
|
||||||
|
extern struct dvb_frontend *rtl2832_sdr_attach(struct dvb_frontend *fe,
|
||||||
|
struct i2c_adapter *i2c, const struct rtl2832_config *cfg,
|
||||||
|
struct v4l2_subdev *sd);
|
||||||
|
#else
|
||||||
|
static inline struct dvb_frontend *rtl2832_sdr_attach(struct dvb_frontend *fe,
|
||||||
|
struct i2c_adapter *i2c, const struct rtl2832_config *cfg,
|
||||||
|
struct v4l2_subdev *sd)
|
||||||
|
{
|
||||||
|
dev_warn(&i2c->dev, "%s: driver disabled by Kconfig\n", __func__);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* RTL2832_SDR_H */
|
Loading…
Reference in a new issue