/* * This function sets the DefCor dampers */ t_damper_error_code CDefCorDamper::SetDamper( const t_defcor_damper_id aDamperId, const float* pValues, const int aNumRows, const int aNumCols) { IN0("\n"); OstTraceFiltStatic0(TRACE_FLOW, "Entry CDefCorDamper::SetDamper", (mTraceObject)); t_damper_error_code err = DAMPER_OK; if(aDamperId<0 || aDamperId>=DEFCOR_DAMPERS_NUM) { DBGT_ERROR("Invalid damper Id: %d\n", aDamperId); OstTraceFiltStatic1(TRACE_ERROR, "Invalid damper Id: %d", (mTraceObject), aDamperId); OUTR(" ",DAMPER_INVALID_ARGUMENT); OstTraceFiltStatic1(TRACE_FLOW, "Exit CDefCorDamper::SetDamper (%d)", (mTraceObject), DAMPER_INVALID_ARGUMENT); return DAMPER_INVALID_ARGUMENT; } MSG3("[%s] NumRows=%d, NumCols=%d\n", KDefCorDamperInfo[aDamperId].name, aNumRows, aNumCols); OstTraceFiltStatic3(TRACE_DEBUG, "[KDefCorDamperInfo[%d].name] NumRows=%d, NumCols=%d", (mTraceObject), aDamperId, aNumRows, aNumCols); err = DoSetDamper( aDamperId, pValues, aNumRows, aNumCols); if(err!=DAMPER_OK) { DBGT_ERROR("[%s] failed to set damper: err=%d\n", KDefCorDamperInfo[aDamperId].name, err); OstTraceFiltStatic2(TRACE_ERROR, "[KDefCorDamperInfo[%d].name] failed to set damper: err=%d", (mTraceObject), aDamperId, err); OUTR(" ",err); OstTraceFiltStatic1(TRACE_FLOW, "Exit CDefCorDamper::SetDamper (%d)", (mTraceObject), err); return err; } OUTR(" ",DAMPER_OK); OstTraceFiltStatic1(TRACE_FLOW, "Exit CDefCorDamper::SetDamper (%d)", (mTraceObject), DAMPER_OK); return DAMPER_OK; }
OMX_ERRORTYPE JPEGEnc_ArmNmfProcessingComponent::allocateBuffer( OMX_U32 nPortIndex, OMX_U32 nBufferIndex, OMX_U32 nSizeBytes, OMX_U8 **ppData, void **bufferAllocInfo, void **portPrivateInfo) { OstTraceFiltStatic1(TRACE_API, "In JPEGEnc_ArmNmfProcessingComponent : In allocateBuffer <line no %d> ",pProxyComponent,__LINE__); OMX_ERRORTYPE error; if (pProxyComponent->isHVABased) { error = allocateBufferVisual(nPortIndex, nBufferIndex, nSizeBytes, ppData, bufferAllocInfo, portPrivateInfo,OMX_FALSE); } else { error = allocateBufferVisual(nPortIndex, nBufferIndex, nSizeBytes, ppData, bufferAllocInfo, portPrivateInfo,OMX_TRUE); } if (error != OMX_ErrorNone) { OstTraceInt2(TRACE_ERROR, "In JPEGEnc_ArmNmfProcessingComponent : Error While allocating buffer errorType : 0x%x error line no %d\n",error,__LINE__); //jpegenc_armnmf_assert(error,__LINE__, OMX_TRUE); return error; } OstTraceFiltStatic3(TRACE_FLOW, "In JPEGEnc_ArmNmfProcessingComponent : In allocateBuffer nPortIndex : %d nSizeBytes : %d <line no %d> ",pProxyComponent,nPortIndex,nSizeBytes,__LINE__); OstTraceFiltStatic1(TRACE_API, "In JPEGEnc_ArmNmfProcessingComponent : allocateBuffer DONE <line no %d> ",pProxyComponent,__LINE__); return OMX_ErrorNone; }
/* * This function sets the sharpening damper */ t_damper_error_code CSharpeningDamperLR::SetDamper( const t_sharpening_damper_lr_id aDamperId, const float* pValues, const int aNumRows, const int aNumCols) { IN0("\n"); OstTraceFiltStatic0(TRACE_FLOW, "Entry CSharpeningDamperLR::SetDamper", (mTraceObject)); t_damper_error_code err = DAMPER_OK; if(aDamperId<0 || aDamperId>=SHARPENING_DAMPERS_LR_NUM) { DBGT_ERROR("Invalid damper Id: %d\n", aDamperId); OstTraceFiltStatic1(TRACE_ERROR, "Invalid damper Id: %d", (mTraceObject), aDamperId); OUTR(" ",DAMPER_INVALID_ARGUMENT); OstTraceFiltStatic1(TRACE_FLOW, "Exit CSharpeningDamperLR::SetDamper (%d)", (mTraceObject), DAMPER_INVALID_ARGUMENT); return DAMPER_INVALID_ARGUMENT; } MSG3("[%s] NumRows=%d, NumCols=%d\n", SHARPENING_DAMPER_LR_NAME(aDamperId), aNumRows, aNumCols); OstTraceFiltStatic3(TRACE_DEBUG, "SHARPENING_DAMPER_LR_NAME(%d) NumRows=%d, NumCols=%d", (mTraceObject), aDamperId, aNumRows, aNumCols); err = DoSetDamper( aDamperId, pValues, aNumRows, aNumCols); if(err!=DAMPER_OK) { DBGT_ERROR("[%s] failed to set damper: err=%d\n", SHARPENING_DAMPER_LR_NAME(aDamperId), err); OstTraceFiltStatic2(TRACE_ERROR, "SHARPENING_DAMPER_LR_NAME(%d) failed to set damper: err=%d", (mTraceObject), aDamperId, err); OUTR(" ",err); OstTraceFiltStatic1(TRACE_FLOW, "Exit CSharpeningDamperLR::SetDamper (%d)", (mTraceObject), err); return err; } OUTR(" ",DAMPER_OK); OstTraceFiltStatic1(TRACE_FLOW, "Exit CSharpeningDamperLR::SetDamper (%d)", (mTraceObject), DAMPER_OK); return DAMPER_OK; }
TuningLoaderMgrError_t CTuningLoaderManager::saveNvmTuningData(const t_camera_info* pCamInfo,unsigned char* pNvm, t_uint32 aSize) { IN0("\n"); OstTraceFiltStatic0(TRACE_FLOW, "Entry CTuningLoaderManager::saveNvmTuningData", (mTraceObject)); // Check if constructed if(iNmfInstance == NULL) { MSG0("Instance not constructed\n"); OstTraceFiltStatic0(TRACE_ERROR, "Instance not constructed", (mTraceObject)); OUTR(" ",TUNING_LOADER_MGR_NOT_CONSTRUCTED); OstTraceFiltStatic1(TRACE_FLOW, "Exit CTuningLoaderManager::loadNvmTuningData (%d)", (mTraceObject), TUNING_LOADER_MGR_NOT_CONSTRUCTED); return TUNING_LOADER_MGR_NOT_CONSTRUCTED; } // Aguments sanity check if( (pCamInfo == NULL) || (pNvm ==NULL) || (aSize == 0)) { MSG1("Bad argument: pCamInfo=%x, pNvm=0x%x, aSize=%x\n", (unsigned int)pCamInfo,(unsigned int)pNvm,(unsigned int)aSize); OstTraceFiltStatic3(TRACE_ERROR, "Bad argument: pCamInfo=0x%x pNvm=0x%x, aSize=%d", (mTraceObject), (t_uint32)pCamInfo,(t_uint32)pNvm,aSize); OUTR(" ",TUNING_LOADER_MGR_BAD_ARGUMENT); OstTraceFiltStatic1(TRACE_FLOW, "Exit CTuningLoaderManager::loadNvmTuningData (%d)", (mTraceObject), TUNING_LOADER_MGR_BAD_ARGUMENT); return TUNING_LOADER_MGR_BAD_ARGUMENT; } // Send command to NMF MSG0("Send 'SaveNvmTuning' command to NMF\n"); OstTraceFiltStatic0(TRACE_DEBUG, "Send 'loadNvmTuning' command to NMF", (mTraceObject)); iNmfQueryIntf.saveNvmTuning(*pCamInfo,(t_uint32)pNvm,aSize); OUTR(" ",TUNING_LOADER_MGR_OK); OstTraceFiltStatic1(TRACE_FLOW, "Exit CTuningLoaderManager::loadNvmTuningData (%d)", (mTraceObject), TUNING_LOADER_MGR_OK); return TUNING_LOADER_MGR_OK; }
void main(void) { // Test All GROUPS OstTraceInt0 (TRACE_ERROR, "ST_OSTTC_TEST2 TRACE_ERROR: OstTraceInt0"); OstTraceInt0 (TRACE_WARNING, "ST_OSTTC_TEST2 TRACE_WARNING: OstTraceInt0"); OstTraceInt0 (TRACE_FLOW, "ST_OSTTC_TEST2 TRACE_FLOW: OstTraceInt0"); OstTraceInt0 (TRACE_DEBUG, "ST_OSTTC_TEST2 TRACE_DEBUG: OstTraceInt0"); OstTraceInt0 (TRACE_API, "ST_OSTTC_TEST2 TRACE_API: OstTraceInt0"); OstTraceInt0 (TRACE_OMX_API, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceInt0"); OstTraceInt0 (TRACE_OMX_BUFFER, "ST_OSTTC_TEST2 TRACE_OMX_BUFFER: OstTraceInt0"); OstTraceInt0 (TRACE_RESERVED, "ST_OSTTC_TEST2 TRACE_OMX_RESERVED: OstTraceInt0"); OstTraceInt0 (TRACE_MY_GROUP_0, "ST_OSTTC_TEST2 TRACE_MY_GROUP_0: OstTraceInt0"); OstTraceInt0 (TRACE_MY_GROUP_1, "ST_OSTTC_TEST2 TRACE_MY_GROUP_1: OstTraceInt0"); OstTraceInt0 (TRACE_MY_GROUP_2, "ST_OSTTC_TEST2 TRACE_MY_GROUP_2: OstTraceInt0"); OstTraceInt0 (TRACE_MY_GROUP_3, "ST_OSTTC_TEST2 TRACE_MY_GROUP_3: OstTraceInt0"); OstTraceInt0 (TRACE_MY_GROUP_4, "ST_OSTTC_TEST2 TRACE_MY_GROUP_4: OstTraceInt0"); OstTraceInt0 (TRACE_MY_GROUP_5, "ST_OSTTC_TEST2 TRACE_MY_GROUP_5: OstTraceInt0"); OstTraceInt0 (TRACE_MY_GROUP_6, "ST_OSTTC_TEST2 TRACE_MY_GROUP_6: OstTraceInt0"); OstTraceInt0 (TRACE_MY_GROUP_7, "ST_OSTTC_TEST2 TRACE_MY_GROUP_7: OstTraceInt0"); // Test OstTraceIntx API OstTraceInt1 (TRACE_ERROR, "ST_OSTTC_TEST2 TRACE_ERROR: OstTraceInt1: %d", test); OstTraceInt2 (TRACE_WARNING, "ST_OSTTC_TEST2 TRACE_WARNING: OstTraceInt2: %d %d", test, test); OstTraceInt3 (TRACE_MY_GROUP_6, "ST_OSTTC_TEST2 TRACE_MY_GROUP_6: OstTraceInt3: %d %d %d", test, test, test); OstTraceInt4 (TRACE_MY_GROUP_7, "ST_OSTTC_TEST2 TRACE_MY_GROUP_7: OstTraceInt4: %d %d %d %d", test, test, test, test); // Test OstTraceFiltStaticx API OstTraceFiltInst0 (TRACE_OMX_API, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltStatic0:"); OstTraceFiltInst1 (TRACE_OMX_API, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltStatic1 : %d", test); OstTraceFiltInst2 (TRACE_OMX_API, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltStatic2 : %d %d", test, test); OstTraceFiltInst3 (TRACE_OMX_API, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltStatic3 : %d %d %d", test, test, test); OstTraceFiltInst4 (TRACE_OMX_API, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltStatic4 : %d %d %d %d", test, test, test, test); // Test OstTraceFiltStaticx API OstTraceFiltStatic0 (TRACE_OMX_API, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltStatic0:"); OstTraceFiltStatic1 (TRACE_OMX_API, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltStatic1 : %d", test); OstTraceFiltStatic2 (TRACE_OMX_API, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltStatic2 : %d %d", test, test); OstTraceFiltStatic3 (TRACE_OMX_API, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltStatic3 : %d %d %d", test, test, test); OstTraceFiltStatic4 (TRACE_OMX_API, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltStatic4 : %d %d %d %d", test, test, test, test); // Test trace Buffer API OstTraceArray (TRACE_RESERVED, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceArray %{int8[]}", ptr, size); OstTraceFiltInstData(TRACE_RESERVED, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltInstData %{int8[]}", ptr, size); OstTraceFiltStaticData(TRACE_RESERVED, "ST_OSTTC_TEST2 TRACE_OMX_API: OstTraceFiltInstData %{int8[]}",aInstPtr, ptr, size); // Check Syntax ALL below syntax shall be parsed OstTraceInt0 (TRACE_ERROR, "ST_OSTTC_TEST2 TRACE_ERROR: OstTraceInt0"); OstTraceInt0 ( TRACE_ERROR , "ST_OSTTC_TEST2 TRACE_ERROR: OstTraceInt0"); }
SCF_STATE CAM_SM::PowerUp_STC_SendDataToFirmware(s_scf_event const *e) { switch (e->sig) { case SCF_STATE_ENTRY_SIG: { ENTRY; MSG0("PowerUp_STC_SendDataToFirmware-SCF_STATE_ENTRY_SIG\n"); OstTraceFiltStatic0(TRACE_DEBUG, "PowerUp_STC_SendDataToFirmware-SCF_STATE_ENTRY_SIG", (&mENSComponent)); CTuningBinData* pFwTuningObj = NULL; // Get the firmware tuning object pFwTuningObj = pTuningDataBase->getObject(TUNING_OBJ_FIRMWARE_DATA); // Check that the firmware tuning data fit into the shared memory chunk if( (csm_uint32_t)pFwTuningObj->getSize() > pFwShmChunk->size) { MSG0("PowerUp_STC_SendDataToFirmware: Tuning data shared chunk too small:\n"); OstTraceFiltStatic0(TRACE_DEBUG, "PowerUp_STC_SendDataToFirmware: Tuning data shared chunk too small:", (&mENSComponent)); MSG1("PowerUp_STC_SendDataToFirmware: Shared mem size = %ld\n", pFwShmChunk->size); OstTraceFiltStatic1(TRACE_DEBUG, "PowerUp_STC_SendDataToFirmware: Shared mem size = %ld", (&mENSComponent), pFwShmChunk->size); MSG1("PowerUp_STC_SendDataToFirmware: Actual data size = %d\n", pFwTuningObj->getSize()); OstTraceFiltStatic1(TRACE_DEBUG, "PowerUp_STC_SendDataToFirmware: Actual data size = %d", (&mENSComponent), pFwTuningObj->getSize()); DBC_ASSERT(0); return 0; } // Copy the tuning data into the firmware address space MSG3("PowerUp_STC_SendDataToFirmware: Copying data %p, size %d, into firwmare address space %p\n", pFwTuningObj->getAddr(), pFwTuningObj->getSize(), pFwShmChunk->ispLogicalAddress); OstTraceFiltStatic3(TRACE_DEBUG, "PowerUp_STC_SendDataToFirmware: Copying data 0x%x, size %d, into firwmare address space 0x%x", (&mENSComponent), (t_uint32)pFwTuningObj->getAddr(), pFwTuningObj->getSize(), (t_uint32)pFwShmChunk->ispLogicalAddress); if (NULL != pFwTuningObj->getAddr()) { memcpy(pFwShmChunk->armLogicalAddress, pFwTuningObj->getAddr(), pFwTuningObj->getSize()); } else { DBC_ASSERT(0); return 0; } // Flush the memory cache (so that consistent data are read by firmware) camSharedMemError_t shmErr = CAM_SHARED_MEM_ERR_NONE; shmErr = pSharedMemory->cacheClean(CAM_SHARED_MEM_CHUNK_FW_CONFIG); if (shmErr != CAM_SHARED_MEM_ERR_NONE) { DBGT_ERROR("PowerUp_STC_SendDataToFirmware: Failed to flush shared memory chunk, err=%d\n", shmErr); OstTraceFiltStatic1(TRACE_ERROR, "PowerUp_STC_SendDataToFirmware: Failed to flush shared memory chunk, err=%d", (&mENSComponent), shmErr); DBC_ASSERT(0); return 0; } // Send the address (firmware address space) to XP70 pIspctlCom->queuePE(Sensor_Tuning_Control_u32_SubBlock_Data_Address_Byte0, (t_uint32)pFwShmChunk->ispLogicalAddress ); pIspctlCom->processQueue(); return 0; } case SCF_STATE_EXIT_SIG: { EXIT; return 0; } case EVT_ISPCTL_LIST_INFO_SIG: { MSG0("PowerUp_STC_SendDataToFirmware-EVT_ISPCTL_LIST_INFO_SIG\n"); OstTraceFiltStatic0(TRACE_DEBUG, "PowerUp_STC_SendDataToFirmware-EVT_ISPCTL_LIST_INFO_SIG", (&mENSComponent)); if (e->type.ispctlInfo.info_id != ISP_WRITELIST_DONE) break; SCF_TRANSIT_TO(&CAM_SM::PowerUp_STC_Done); return 0; } default: break; } return SCF_STATE_PTR(&COM_SM::SHARED_ControlingISPState_Boot); }