MT6761 android11 linux4.19上IMX258摄像头点不亮原因备忘

MT6761 android11 linux4.19上IMX258摄像头点亮:

一.情况:

        1.id号可读到,但是camera打不开

二.原因是:vendor\mediatek\proprietary\hardware\mtkcam3\pipeline\policy\config\SensorSettingPolicy.cpp文件中

                MINT32 forceSensorMode = ::property_get_int32("vendor.debug.cameng.force_sensormode", -1);
                if( forceSensorMode != -1 )
                {
                    switch( forceSensorMode )
                    {
                    case SENSOR_SCENARIO_ID_NORMAL_PREVIEW:
                         res = pStatic->mSetting[eNORMAL_PREVIEW];
                         break;
                    case SENSOR_SCENARIO_ID_NORMAL_CAPTURE:
                         res = pStatic->mSetting[eNORMAL_CAPTURE];
                         break;
                    case SENSOR_SCENARIO_ID_NORMAL_VIDEO:
                         res = pStatic->mSetting[eNORMAL_VIDEO];
                         break;
                    case SENSOR_SCENARIO_ID_SLIM_VIDEO1:
                        res = pStatic->mSetting[eSLIM_VIDEO1];
                        break;
                    case SENSOR_SCENARIO_ID_SLIM_VIDEO2:
                        res = pStatic->mSetting[eSLIM_VIDEO2];
                        break;
                    case SENSOR_SCENARIO_ID_CUSTOM1:
                        res = pStatic->mSetting[eCUSTOM1];
                        break;
                    case SENSOR_SCENARIO_ID_CUSTOM2:
                        res = pStatic->mSetting[eCUSTOM2];
                        break;
                    case SENSOR_SCENARIO_ID_CUSTOM3:
                        res = pStatic->mSetting[eCUSTOM3];
                        break;
                    case SENSOR_SCENARIO_ID_CUSTOM4:
                        res = pStatic->mSetting[eCUSTOM4];
                        break;
                    case SENSOR_SCENARIO_ID_CUSTOM5:
                        res = pStatic->mSetting[eCUSTOM5];
                        break;
                    default:
                        MY_LOGW("Unknown sensorMode: %d", forceSensorMode);
                        break;
                    }
                    CAM_ULOGMI("Force set sensorMode: %d. Selected sensorMode: %d", forceSensorMode, res.sensorMode);
                }

模式错误导致(估计和效果文件有关)

三.解决办法:

把这句:

                MINT32 forceSensorMode = ::property_get_int32("vendor.debug.cameng.force_sensormode", -1);

修改为:

                MINT32 forceSensorMode = ::property_get_int32("vendor.debug.cameng.force_sensormode", 0);

得解!

你可能感兴趣的:(MTK,servlet,服务器,java)