Skip to content

Commit

Permalink
camera: works!
Browse files Browse the repository at this point in the history
  • Loading branch information
Daz Jones committed Dec 27, 2012
1 parent 9dce7ae commit b80be87
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions camera/QualcommCameraHardware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@ static liveshotState liveshot_state = LIVESHOT_DONE;
#define Q12 4096

static const target_map targetList [] = {
{ "msm7x25", TARGET_MSM7625 },
{ "msm7x25a", TARGET_MSM7625A },
{ "msm7x27", TARGET_MSM7627 },
{ "msm7625", TARGET_MSM7625 },
{ "msm7625a", TARGET_MSM7625A },
{ "msm7627", TARGET_MSM7627 },
{ "msm7x27a", TARGET_MSM7627A },
{ "qsd8250", TARGET_QSD8250 },
{ "msm7x30", TARGET_MSM7630 },
{ "msm7630", TARGET_MSM7630 },
{ "msm8660", TARGET_MSM8660 }

};
Expand Down Expand Up @@ -1215,7 +1215,7 @@ void QualcommCameraHardware::storeTargetType(void) {
if( !strncmp(mDeviceName, targetList[i].targetStr, 7)) {
mCurrentTarget = targetList[i].targetEnum;
if(mCurrentTarget == TARGET_MSM7625) {
if(!strncmp(mDeviceName, "msm7x25a" , 8))
if(!strncmp(mDeviceName, "msm7625a" , 8))
mCurrentTarget = TARGET_MSM7625A;
}
if(mCurrentTarget == TARGET_MSM7627) {
Expand Down Expand Up @@ -2094,6 +2094,8 @@ void QualcommCameraHardware::initDefaultParameters()
bool QualcommCameraHardware::startCamera()
{
LOGV("startCamera E");
// Hack for now
mCurrentTarget = TARGET_MSM7627A;
if( mCurrentTarget == TARGET_MAX ) {
LOGE(" Unable to determine the target type. Camera will not work ");
return false;
Expand Down Expand Up @@ -2246,11 +2248,13 @@ bool QualcommCameraHardware::startCamera()
}
LOGV("startCamera preview_sizes %p previewSizeCount %d", preview_sizes, PREVIEW_SIZE_COUNT);

/*
mCfgControl.mm_camera_query_parms(CAMERA_PARM_HFR_SIZE, (void **)&hfr_sizes, &HFR_SIZE_COUNT);
if ((hfr_sizes == NULL) || (!HFR_SIZE_COUNT)) {
LOGE("startCamera X: could not get hfr sizes");
return false;
}
*/
LOGV("startCamera hfr_sizes %p hfrSizeCount %d", hfr_sizes, HFR_SIZE_COUNT);


Expand Down Expand Up @@ -9826,11 +9830,11 @@ extern "C" void HAL_getCameraInfo(int cameraId, struct CameraInfo* cameraInfo)
// enough.
if(cameraInfo->facing == CAMERA_FACING_FRONT)
cameraInfo->orientation = HAL_cameraInfo[i].sensor_mount_angle;
else if( !strncmp(mDeviceName, "msm7x25a", 8))
else if( !strncmp(mDeviceName, "msm7625a", 8))
cameraInfo->orientation = HAL_cameraInfo[i].sensor_mount_angle;
else if( !strncmp(mDeviceName, "msm7x27a", 8))
cameraInfo->orientation = HAL_cameraInfo[i].sensor_mount_angle;
else if( !strncmp(mDeviceName, "msm7x27", 7))
else if( !strncmp(mDeviceName, "msm7627", 7))
cameraInfo->orientation = HAL_cameraInfo[i].sensor_mount_angle;
else if( !strncmp(mDeviceName, "msm8660", 7))
cameraInfo->orientation = HAL_cameraInfo[i].sensor_mount_angle;
Expand Down

4 comments on commit b80be87

@alanorth
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm so far away from a computer right now but I am anxious to try this on U8185 when I get home in a few weeks... Remind me!

@Fagulhas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, currently on vacations!!

@dazjo
Copy link
Owner

@dazjo dazjo commented on b80be87 Dec 28, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik it needs libmmjpeg, liboemcamera and your libchromatix props. It needs some work, but preview works flawlessly.

@dazjo
Copy link
Owner

@dazjo dazjo commented on b80be87 Dec 28, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw: jb_chocolate kernel is now up and running again, couple of little issues to work out but it fixes some of our other issues

Please sign in to comment.