summaryrefslogtreecommitdiff
path: root/firmware/drivers/button.c
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-06-04 19:17:51 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-06-04 19:17:51 +0000
commitd25a61f01c21978d0c9e229fd72852e99da1414a (patch)
treea3334620eae5b1818d0afea69e686ddc0a610905 /firmware/drivers/button.c
parent6c22be4a3db4ad72acf67f99059872e92d1931b4 (diff)
downloadrockbox-d25a61f01c21978d0c9e229fd72852e99da1414a.zip
rockbox-d25a61f01c21978d0c9e229fd72852e99da1414a.tar.gz
rockbox-d25a61f01c21978d0c9e229fd72852e99da1414a.tar.bz2
rockbox-d25a61f01c21978d0c9e229fd72852e99da1414a.tar.xz
Android: listen to ACTION_AUDIO_BECOMING_NOISY for headphone (FS#12097).
This event is sent before the audio is routed back to the speaker so we get the information about the unplugged headphone notably earlier. Decrease the debouncing of the headphone status from 1s to 0.5s to work around audio still getting played back via the speaker due to the pause delay by debouncing. On Android we shouldn't need the debouncing at all. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29957 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/button.c')
-rw-r--r--firmware/drivers/button.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index f8e4a35..3ee5e7c 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -177,7 +177,7 @@ static void button_tick(void)
/* Use the autoresetting oneshot to debounce the detection signal */
phones_present = !phones_present;
timeout_register(&hp_detect_timeout, btn_detect_callback,
- HZ, phones_present);
+ HZ/2, phones_present);
}
#endif