Re: [PATCH 4/4] dvbsky: add option to disable IR receiver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12.10.2014 13:12, Antti Palosaari wrote:
static int dvbsky_get_rc_config(struct dvb_usb_device *d, struct dvb_usb_rc *rc)
  {
+    if (dvb_usb_dvbsky_disable_rc)
+        return 0;
+
+    rc->map_name       = RC_MAP_DVBSKY;
      rc->allowed_protos = RC_BIT_RC5;
      rc->query          = dvbsky_rc_query;
      rc->interval       = 300;
@@ -450,7 +458,7 @@ static struct dvb_usb_device_properties dvbsky_s960_props = {

  static const struct usb_device_id dvbsky_id_table[] = {
      { DVB_USB_DEVICE(0x0572, 0x6831,
-        &dvbsky_s960_props, "DVBSky S960/S860", RC_MAP_DVBSKY) },
+        &dvbsky_s960_props, "DVBSky S960/S860", NULL) },

Why you removed default keytable too?

I initially thought that it would make sense to set all RC related parameters in the get_rc_config function. Of couse I could set RC_MAP_DVBSKY as default map and then set it to NULL only if the remote controller is disabled. Now that I think of it, it's probably better to do it this way. The next DVBSky OEM device might come with another remote controller, and we don't want to implement the map selection logic into the get_rc_config.

In general I did not see many modules with IR disable function. Is this the right way to implement it? I noticed that dvb-usb-v2 had an option to disable IR polling, but that will disable it for all dvb-usb-v2 modules. I have 2 adapters in my HTPC setup and want to disable the IR only for the device that uses the dvbsky module.

-olli
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux