1. 30 10月, 2014 1 次提交
  2. 31 7月, 2014 1 次提交
  3. 27 7月, 2014 1 次提交
  4. 26 7月, 2014 2 次提交
  5. 24 7月, 2014 2 次提交
  6. 06 4月, 2014 2 次提交
  7. 13 3月, 2014 1 次提交
  8. 12 3月, 2014 5 次提交
  9. 11 3月, 2014 1 次提交
  10. 07 2月, 2014 1 次提交
  11. 06 2月, 2014 1 次提交
    • J
      [media] media: rc: add sysfs scancode filtering interface · 00942d1a
      James Hogan 提交于
      Add and document a generic sysfs based scancode filtering interface for
      making use of IR data matching hardware to filter out uninteresting
      scancodes. Two filters exist, one for normal operation and one for
      filtering scancodes which are permitted to wake the system from suspend.
      
      The following files are added to /sys/class/rc/rc?/:
       - filter: normal scancode filter value
       - filter_mask: normal scancode filter mask
       - wakeup_filter: wakeup scancode filter value
       - wakeup_filter_mask: wakeup scancode filter mask
      
      A new s_filter() driver callback is added which must arrange for the
      specified filter to be applied at the right time. Drivers can convert
      the scancode filter into a raw IR data filter, which can be applied
      immediately or later (for wake up filters).
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
      Cc: linux-media@vger.kernel.org
      Cc: Rob Landley <rob@landley.net>
      Cc: linux-doc@vger.kernel.org
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      00942d1a
  12. 04 2月, 2014 3 次提交
  13. 15 1月, 2014 1 次提交
  14. 23 8月, 2013 1 次提交
  15. 22 8月, 2013 1 次提交
  16. 01 8月, 2013 1 次提交
    • S
      [media] media: rc: Add rc_open/close and use count to rc_dev · 8b2ff320
      Srinivas Kandagatla 提交于
      This patch adds user count to rc_dev structure, the reason to add this
      new member is to allow other code like lirc to open rc device directly.
      In the existing code, rc device is only opened by input subsystem which
      works ok if we have any input drivers to match. But in case like lirc
      where there will be no input driver, rc device will be never opened.
      Having this user count variable will be usefull to allow rc device to be
      opened from code other than rc-main.
      This patch also adds rc_open and rc_close functions for other drivers
      like lirc to open and close rc devices. This functions safely increment
      and decrement the user count. Other driver wanting to open rc device
      should call rc_open and rc_close, rather than directly modifying the
      rc_dev structure.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      8b2ff320
  17. 23 3月, 2013 1 次提交
  18. 20 3月, 2013 2 次提交
  19. 27 12月, 2012 1 次提交
  20. 26 12月, 2012 1 次提交
  21. 27 10月, 2012 1 次提交
    • D
      [media] rc-core: add separate defines for protocol bitmaps and numbers · c003ab1b
      David Härdeman 提交于
      The RC_TYPE_* defines are currently used both where a single protocol is
      expected and where a bitmap of protocols is expected.
      
      Functions like rc_keydown() and functions which add/remove entries to the
      keytable want a single protocol. Future userspace APIs would also
      benefit from numeric protocols (rather than bitmap ones). Keytables are
      smaller if they can use a small(ish) integer rather than a bitmap.
      
      Other functions or struct members (e.g. allowed_protos,
      enabled_protocols, etc) accept multiple protocols and need a bitmap.
      
      Using different types reduces the risk of programmer error. Using a
      protocol enum whereever possible also makes for a more future-proof
      user-space API as we don't need to worry about a sufficient number of
      bits being available (e.g. in structs used for ioctl() calls).
      
      The use of both a number and a corresponding bit is dalso one in e.g.
      the input subsystem as well (see all the references to set/clear bit when
      changing keytables for example).
      
      This patch separate the different usages in preparation for
      upcoming patches.
      
      Where a single protocol is expected, enum rc_type is used; where one or more
      protocol(s) are expected, something like u64 is used.
      
      The patch has been rewritten so that the format of the sysfs "protocols"
      file is no longer altered (at the loss of some detail). The file itself
      should probably be deprecated in the future though.
      Signed-off-by: NDavid Härdeman <david@hardeman.nu>
      Cc: Andy Walls <awalls@md.metrocast.net>
      Cc: Maxim Levitsky <maximlevitsky@gmail.com>
      Cc: Antti Palosaari <crope@iki.fi>
      Cc: Mike Isely <isely@pobox.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      c003ab1b
  22. 31 7月, 2012 1 次提交
    • D
      [media] Avoid sysfs oops when an rc_dev's raw device is absent · 720bb643
      Douglas Bagnall 提交于
      For some reason, when the lirc daemon learns that a usb remote control
      has been unplugged, it wants to read the sysfs attributes of the
      disappearing device. This is useful for uncovering transient
      inconsistencies, but less so for keeping the system running when such
      inconsistencies exist.
      
      Under some circumstances (like every time I unplug my dvb stick from
      my laptop), lirc catches an rc_dev whose raw event handler has been
      removed (presumably by ir_raw_event_unregister), and proceeds to
      interrogate the raw protocols supported by the NULL pointer.
      
      This patch avoids the NULL dereference, and ignores the issue of how
      this state of affairs came about in the first place.
      
      Version 2 incorporates changes recommended by Mauro Carvalho Chehab
      (-ENODEV instead of -EINVAL, and a signed-off-by).
      Signed-off-by: NDouglas Bagnall <douglas@paradise.net.nz>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      720bb643
  23. 20 3月, 2012 1 次提交
  24. 04 1月, 2012 1 次提交
  25. 24 11月, 2011 1 次提交
  26. 01 11月, 2011 1 次提交
  27. 31 7月, 2011 1 次提交
  28. 28 7月, 2011 2 次提交
    • J
      [media] rc-core support for Microsoft IR keyboard/mouse · f5f2cc64
      Jarod Wilson 提交于
      This is a custom IR protocol decoder, for the RC-6-ish protocol used by
      the Microsoft Remote Keyboard, apparently developed internally at
      Microsoft, and officially dubbed MCIR-2, per their March 2011 remote and
      transceiver requirements and specifications document, which also touches
      on this IR keyboard/mouse device.
      
      Its a standard keyboard with embedded thumb stick mouse pointer and
      mouse buttons, along with a number of media keys. The media keys are
      standard RC-6, identical to the signals from the stock MCE remotes, and
      will be handled as such. The keyboard and mouse signals will be decoded
      and delivered to the system by an input device registered specifically
      by this driver.
      
      Successfully tested with multiple mceusb-driven transceivers, as well as
      with fintek-cir and redrat3 hardware. Essentially, any raw IR hardware
      with enough sampling resolution should be able to use this decoder,
      nothing about it is at all receiver-hardware-specific.
      
      This work is inspired by lirc_mod_mce:
      
      The documentation there and code aided in understanding and decoding the
      protocol, but the bulk of the code is actually borrowed more from the
      existing in-kernel decoders than anything. I did recycle the keyboard
      keycode table, a few defines, and some of the keyboard and mouse data
      parsing bits from lirc_mod_mce though.
      
      Special thanks to James Meyer for providing the hardware, and being
      patient with me as I took forever to get around to writing this.
      
      callback routine to ensure we don't get any stuck keys, and used
      symbolic names for the keytable. Also cc'ing Florian this time, who I
      believe is the original mod-mce author...
      
      CC: Florian Demski <fdemski@users.sourceforge.net>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      f5f2cc64
    • D
      [media] rc: double unlock in rc_register_device() · 0528f354
      Dan Carpenter 提交于
      If change_protocol() fails and we goto out_raw, then it calls unlock
      twice.  I noticed that the other time we called change_protocol() we
      held the &dev->lock, so I changed it to hold it here too.
      Reviewed-by: NJarod Wilson <jarod@redhat.com>
      Acked-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      0528f354
  29. 02 7月, 2011 1 次提交
    • J
      [media] rc: call input_sync after scancode reports · 98c32bcd
      Jarod Wilson 提交于
      Due to commit cdda911c, evdev only
      becomes readable when the buffer contains an EV_SYN/SYN_REPORT event. If
      we get a repeat or a scancode we don't have a mapping for, we never call
      input_sync, and thus those events don't get reported in a timely
      fashion.
      
      For example, take an mceusb transceiver with a default rc6 keymap. Press
      buttons on an rc5 remote while monitoring with ir-keytable, and you'll
      see nothing. Now press a button on the rc6 remote matching the keymap.
      You'll suddenly get the rc5 key scancodes, the rc6 scancode and the rc6
      key spit out all at the same time.
      
      Pressing and holding a button on a remote we do have a keymap for also
      works rather unreliably right now, due to repeat events also happening
      without a call to input_sync (we bail from ir_do_keydown before getting
      to the point where it calls input_sync).
      
      Easy fix though, just add two strategically placed input_sync calls
      right after our input_event calls for EV_MSC, and all is well again.
      Technically, we probably should have been doing this all along, its just
      that it never caused any functional difference until the referenced
      change went into the input layer.
      
      input_sync once per IR signal. There was another hidden bug in the code
      where we were calling input_report_key using last_keycode instead of our
      just discovered keycode, which manifested with the reordering of calling
      input_report_key and setting last_keycode.
      Reported-by: NStephan Raue <sraue@openelec.tv>
      CC: Stephan Raue <sraue@openelec.tv>
      CC: Mauro Carvalho Chehab <mchehab@redhat.com>
      CC: Jeff Brown <jeffbrown@android.com>
      Acked-by: NDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      98c32bcd