From: Antti Palosaari Date: Fri, 22 Nov 2013 17:20:14 +0000 (-0300) Subject: [media] rtl28xxu: add module parameter to disable IR X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=94b5fa6c20b7ac916e099b44cc812ac1ec6e5d3e;p=linux-beck.git [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 Signed-off-by: Mauro Carvalho Chehab --- 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 @@ #include "tua9001.h" #include "r820t.h" +static int rtl28xxu_disable_rc; +module_param_named(disable_rc, rtl28xxu_disable_rc, int, 0644); +MODULE_PARM_DESC(disable_rc, "disable RTL2832U remote controller"); DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); static int rtl28xxu_ctrl_msg(struct dvb_usb_device *d, struct rtl28xxu_req *req) @@ -1322,6 +1325,10 @@ err: static int rtl2832u_get_rc_config(struct dvb_usb_device *d, struct dvb_usb_rc *rc) { + /* disable IR interrupts in order to avoid SDR sample loss */ + if (rtl28xxu_disable_rc) + return rtl28xx_wr_reg(d, IR_RX_IE, 0x00); + /* load empty to enable rc */ if (!rc->map_name) rc->map_name = RC_MAP_EMPTY;