media: nec-decoder: remove trailer_space state
authorDaniel Fu <danifu@nvidia.com>
Fri, 30 Jan 2015 17:31:09 +0000 (17:31 +0000)
committerVinayak Pane <vpane@nvidia.com>
Sat, 7 Feb 2015 21:11:07 +0000 (13:11 -0800)
commitd6027e7ad132f42d066371773efb48257789774b
tree111c39722c4bb477a5f1b090c385f126b0ba7778
parent2f816366c4c825df266cc5a1aa63a40a7a41b392
media: nec-decoder: remove trailer_space state

Remove STATE_TRAILER_SPACE from state machine.
Causing 2 issue:
- can not decode the keycode, if it didn't following with
  another keycode/repeat code
- will generate one more code in curreent logic.
  i.e. key_right + repeat code + key_left + repeat code.
  expect: key_right, key_left.
  Result: key_right, key_right, key_right.
  Reason: when receive repeat code of key_right, state machine will
  stay in STATE_TRAILER_SPACE state, then wait for a new interrupt,
  if an interrupt came after keyup_timer, then will generate another
  fake key.

According to the NEC protocol, it don't need a trailer space. Remove it.

Bug 1601127

Change-Id: I7b990e94c4fc26b4387dcbbb68ae6c4e4af4dd46
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Reviewed-on: http://git-master/r/679574
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Tested-by: Vinayak Pane <vpane@nvidia.com>
drivers/media/rc/ir-nec-decoder.c