8 Commits

Author SHA1 Message Date
KalimochoAz
6ca40bfe1d Changed media_profiles
Defined memCap and previewframerate

Change-Id: I489c01af69507ca7267fd7aa45a15675e8150f8a
2011-04-24 22:17:01 +02:00
KalimochoAz
9d1083d252 Changes on sysctl thak make system more clean
For click, that is a tiny device we have tested this values and seam to
be clean.

Change-Id: I39436f5c54daf70e5d5f08b25dd3f69a36b098f4
2011-04-24 16:34:10 +02:00
KalimochoAz
285343533c Changed log for libcamera that is always badly complaining
Change-Id: I0a4b690aa6e4a334e3a52dbaf39e1d9bfc7f9869
2011-04-24 10:34:21 +02:00
KalimochoAz
f21ceb5764 System permissions and ondemand CPU config changed
Change-Id: Icd08120912eab4921b48abdae71ef23a20d5ed73
2011-04-24 10:26:30 +02:00
KalimochoAz
ca50a873e0 Clean libcamera non used code and changed recovery kernel
Change-Id: Icb0714578bca4c04d3b72e71a72b48d0eb048fe1
2011-04-23 21:08:01 +02:00
KalimochoAz
2611c32afb Few prop improvements for speed
Improve navigation speed, and defines the device as no focus device

Change-Id: Ic856ec0faf795976fcb639eb6de24e4b2435be5e
2011-04-16 09:55:21 +02:00
KalimochoAz
ff59b19ab2 Revert "Multiple click modifications"
This reverts commit 120f464872.

	modified:   KernelModules.mk
	modified:   click.mk
	modified:   custom/kernel
	new file:   custom/modules/2.6.29.6-Kalim/kernel/drivers/staging/ramzswap/ramzswap.ko
	deleted:    custom/modules/2.6.29.6-Kalim/kernel/drivers/staging/zram/zram.ko
	modified:   custom/modules/2.6.29.6-Kalim/modules.dep
	modified:   custom/modules/2.6.29.6-Kalim/modules.dep.bin
	modified:   custom/modules/2.6.29.6-Kalim/modules.order
	modified:   custom/modules/wlan.ko
	modified:   system.prop
2011-04-16 09:46:26 +02:00
KalimochoAz
120f464872 Multiple click modifications
Kernel modification:
    Added pptp VPN permissions
    Modified to have zram
System:
    Speed-up nevigation over internet

Change-Id: I063c9651f8f05a90524510d3852832322873094e
2011-04-15 21:53:12 +02:00
7 changed files with 30 additions and 110 deletions

View File

@@ -105,4 +105,4 @@ BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x0a520000
BOARD_FLASH_BLOCK_SIZE := 131072
# Add LUNFILE configuration to the system
BOARD_UMS_LUNFILE := "/sys/devices/platform/usb_mass_storage/lun0/file"
BOARD_UMS_LUNFILE := "/sys/devices/platform/msm_hsusb/gadget/lun0/file"

BIN
custom/recovery_kernel Executable file → Normal file

Binary file not shown.

View File

@@ -1,4 +1,8 @@
# Scheduler-Tuning
kernel.sched_latency_ns = 60000000
kernel.sched_min_granularity_ns = 2000000
kernel.sched_wakeup_granularity_ns = 5000000
kernel.sched_latency_ns = 600000
kernel.sched_min_granularity_ns = 400000
vm.dirty_ratio = 90
vm.dirty_background_ratio = 70
vm.vfs_cache_pressure = 5
vm.oom_kill_allocating_task = 1
vm.min_free_kbytes = 4096

View File

@@ -47,6 +47,14 @@ on boot
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 40000
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold 85
# Set idle_sleep_mode permissions to radio
chown radio radio /sys/module/pm/parameters/idle_sleep_mode
# for disabling IPv6 over mobile network.
write /proc/sys/net/ipv6/conf/rmnet0/disable_ipv6 1
write /proc/sys/net/ipv6/conf/rmnet1/disable_ipv6 1
write /proc/sys/net/ipv6/conf/rmnet2/disable_ipv6 1
# performance tweaks for flash
write /sys/block/mtdblock3/bdi/read_ahead_kb 4
write /sys/block/mtdblock4/bdi/read_ahead_kb 4
@@ -59,6 +67,9 @@ on boot
write /sys/module/lowmemorykiller/parameters/minfile 0,0,0,5120,5632,6144
write /sys/module/lowmemorykiller/parameters/check_filepages 1
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000
# CPU_Scaling Governor make permissions
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

View File

