Fix HTC headset handling.

HTC's headset driver adds additional bits to the switch state, which
we're unable to deal with. Fix that by masking out those bits and
keeping only the valid ones.

Change-Id: I696a863f7f81dd2827d238468d566f62a203aff6
Signed-off-by: rohan <rohanmathur34@gmail.com>