View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,46 @@
+/*
+ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef AVL6882_H
+#define AVL6882_H
+
+//#include <linux/dvb/frontend.h>
+//#include "dvb_frontend.h"
+
+struct avl6882_config {
+ /* the demodulator's i2c address */
+ u8 demod_address;
+ u8 tuner_address;
+
+ unsigned char eDiseqcStatus;
+};
+
+
+#if defined(CONFIG_DVB_AVL6882) || (defined(CONFIG_DVB_AVL6882_MODULE) && \
+ defined(MODULE))
+extern struct dvb_frontend *avl6882_attach(struct avl6882_config *config,
+ struct i2c_adapter *i2c);
+#else
+static inline struct dvb_frontend *avl6882_attach(struct avl6882_config *config,
+ struct i2c_adapter *i2c)
+{
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+ return NULL;
+}
+#endif /* CONFIG_DVB_AVL6882 */
+
+#endif /* AVL6882_H */
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -292,4 +292,12 @@ config MEDIA_TUNER_AV201X
help
Airoha Technology AV201x silicon tuner driver.
+config MEDIA_TUNER_R848
+ tristate "Rafael Micro R848 silicon tuner"
+ depends on MEDIA_SUPPORT && I2C
+ default m if !MEDIA_SUBDRV_AUTOSELECT
+ select BITREVERSE
+ help
+ Rafael Micro R848 silicon tuner driver.
+
endmenu
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,85 @@
+/*
+ * Rafael R848 silicon tuner driver
+ *
+ * Copyright (C) 2015 Luis Alves <ljalvs@gmail.com>
+ *
+ * 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.
+ */
+
+#ifndef R848_H
+#define R848_H
+
+#include <linux/kconfig.h>
+#include "dvb_frontend.h"
+
+
+
+
+typedef struct _R848_Sys_Info_Type
+{
+ u16 IF_KHz;
+ u16 FILT_CAL_IF;
+ u8 BW;
+ u8 V17M;
+ u8 HPF_COR;
+ u8 FILT_EXT_ENA;
+ u8 FILT_EXT_WIDEST;
+ u8 FILT_EXT_POINT;
+// u8 AGC_CLK;
+ u8 FILT_COMP;
+ u8 FILT_CUR;
+ u8 FILT_3DB;
+ u8 SWBUF_CUR;
+ u8 TF_CUR;
+ u8 INDUC_BIAS;
+ u8 SWCAP_CLK;
+ u8 NA_PWR_DET;
+}R848_Sys_Info_Type;
+
+
+
+
+struct r848_config {
+ /* tuner i2c address */
+ u8 i2c_address;
+
+ // tuner
+ u8 R848_DetectTfType ;
+ unsigned char R848_pre_standard;
+ u8 R848_Array[40];
+ u8 R848_Xtal_Pwr ;
+ u8 R848_Xtal_Pwr_tmp ;
+
+ /* dvbc/t */
+u8 R848_SetTfType;
+ R848_Sys_Info_Type Sys_Info1;
+ /* DVBT */
+
+
+};
+
+#if IS_ENABLED(CONFIG_MEDIA_TUNER_R848)
+extern struct dvb_frontend *r848_attach(struct dvb_frontend *fe,
+ struct r848_config *cfg, struct i2c_adapter *i2c);
+#else
+static inline struct dvb_frontend *r848_attach(struct dvb_frontend *fe,
+ struct r848_config *cfg, struct i2c_adapter *i2c)
+{
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+ return NULL;
+}
+#endif
+
+#endif /* R848_H */
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -411,3 +411,12 @@ config DVB_USB_TBS5881
select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT
help
Say Y here to support the TurboSight TBS5881 DVB-T/T2/C USB2.0 receivers
+
+config DVB_USB_TBS5520
+ tristate "Turbosight TBS5520 DVB-T/T2/C/S/S2 USB2.0 support"
+ depends on DVB_USB
+ select DVB_PLL if MEDIA_SUBDRV_AUTOSELECT
+ select DVB_AVL6882 if MEDIA_SUBDRV_AUTOSELECT
+ select MEDIA_TUNER_R848 if MEDIA_SUBDRV_AUTOSELECT
+ help
+ Say Y here to support the Turbosight TBS5520 USB2 DVB-T/T2/C/S/S2 device
View
@@ -106,6 +106,9 @@ obj-$(CONFIG_DVB_USB_TBS5220) += dvb-usb-tbs5220.o
dvb-usb-tbs5881-objs = tbs5881.o
obj-$(CONFIG_DVB_USB_TBS5881) += dvb-usb-tbs5881.o
+dvb-usb-tbs5520-objs := tbs5520.o
+obj-$(CONFIG_DVB_USB_TBS5520) += dvb-usb-tbs5520.o
+
ccflags-y += -I$(srctree)/drivers/media/dvb-core
ccflags-y += -I$(srctree)/drivers/media/dvb-frontends/
# due to tuner-xc3028
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,8 @@
+#ifndef _TBS5520_H_
+#define _TBS5520_H_
+
+#define DVB_USB_LOG_PREFIX "tbs5520"
+#include "dvb-usb.h"
+
+#define deb_xfer(args...) dprintk(dvb_usb_tbs5520_debug, 0x02, args)
+#endif