diff --git a/click.mk b/click.mk index aa8a862..9ceba1a 100644 --- a/click.mk +++ b/click.mk @@ -90,7 +90,7 @@ PRODUCT_COPY_FILES += \ device/htc/click/custom/rzscontrol:system/bin/rzscontrol PRODUCT_PROPERTY_OVERRIDES += \ - ro.media.dec.jpeg.memcap=10000000 + ro.media.dec.jpeg.memcap=20000000 PRODUCT_PROPERTY_OVERRIDES += \ rild.libpath=/system/lib/libhtc_ril.so \ diff --git a/libcamera/QualcommCameraHardware.cpp b/libcamera/QualcommCameraHardware.cpp index eea07bb..c28852a 100644 --- a/libcamera/QualcommCameraHardware.cpp +++ b/libcamera/QualcommCameraHardware.cpp @@ -14,7 +14,7 @@ ** limitations under the License. */ // NOTE VERSION_C -#define REVISION_C "7006.3." +#define REVISION_C "7007.2." //#define LOG_NDEBUG 0 #define LOG_TAG "QualcommCameraHardware" @@ -59,8 +59,6 @@ extern "C" { #include "msm_camera.h" // Tattoo kernel -#define REVISION "0.4" - // init for Tattoo #define THUMBNAIL_WIDTH_STR "192" #define THUMBNAIL_HEIGHT_STR "144" @@ -140,6 +138,7 @@ static preview_size_type preview_sizes[] = { { 288, 192 }, { 240, 240 }, // QCIF { 240, 160 }, // SQVGA + { 176, 144 } }; static int attr_lookup(const struct str_map *const arr, const char *name) @@ -314,7 +313,7 @@ void QualcommCameraHardware::initDefaultParameters() p.set(CameraParameters::KEY_SUPPORTED_EFFECTS, effect_values); p.set(CameraParameters::KEY_SUPPORTED_WHITE_BALANCE, whitebalance_values); p.set(CameraParameters::KEY_SUPPORTED_PICTURE_SIZES, "2048x1536,1600x1200,1024x768"); - p.set(CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES, "320x240,240x160,192x144"); + p.set(CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES, "320x240,240x160,176x144"); if (setParameters(p) != NO_ERROR) { LOGE("Failed to set default parameters?!"); @@ -453,6 +452,7 @@ void QualcommCameraHardware::startCamera() else LOGV("Config thread created successfully"); + // init this in order to avoid false preview displays bFramePresent=false; LOGV("startCamera X"); @@ -824,7 +824,7 @@ static void *prev_frame_click(void *user) return NULL; } -// customized cam_frame function based on reassembled libmmcamera.so +// customized camframe_callback function based on reassembled libmmcamera.so static void *cam_frame_click(void *data) { LOGV("Entering cam_frame_click"); @@ -940,26 +940,26 @@ void QualcommCameraHardware::runJpegEncodeThread(void *data) bool encode_location = true; camera_position_type pt; - #define PARSE_LOCATION(what,type,fmt,desc) do { \ - pt.what = 0; \ - const char *what##_str = mParameters.get("gps-"#what); \ - LOGD("GPS PARM %s --> [%s]", "gps-"#what, what##_str); \ - if (what##_str) { \ - type what = 0; \ - if (sscanf(what##_str, fmt, &what) == 1) \ - pt.what = what; \ - else { \ - LOGE("GPS " #what " %s could not" \ - " be parsed as a " #desc, what##_str); \ - encode_location = false; \ - } \ - } \ - else { \ - LOGD("GPS " #what " not specified: " \ - "defaulting to zero in EXIF header."); \ - encode_location = false; \ - } \ - } while(0) + #define PARSE_LOCATION(what,type,fmt,desc) do { \ + pt.what = 0; \ + const char *what##_str = mParameters.get("gps-"#what); \ + LOGD("GPS PARM %s --> [%s]", "gps-"#what, what##_str); \ + if (what##_str) { \ + type what = 0; \ + if (sscanf(what##_str, fmt, &what) == 1) \ + pt.what = what; \ + else { \ + LOGE("GPS " #what " %s could not" \ + " be parsed as a " #desc, what##_str); \ + encode_location = false; \ + } \ + } \ + else { \ + LOGD("GPS " #what " not specified: " \ + "defaulting to zero in EXIF header."); \ + encode_location = false; \ + } \ + } while(0) PARSE_LOCATION(timestamp, long, "%ld", "long"); if (!pt.timestamp) pt.timestamp = time(NULL); @@ -967,7 +967,7 @@ void QualcommCameraHardware::runJpegEncodeThread(void *data) PARSE_LOCATION(latitude, double, "%lf", "double float"); PARSE_LOCATION(longitude, double, "%lf", "double float"); - #undef PARSE_LOCATION + #undef PARSE_LOCATION if (encode_location) { LOGD("setting image location ALT %d LAT %lf LON %lf", @@ -1069,8 +1069,6 @@ bool QualcommCameraHardware::initPreview() LOGV("set preview callback"); LINK_cam_set_frame_callback(); - // TODO: memset(*s, 0, 0x14) - mFrameThreadRunning = !pthread_create(&mFrameThread, NULL, cam_frame_click, //frame_thread, diff --git a/media_profiles.xml b/media_profiles.xml index 0a17c71..79fb18b 100644 --- a/media_profiles.xml +++ b/media_profiles.xml @@ -77,14 +77,27 @@ --> - + + + + - + - @@ -125,14 +132,20 @@ In other words, the applications won't be able to use the codec or query the capabilities of the codec at all if it is disabled --> - + minFrameRate="1" maxFrameRate="30" /> + + @@ -142,6 +155,11 @@ minSampleRate="8000" maxSampleRate="16000" minChannels="1" maxChannels="1" /> + +