1. 19 5月, 2010 6 次提交
    • M
      V4L/DVB: ir: Make sure that the spinlocks are properly initialized · 6eb9435b
      Mauro Carvalho Chehab 提交于
      Some spinlocks are not properly initialized on ir core:
      
      [  471.714132] BUG: spinlock bad magic on CPU#0, modprobe/1899
      [  471.719838]  lock: f92a08ac, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
      [  471.727301] Pid: 1899, comm: modprobe Not tainted 2.6.33 #36
      [  471.733062] Call Trace:
      [  471.735537]  [<c1498793>] ? printk+0x1d/0x22
      [  471.739866]  [<c12694e3>] spin_bug+0xa3/0xf0
      [  471.744224]  [<c126962d>] do_raw_spin_lock+0x7d/0x160
      [  471.749364]  [<f92a01ff>] ? ir_rc5_register+0x6f/0xf0 [ir_rc5_decoder]
      
      So, use static initialization for the static spinlocks, instead of the
      dynamic ones (currently used), as proposed by David Härdeman on one
      of his RFC patches.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      6eb9435b
    • M
      V4L/DVB: re-add enable/disable check to the IR decoders · 7f20d32d
      Mauro Carvalho Chehab 提交于
      A previous cleanup patch removed more than needed. Re-add the logic that
      disable the decoders.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      7f20d32d
    • M
      V4L-DVB: ir-core: remove the ancillary buffer · 587835a4
      Mauro Carvalho Chehab 提交于
      Now that the decoders are state machine, there's no need to create
      an ancillary buffer while decoding the protocol. Just call the decoders
      code directly, event by event.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      587835a4
    • M
      V4L/DVB: ir-nec-decoder: Cleanups · 67780d6a
      Mauro Carvalho Chehab 提交于
      Remove dead code and properly name a few constants
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      67780d6a
    • M
      V4L/DVB: ir-nec-decoder: Reimplement the entire decoder · 2f16f631
      Mauro Carvalho Chehab 提交于
      Thanks to Andy Walls <awalls@md.metrocast.net> for pointing me his
      code, that gave me some ideas to better implement it.
      
      After some work with saa7134 bits, I found a way to catch both IRQ
      edge pulses. By enabling it, the NEC decoder can now take both
      pulse and spaces into account, making it more precise.
      
      Instead of the old strategy of handling the events all at once,
      this code implements a state machine. Due to that, it handles
      individual pulse or space events, validating them against the
      protocol, producing a much more reliable decoding.
      
      With the new implementation, the protocol trailer bits are properly
      handled, making possible for the repeat key to work.
      
      Also, the code is now capable of handling both NEC and NEC extended
      IR devices. With NEC, it produces a 16 bits code, while with NEC
      extended, a 24 bits code is returned.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      2f16f631
    • D
      V4L/DVB: ir-core: improve keyup/keydown logic · a374fef4
      David Härdeman 提交于
      Rewrites the keyup/keydown logic in drivers/media/IR/ir-keytable.c.
      
      All knowledge of keystates etc is now internal to ir-keytable.c
      and not scattered around ir-raw-event.c and ir-nec-decoder.c (where
      it doesn't belong).
      
      In addition, I've changed the API slightly so that ir_input_dev is
      passed as the first argument rather than input_dev. If we're ever
      going to support multiple keytables we need to move towards making
      ir_input_dev the main interface from a driver POV and obscure away
      the input_dev as an implementational detail in ir-core.
      Signed-off-by: NDavid Härdeman <david@hardeman.nu>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      a374fef4
  2. 18 5月, 2010 6 次提交