[PATCH 0/6] Jack insertion interface

Guillem Jover guillem.jover at nokia.com
Fri Oct 31 17:27:54 PDT 2008


Hi,

As proposed on the mailing list [0], I've implemented the jack
insertion support. I ended up modifiying few things, like changing
'input.jack.type' from a string to a strlist, so that it does not
end up with an 'unknown' value even when we support all contact
types, also because some of the combinations do not have a single
name, and there are jacks from 2 to 4 contacts. The 'line-out'
names are not consistent, but the other option was to use
'line_out' instead of 'lineout' on the input.jack namespaces which
seemed a bit ugly, but I would not mind changing it.

I'm attaching a small program I wrote to test the switches from the
kernel side through the uinput module. It can be run with something
like

  # ./sw-uinput -d 2 -r 10 -a headphone,microphone -e headphone

and the state changes monitored with 'lshal -m' and 'input-events'
(latest upstream version supports all new switches, well except for
the line-out).


Guillem Jover (6):
  use embedded input_local.h instead of system linux/input.h
  update usage of input.h definitions and assume their presence
  read a complete input event as guaranteed by Linux kernel
  move the event member from InputData to event_io()
  addon-input: Store the button name in InputData
  add input.jack support

 configure.in                                   |   12 -
 doc/spec/hal-spec-properties.xml               |   98 ++
 hald/linux/Makefile.am                         |    1 +
 hald/linux/addons/addon-acpi-buttons-toshiba.c |    6 +-
 hald/linux/addons/addon-input.c                |  175 ++--
 hald/linux/device.c                            |   53 +-
 hald/linux/input_local.h                       | 1371 ++++++++++++++++++++++++
 hald/linux/probing/probe-input.c               |   37 +-
 tools/Makefile.am                              |    2 +-
 tools/hal-setup-keymap.c                       |    6 +-
 10 files changed, 1627 insertions(+), 134 deletions(-)
 create mode 100644 hald/linux/input_local.h

regards,
guillem

[0] <http://lists.freedesktop.org/archives/hal/2008-October/012375.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sw-uinput.c
Type: text/x-csrc
Size: 5897 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20081101/8a72056a/attachment.c 


More information about the hal mailing list