Skip to contentSkip to conversation

it913x-fe ver 1.15 read signal strenght using reg VAR_P_INBAND.

PATCH New Malcolm Priestley 1 participant 1 message Feb 12, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 it913x-fe ver 1.15 read signal strenght using reg VAR_P_INBAND.

Read signal strength using VAR_P_INBAND and apply FEC preferred values.

Note this does not work on IT9137 devices even with dvb-usb-it9135-01.fw firmware.

Config read_sl allows switch between read signal strength and signal level.

---
 drivers/media/dvb/dvb-usb/it913x.c           |    3 +
 drivers/media/dvb/frontends/it913x-fe-priv.h |    5 ++
 drivers/media/dvb/frontends/it913x-fe.c      |   91 +++++++++++++++++++++++---
 drivers/media/dvb/frontends/it913x-fe.h      |    4 +
 4 files changed, 93 insertions(+), 10 deletions(-)
drivers/media/dvb/dvb-usb/it913x.c +3 -0
index cfa415b..3b7b102 100644
@@ -412,11 +412,13 @@ static int ite_firmware_select(struct usb_device *udev,
 	case IT9135_V1_FW:
 		it913x_config.firmware_ver = 1;
 		it913x_config.adc_x2 = 1;
+		it913x_config.read_slevel = false;
 		props->firmware = fw_it9135_v1;
 		break;
 	case IT9135_V2_FW:
 		it913x_config.firmware_ver = 1;
 		it913x_config.adc_x2 = 1;
+		it913x_config.read_slevel = false;
 		props->firmware = fw_it9135_v2;
 		switch (it913x_config.tuner_id_0) {
 		case IT9135_61:
@@ -432,6 +434,7 @@ static int ite_firmware_select(struct usb_device *udev,
 	default:
 		it913x_config.firmware_ver = 0;
 		it913x_config.adc_x2 = 0;
+		it913x_config.read_slevel = true;
 		props->firmware = fw_it9137;
 	}
 
drivers/media/dvb/frontends/it913x-fe-priv.h +5 -0
index 93b086e..eb6fd8a 100644
@@ -201,6 +201,11 @@ fe_modulation_t fe_con[] = {
 	QAM_64,
 };
 
+enum {
+	PRIORITY_HIGH = 0,	/* High-priority stream */
+	PRIORITY_LOW,	/* Low-priority stream */
+};
+
 /* Standard demodulator functions */
 static struct it913xset set_solo_fe[] = {
 	{PRO_LINK, GPIOH5_EN, {0x01}, 0x01},
drivers/media/dvb/frontends/it913x-fe.c +81 -10

117 lines not on this page · raw message

drivers/media/dvb/frontends/it913x-fe.h +4 -0
index c4a908e..07fa459 100644
@@ -34,6 +34,8 @@ struct ite_config {
 	u8 tuner_id_1;
 	u8 dual_mode;
 	u8 adf;
+	/* option to read SIGNAL_LEVEL */
+	u8 read_slevel;
 };
 
 #if defined(CONFIG_DVB_IT913X_FE) || (defined(CONFIG_DVB_IT913X_FE_MODULE) && \
@@ -168,6 +170,8 @@ static inline struct dvb_frontend *it913x_fe_attach(
 #define EST_SIGNAL_LEVEL	0x004a
 #define FREE_BAND		0x004b
 #define SUSPEND_FLAG		0x004c
+#define VAR_P_INBAND		0x00f7
+
 /* Build in tuner types */
 #define IT9137 0x38
 #define IT9135_38 0x38
Signature · 1 line
1.7.9