From 88fc0e2153ca8bb1502c48d153c06f4a33499ebc Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 27 Sep 2010 21:17:33 +0200 Subject: [PATCH] frameworkd: limit oeventsd workaround for buggy kernel only to 2.6.32 Signed-off-by: Martin Jansa --- ...und-buggy-kernel-to-get-full-vibrati.patch | 37 +++++++++++++------ recipes/freesmartphone/frameworkd_git.bb | 2 +- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/recipes/freesmartphone/frameworkd/0001-oeventsd-workaround-buggy-kernel-to-get-full-vibrati.patch b/recipes/freesmartphone/frameworkd/0001-oeventsd-workaround-buggy-kernel-to-get-full-vibrati.patch index 1dd1ef23fe..1506570d34 100644 --- a/recipes/freesmartphone/frameworkd/0001-oeventsd-workaround-buggy-kernel-to-get-full-vibrati.patch +++ b/recipes/freesmartphone/frameworkd/0001-oeventsd-workaround-buggy-kernel-to-get-full-vibrati.patch @@ -1,33 +1,46 @@ -From 72ad63c5ce9f2d25a119612065d86bd317bf80ed Mon Sep 17 00:00:00 2001 -From: Sebastian Krzyszkowiak -Date: Wed, 7 Jul 2010 15:01:59 +0200 -Subject: [PATCH] oeventsd: workaround buggy kernel to get full vibration power. - This patch should be disabled as soon as fixed kernel arrives. +From 98d2ad06b8b4680fa2c68e1647a749baed4ba845 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marco=20Trevisan=20(Trevi=C3=B1o)?= +Date: Sun, 26 Sep 2010 22:32:04 +0200 +Subject: [PATCH] oeventsd: workaround buggy 2.6.32 kernels to get full vibration power. + This patch should be disabled as soon as fixed kernel arrives; it doesn't affect anymore + SHR running a 2.6.34 kernel --- - framework/subsystems/oeventsd/fso_actions.py | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + framework/subsystems/oeventsd/fso_actions.py | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/framework/subsystems/oeventsd/fso_actions.py b/framework/subsystems/oeventsd/fso_actions.py -index c0a29dd..b9a2104 100644 +index c0a29dd..1b937f7 100644 --- a/framework/subsystems/oeventsd/fso_actions.py +++ b/framework/subsystems/oeventsd/fso_actions.py -@@ -162,13 +162,13 @@ class VibratorAction(Action): +@@ -155,6 +155,11 @@ class VibratorAction(Action): + def __init__(self, target = 0, mode = "continuous"): + self.mode = mode + self.target = target ++ self.vibrate_power = 90 ++ ++ import re ++ if (re.match("2\.6\.32\.*", os.uname()[2])): ++ self.vibrate_power = 25 + + def trigger(self, **kargs): + if self.mode == "continuous": +@@ -162,13 +167,13 @@ class VibratorAction(Action): 'org.freesmartphone.odeviced', '/org/freesmartphone/Device/Vibrator/%s' % self.target, 'org.freesmartphone.Device.Vibrator', - 'VibratePattern', 999, 300, 700, 90).trigger() -+ 'VibratePattern', 999, 300, 700, 25).trigger() ++ 'VibratePattern', 999, 300, 700, self.vibrate_power).trigger() elif self.mode == "oneshot": DBusAction(dbus.SystemBus(), 'org.freesmartphone.odeviced', '/org/freesmartphone/Device/Vibrator/%s' % self.target, 'org.freesmartphone.Device.Vibrator', - 'Vibrate', 400, 90).trigger() -+ 'Vibrate', 400, 25).trigger() ++ 'Vibrate', 400, self.vibrate_power).trigger() else: logger.warning( "invalid vibration mode '%s', valid are 'continuous' or 'oneshot'" ) -- -1.7.1 +1.7.0.4 diff --git a/recipes/freesmartphone/frameworkd_git.bb b/recipes/freesmartphone/frameworkd_git.bb index e47e66551e..088e04e846 100644 --- a/recipes/freesmartphone/frameworkd_git.bb +++ b/recipes/freesmartphone/frameworkd_git.bb @@ -6,7 +6,7 @@ DEPENDS = "python-cython-native python-pyrex-native" LICENSE = "GPL" SRCREV = "5ed055335b251b290179928bd0d56b5476759876" PV = "0.9.5.9+gitr${SRCPV}" -PR = "r5" +PR = "r6" PE = "1" inherit distutils update-rc.d python-dir -- 2.39.5