@@ -13,8 +13,7 @@
** See the License for the specific language governing permissions and
** limitations under the License.
*/
// NOTE VERSION_C
#define REVISION_C "RC4.7009.1."
#define REVISION_C "CM.7.0.1."
// #define LOG_NDEBUG 0
#define LOG_TAG "QualcommCameraHardware"
@@ -73,55 +72,15 @@ extern "C" {
#define THUMBNAIL_BUFFER_SIZE (THUMBNAIL_WIDTH * THUMBNAIL_HEIGHT * 3/2)
#define DEFAULT_PREVIEW_SETTING 5
// basedon other devices framerate values 15
#define DEFAULT_FRAMERATE 15
#define PREVIEW_SIZE_COUNT (sizeof(preview_sizes)/sizeof(preview_size_type))
#define NOT_FOUND -1
#define LOG_PREVIEW false
#if DLOPEN_LIBMMCAMERA
#include <dlfcn.h>
void* (*LINK_cam_conf)(void *data);
void* (*LINK_cam_frame)(void *data);
bool (*LINK_jpeg_encoder_init)();
void (*LINK_jpeg_encoder_join)();
unsigned char (*LINK_jpeg_encoder_encode)(const char* file_name, const cam_ctrl_dimension_t *dimen,
const unsigned char* thumbnailbuf, int thumbnailfd,
const unsigned char* snapshotbuf, int snapshotfd,
common_crop_t *cropInfo);
int (*LINK_camframe_terminate)();
void (*LINK_cam_set_frame_callback)();
bool (*LINK_cam_release_frame)();
int8_t (*LINK_jpeg_encoder_setMainImageQuality)(uint32_t quality);
int8_t (*LINK_jpeg_encoder_setThumbnailQuality)(uint32_t quality);
int8_t (*LINK_jpeg_encoder_setRotation)(uint32_t rotation);
int8_t (*LINK_jpeg_encoder_setLocation)(const camera_position_type *location);
//
// callbacks
void (**LINK_mmcamera_camframe_callback)(struct msm_frame_t *frame);
void (**LINK_mmcamera_jpegfragment_callback)(uint8_t *buff_ptr,
uint32_t buff_size);
void (**LINK_mmcamera_jpeg_callback)(jpeg_event_t status);
#else
#define LINK_cam_conf cam_conf
#define LINK_cam_frame cam_frame
#define LINK_jpeg_encoder_init jpeg_encoder_init
#define LINK_jpeg_encoder_join jpeg_encoder_join
#define LINK_jpeg_encoder_encode jpeg_encoder_encode
#define LINK_camframe_terminate camframe_terminate
#define LINK_cam_set_frame_callback cam_set_frame_callback
#define LINK_cam_release_frame cam_release_frame
#define LINK_jpeg_encoder_setMainImageQuality jpeg_encoder_setMainImageQuality
#define LINK_jpeg_encoder_setThumbnailQuality jpeg_encoder_setThumbnailQuality
#define LINK_jpeg_encoder_setRotation jpeg_encoder_setRotation
#define LINK_jpeg_encoder_setLocation jpeg_encoder_setLocation
extern void (*mmcamera_camframe_callback)(struct msm_frame_t *frame);
extern void (*mmcamera_jpegfragment_callback)(uint8_t *buff_ptr,
uint32_t buff_size);
extern void (*mmcamera_jpeg_callback)(jpeg_event_t status);
#endif
} // extern "C"
@@ -412,14 +371,13 @@ bool QualcommCameraHardware::msgTypeEnabled(int32_t msgType)
}
#define ROUND_TO_PAGE(x) (((x)+0xfff)&~0xfff)
void QualcommCameraHardware::startCamera()
{
LOGV("startCamera E");
#if DLOPEN_LIBMMCAMERA
libmmcamera_target = ::dlopen("libmm-qcamera-tgt.so", RTLD_NOW);
LOGV("loading libmm-qcamera-tgt at %p", libmmcamera_target);
if (!libmmcamera_target) {
@@ -427,43 +385,9 @@ void QualcommCameraHardware::startCamera()
return;
}
#if 0 // useless now
*(void **)&LINK_cam_frame =
::dlsym(libmmcamera, "cam_frame");
*(void **)&LINK_camframe_terminate =
::dlsym(libmmcamera, "camframe_terminate");
*(void **)&LINK_jpeg_encoder_encode =
::dlsym(libmmcamera, "jpeg_encoder_encode");
*(void **)&LINK_jpeg_encoder_join =
::dlsym(libmmcamera, "jpeg_encoder_join");
*(void **)&LINK_mmcamera_camframe_callback =
::dlsym(libmmcamera, "mmframe_cb");
*LINK_mmcamera_camframe_callback = receive_camframe_callback;
*(void **)&LINK_jpeg_encoder_init =
::dlsym(libmmcamera, "jpeg_encoder_init");
*(void **)&LINK_mmcamera_jpeg_callback =
::dlsym(libmmcamera, "mm_jpeg_callback");
*LINK_mmcamera_jpeg_callback = receive_jpeg_callback;
*(void **)&LINK_mmcamera_jpegfragment_callback =
::dlsym(libmmcamera, "mm_jpegfragment_callback");
*LINK_mmcamera_jpegfragment_callback = receive_jpeg_fragment_callback;
*(void **)&LINK_cam_set_frame_callback =
::dlsym(libmmcamera, "cam_set_frame_callback");
*(void**)&LINK_jpeg_encoder_setMainImageQuality =
::dlsym(libmmcamera, "jpeg_encoder_setMainImageQuality");
*(void **)&LINK_cam_release_frame =
::dlsym(libmmcamera, "cam_release_frame");
#endif
*(void **)&LINK_cam_conf =
::dlsym(libmmcamera_target, "cam_conf");
#else
mmcamera_camframe_callback = receive_camframe_callback;
mmcamera_jpegfragment_callback = receive_jpeg_fragment_callback;
mmcamera_jpeg_callback = receive_jpeg_callback;
#endif // DLOPEN_LIBMMCAMERA
/* The control thread is in libcamera itself. */
LOGV("pthread_join on control thread");
if (pthread_join(w_thread, NULL) != 0) {
@@ -799,21 +723,6 @@ static void handler(int sig, siginfo_t *siginfo, void *context)
pthread_exit(NULL);
}
// Set transfer preview meanwhile new preview is captured
static void *prev_frame_click(void *user)
{
while (true) {
usleep(1);
if(bFramePresent) {
if(LOG_PREVIEW)
LOGV("PREVIEW ARRIVED !!!!!!");
receive_camframe_callback(frameA);
bFramePresent=false;
}
}
return NULL;
}
// customized camframe_callback function based on reassembled libmmcamera.so
// Routine coded by fn.fyodor and corrected by KalimochoAz
static void *cam_frame_click(void *data)
@@ -835,7 +744,7 @@ static void *cam_frame_click(void *data)
act.sa_sigaction = &handler;
act.sa_flags = SA_SIGINFO;
if (sigaction(SIGUSR1, &act, NULL) != 0) {
LOGE("sigaction in cam_frame failed");
LOGE("sigaction in cam_frame_click failed");
pthread_exit(NULL);
}
@@ -860,7 +769,6 @@ static void *cam_frame_click(void *data)
LOGE("MSM_CAM_IOCTL_RELEASE_FRAME_BUFFER error %s", strerror(errno));
else
receive_camframe_callback(frameA);
//bFramePresent=true;
} else
LOGE("MSM_CAM_IOCTL_GETFRAME error %s", strerror(errno));
pthread_mutex_unlock(&mutex_camframe);
@@ -874,7 +782,6 @@ static void *cam_frame_click(void *data)
}
// ************************************************************************************************************************************
//static cam_frame_start_parms frame_parms;
static int recordingState = 0;
static rat_t latitude[3];
@@ -1190,8 +1097,6 @@ void QualcommCameraHardware::deinitPreview(void)
// the frame-thread's callback. This we have to make the frame thread
// detached, and use a separate mechanism to wait for it to complete.
// camframe_terminate() never been used
if (mFrameThreadRunning) {
// Send a exit signal to stop the frame thread
if (!pthread_kill(mFrameThread, SIGUSR1)) {
@@ -1322,14 +1227,10 @@ void QualcommCameraHardware::release()
LOGV("release E");
Mutex::Autolock l(&mLock);
#if DLOPEN_LIBMMCAMERA
if (libmmcamera_target == NULL) {
LOGE("ERROR: multiple release!");
return;
}
#else
#warning "Cannot detect multiple release when not dlopen()ing libmmcamera!"
#endif
int rc;
struct msm_ctrl_cmd_t ctrlCmd;
@@ -1376,13 +1277,11 @@ void QualcommCameraHardware::release()
close(fd_frame);
fd_frame = -1;
#if DLOPEN_LIBMMCAMERA
if (libmmcamera_target) {
::dlclose(libmmcamera_target);
LOGV("dlclose(libmmcamera_target)");
libmmcamera_target = NULL;
}
#endif
Mutex::Autolock lock(&singleton_lock);
singleton_releasing = true;
@@ -2033,7 +1932,7 @@ void QualcommCameraHardware::setZoom()
LOGE("Failed to get zoomratios...");
delete zoomRatios;
} else {
LOGE("zoom ratios failed to acquire memory");
LOGV("zoom ratios set");
}
}
} else {

View File

@@ -109,6 +109,9 @@
<ImageEncoding quality="90" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
<Camera previewFrameRate="0" />
</CamcorderProfiles>
<EncoderOutputFileFormat name="3gp" />

View File

@@ -16,7 +16,7 @@ ro.ril.enable.a52=0
ro.ril.enable.a53=1
ro.ril.enable.dtm = 1
ro.ril.gprsclass = 12
ro.ril.hsdpa.category=8
ro.ril.hsdpa.category=10
ro.ril.hsupa.category=5
ro.ril.hsxpa=2
ro.ril.def.agps.mode = 2
@@ -40,6 +40,9 @@ view.touch_slop=15
view.minimum_fling_velocity=25
view.scroll_friction=0.008
# No Autofocus device
ro.workaround.noautofocus=1
# Default network type
# 0 => WCDMA Preferred.
ro.telephony.default_network=0