1 /* 2 * Copyright (c) 2019 Rockchip Corporation 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17 18 #include "rk_aiq_user_api_ahdr.h" 19 #include "RkAiqHandleInt.h" 20 21 RKAIQ_BEGIN_DECLARE 22 23 #ifdef RK_SIMULATOR_HW 24 #define CHECK_USER_API_ENABLE 25 #endif 26 27 /* 28 XCamReturn 29 rk_aiq_user_api_ahdr_SetAttrib(const rk_aiq_sys_ctx_t* sys_ctx, ahdr_attrib_t attr) 30 { 31 amerge_attrib_t mergeAttr; 32 memset(&mergeAttr, 0, sizeof(amerge_attrib_t)); 33 atmo_attrib_t tmoAttr; 34 memset(&tmoAttr, 0, sizeof(atmo_attrib_t)); 35 36 TransferSetData(&mergeAttr, &tmoAttr, &attr); 37 38 XCamReturn ret_amerge = rk_aiq_user_api2_amerge_SetAttrib(sys_ctx, mergeAttr); 39 XCamReturn ret_atmo = rk_aiq_user_api2_atmo_SetAttrib(sys_ctx, tmoAttr); 40 41 42 if (ret_amerge != XCAM_RETURN_NO_ERROR) 43 return ret_amerge; 44 45 if (ret_atmo != XCAM_RETURN_NO_ERROR) 46 return ret_atmo; 47 48 return XCAM_RETURN_NO_ERROR; 49 } 50 51 XCamReturn 52 rk_aiq_user_api_ahdr_GetAttrib(const rk_aiq_sys_ctx_t* sys_ctx, ahdr_attrib_t* attr) 53 { 54 amerge_attrib_t mergeAttr; 55 memset(&mergeAttr, 0, sizeof(amerge_attrib_t)); 56 atmo_attrib_t tmoAttr; 57 memset(&tmoAttr, 0, sizeof(atmo_attrib_t)); 58 59 TransferGetData(&mergeAttr, &tmoAttr, attr); 60 61 XCamReturn ret_amerge = rk_aiq_user_api2_amerge_GetAttrib(sys_ctx, &mergeAttr); 62 XCamReturn ret_atmo = rk_aiq_user_api2_atmo_GetAttrib(sys_ctx, &tmoAttr); 63 64 if (ret_amerge != XCAM_RETURN_NO_ERROR) 65 return ret_amerge; 66 67 if (ret_atmo != XCAM_RETURN_NO_ERROR) 68 return ret_atmo; 69 70 return XCAM_RETURN_NO_ERROR; 71 } 72 */ 73 RKAIQ_END_DECLARE 74