ADHD: Add dBus message for microphone jack state.
Details
Adds code to generate a dbus message each time the microphone jack is
changed.
The message has a string and a boolean:
"microphone" : The name of the jack which is reporting
true : The headphones have been inserted.
false : The headphones have been removed.
Testing
On a Kaen:
dbus-monitor --system
Alter the state of the headphone switch.
The messages will be displayed, as follows:
signal sender=:1.20 -> dest=(null destination) serial=8 path=/gavd/jack; interface=gavd.jack.state; member=jack
string "microphone"
boolean false
signal sender=:1.20 -> dest=(null destination) serial=9 path=/gavd/jack; interface=gavd.jack.state; member=jack
string "microphone"
boolean true
BUG=chromium-os:19558
TEST=See above.
Change-Id: Idb25f1b92433aed2b721416c24e1fab1e2394d70
Signed-off-by: Taylor Hutt <thutt@chromium.org>
7 files changed