aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2013-11-22 12:20:14 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-05 13:36:26 -0500
commit94b5fa6c20b7ac916e099b44cc812ac1ec6e5d3e (patch)
tree8ed78703d28759e205e271c65514040b893c67a4 /drivers/media/usb/dvb-usb-v2/rtl28xxu.c
parent96a5b3a869e3dc7d55bf04a48a8dca8a4025787e (diff)
[media] rtl28xxu: add module parameter to disable IR
Disable IR interrupts in order to avoid SDR sample loss. IR interrupts causes some extra load for device and it seems be one reason to loss samples when sampling rate is high. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2/rtl28xxu.c')
-rw-r--r--drivers/media/usb/dvb-usb-v2/rtl28xxu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index a331af19b3a7..5e223e807de1 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -35,6 +35,9 @@
35#include "tua9001.h" 35#include "tua9001.h"
36#include "r820t.h" 36#include "r820t.h"
37 37
38static int rtl28xxu_disable_rc;
39module_param_named(disable_rc, rtl28xxu_disable_rc, int, 0644);
40MODULE_PARM_DESC(disable_rc, "disable RTL2832U remote controller");
38DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); 41DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
39 42
40static int rtl28xxu_ctrl_msg(struct dvb_usb_device *d, struct rtl28xxu_req *req) 43static int rtl28xxu_ctrl_msg(struct dvb_usb_device *d, struct rtl28xxu_req *req)
@@ -1322,6 +1325,10 @@ err:
1322static int rtl2832u_get_rc_config(struct dvb_usb_device *d, 1325static int rtl2832u_get_rc_config(struct dvb_usb_device *d,
1323 struct dvb_usb_rc *rc) 1326 struct dvb_usb_rc *rc)
1324{ 1327{
1328 /* disable IR interrupts in order to avoid SDR sample loss */
1329 if (rtl28xxu_disable_rc)
1330 return rtl28xx_wr_reg(d, IR_RX_IE, 0x00);
1331
1325 /* load empty to enable rc */ 1332 /* load empty to enable rc */
1326 if (!rc->map_name) 1333 if (!rc->map_name)
1327 rc->map_name = RC_MAP_EMPTY; 1334 rc->map_name = RC_MAP_EMPTY;