summaryrefslogtreecommitdiffstats
path: root/power-8953.c
diff options
context:
space:
mode:
Diffstat (limited to 'power-8953.c')
-rw-r--r--power-8953.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/power-8953.c b/power-8953.c
index cfdb77e..5e98089 100644
--- a/power-8953.c
+++ b/power-8953.c
@@ -36,7 +36,6 @@
#include <fcntl.h>
#include <dlfcn.h>
#include <stdlib.h>
-#include <pthread.h>
#include <unistd.h>
#define LOG_TAG "QTI PowerHAL"
@@ -57,7 +56,6 @@ static int display_hint_sent;
static int video_encode_hint_sent;
static int cam_preview_hint_sent;
-pthread_mutex_t camera_hint_mutex = PTHREAD_MUTEX_INITIALIZER;
static int camera_hint_ref_count;
static void process_video_encode_hint(void *metadata);
//static void process_cam_preview_hint(void *metadata);
@@ -251,7 +249,6 @@ static void process_video_encode_hint(void *metadata)
};
memcpy(resource_values, res, MIN_VAL(sizeof(resource_values), sizeof(res)));
num_resources = sizeof(res)/sizeof(res[0]);
- pthread_mutex_lock(&camera_hint_mutex);
camera_hint_ref_count++;
if (camera_hint_ref_count == 1) {
if (!video_encode_hint_sent) {
@@ -260,7 +257,6 @@ static void process_video_encode_hint(void *metadata)
video_encode_hint_sent = 1;
}
}
- pthread_mutex_unlock(&camera_hint_mutex);
}
else {
/* sample_ms = 10mS */
@@ -268,7 +264,6 @@ static void process_video_encode_hint(void *metadata)
};
memcpy(resource_values, res, MIN_VAL(sizeof(resource_values), sizeof(res)));
num_resources = sizeof(res)/sizeof(res[0]);
- pthread_mutex_lock(&camera_hint_mutex);
camera_hint_ref_count++;
if (camera_hint_ref_count == 1) {
if (!video_encode_hint_sent) {
@@ -277,7 +272,6 @@ static void process_video_encode_hint(void *metadata)
video_encode_hint_sent = 1;
}
}
- pthread_mutex_unlock(&camera_hint_mutex);
}
}
else if ((strncmp(governor, INTERACTIVE_GOVERNOR,
@@ -291,7 +285,6 @@ static void process_video_encode_hint(void *metadata)
};
memcpy(resource_values, res, MIN_VAL(sizeof(resource_values), sizeof(res)));
num_resources = sizeof(res)/sizeof(res[0]);
- pthread_mutex_lock(&camera_hint_mutex);
camera_hint_ref_count++;
if (camera_hint_ref_count == 1) {
if (!video_encode_hint_sent) {
@@ -300,7 +293,6 @@ static void process_video_encode_hint(void *metadata)
video_encode_hint_sent = 1;
}
}
- pthread_mutex_unlock(&camera_hint_mutex);
}
} else if (video_encode_metadata.state == 0) {
if (((strncmp(governor, INTERACTIVE_GOVERNOR,
@@ -309,13 +301,11 @@ static void process_video_encode_hint(void *metadata)
((strncmp(governor, SCHEDUTIL_GOVERNOR,
strlen(SCHEDUTIL_GOVERNOR)) == 0) &&
(strlen(governor) == strlen(SCHEDUTIL_GOVERNOR)))) {
- pthread_mutex_lock(&camera_hint_mutex);
camera_hint_ref_count--;
if (!camera_hint_ref_count) {
undo_hint_action(video_encode_metadata.hint_id);
video_encode_hint_sent = 0;
}
- pthread_mutex_unlock(&camera_hint_mutex);
return ;
}
}