From: Pawit Pornkitprasan
Date: Sun, 30 Sep 2012 11:24:57 +0000 (+0700)
Subject: Power HAL: Remove sampling rate change
X-Git-Tag: cm-10.1-M1~33
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=76a153a66c8122fe13a84f8eac5392dae13c2dc0;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung.git
Power HAL: Remove sampling rate change
Sampling rate change causes stutter while playing music.
Stutter appears randomly, but has a higher chance of appearing
when the screen goes from off to on.
Change-Id: I9b23212165203c7ff7ef65021be09fd366e55770
---
diff --git a/exynos3/s5pc110/power/power.c b/exynos3/s5pc110/power/power.c
index d418562..78a9f1e 100644
--- a/exynos3/s5pc110/power/power.c
+++ b/exynos3/s5pc110/power/power.c
@@ -28,40 +28,14 @@
#include
#define BOOSTPULSE_PATH "/sys/devices/system/cpu/cpufreq/ondemand/boostpulse"
-#define SAMPLING_RATE_ONDEMAND "/sys/devices/system/cpu/cpufreq/ondemand/sampling_rate"
-#define SAMPLING_RATE_SCREEN_ON "40000"
-#define SAMPLING_RATE_SCREEN_OFF "400000"
struct s5pc110_power_module {
struct power_module base;
pthread_mutex_t lock;
int boostpulse_fd;
int boostpulse_warned;
- char sampling_rate_screen_on[PROPERTY_VALUE_MAX];
- char sampling_rate_screen_off[PROPERTY_VALUE_MAX];
};
-static void sysfs_write(char *path, char *s)
-{
- char buf[80];
- int len;
- int fd = open(path, O_WRONLY);
-
- if (fd < 0) {
- strerror_r(errno, buf, sizeof(buf));
- ALOGE("Error opening %s: %s\n", path, buf);
- return;
- }
-
- len = write(fd, s, strlen(s));
- if (len < 0) {
- strerror_r(errno, buf, sizeof(buf));
- ALOGE("Error writing to %s: %s\n", path, buf);
- }
-
- close(fd);
-}
-
static int boostpulse_open(struct s5pc110_power_module *s5pc110)
{
char buf[80];
@@ -119,17 +93,12 @@ static void s5pc110_power_hint(struct power_module *module, power_hint_t hint,
static void s5pc110_power_set_interactive(struct power_module *module, int on)
{
- struct s5pc110_power_module *s5pc110 = (struct s5pc110_power_module *) module;
- sysfs_write(SAMPLING_RATE_ONDEMAND,
- on ? s5pc110->sampling_rate_screen_on : s5pc110->sampling_rate_screen_off);
+ return;
}
static void s5pc110_power_init(struct power_module *module)
{
- struct s5pc110_power_module *s5pc110 = (struct s5pc110_power_module *) module;
- property_get("ro.sys.sampling_rate_on", s5pc110->sampling_rate_screen_on, SAMPLING_RATE_SCREEN_ON);
- property_get("ro.sys.sampling_rate_off", s5pc110->sampling_rate_screen_off, SAMPLING_RATE_SCREEN_OFF);
- sysfs_write(SAMPLING_RATE_ONDEMAND, s5pc110->sampling_rate_screen_on);
+ return;
}
static struct hw_module_methods_t power_module_methods = {