author | Dan Zhang <danielzhang@google.com> | 2019-05-16 03:18:37 (GMT) |
---|---|---|
committer | Android Partner Code Review <android-gerrit-partner@google.com> | 2019-05-16 03:18:37 (GMT) |
commit | 492c4f31f2af9bb1d66fa5533e97ba6d1fc4d552 (patch) | |
tree | fceb692e73f178f3ead40637b8a492cdcc450700 | |
parent | c6f3426d064215e4d286de4f96d730fedd0db3af (diff) | |
parent | 468f23cea62f80c37bac6169c3713754a480a0e5 (diff) | |
download | amlogic-p-tv-atom.zip amlogic-p-tv-atom.tar.gz amlogic-p-tv-atom.tar.bz2 |
Merge "hardware:enable PRODUCT_SHIPPING_API_LEVEL := 28 [3/8]" into p-tv-dr-dev
50 files changed, 354 insertions, 60 deletions
diff --git a/camera/ANativeWindowDisplayAdapter.cpp b/camera/ANativeWindowDisplayAdapter.cpp index c18b161..c18b161 100755..100644 --- a/camera/ANativeWindowDisplayAdapter.cpp +++ b/camera/ANativeWindowDisplayAdapter.cpp diff --git a/camera/Android.mk b/camera/Android.mk index 822195f..4c4eeda 100755..100644 --- a/camera/Android.mk +++ b/camera/Android.mk @@ -6,7 +6,7 @@ ifneq ($(CAMHAL_V3),true) CAMHAL_GIT_VERSION="$(shell cd $(LOCAL_PATH);git log | grep commit -m 1 | cut -d' ' -f 2)" CAMHAL_GIT_UNCOMMIT_FILE_NUM=$(shell cd $(LOCAL_PATH);git diff | grep +++ -c) CAMHAL_LAST_CHANGED="$(shell cd $(LOCAL_PATH);git log | grep Date -m 1)" -CAMHAL_BUILD_TIME=" $(shell date)" +CAMHAL_BUILD_TIME=" $(shell date --date=00:00)" CAMHAL_BUILD_NAME=" $(shell echo ${LOGNAME})" CAMHAL_BRANCH_NAME="$(shell cd $(LOCAL_PATH);git branch -a | sed -n '/'*'/p')" CAMHAL_BUILD_MODE=$(shell echo ${TARGET_BUILD_VARIANT}) diff --git a/camera/AppCallbackNotifier.cpp b/camera/AppCallbackNotifier.cpp index 4b30494..4b30494 100755..100644 --- a/camera/AppCallbackNotifier.cpp +++ b/camera/AppCallbackNotifier.cpp diff --git a/camera/BaseCameraAdapter.cpp b/camera/BaseCameraAdapter.cpp index 4301a34..4301a34 100755..100644 --- a/camera/BaseCameraAdapter.cpp +++ b/camera/BaseCameraAdapter.cpp diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index fe989df..fe989df 100755..100644 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp diff --git a/camera/CameraHalCommon.cpp b/camera/CameraHalCommon.cpp index ead73e0..ead73e0 100755..100644 --- a/camera/CameraHalCommon.cpp +++ b/camera/CameraHalCommon.cpp diff --git a/camera/CameraHalUtilClasses.cpp b/camera/CameraHalUtilClasses.cpp index 2f7145b..2f7145b 100755..100644 --- a/camera/CameraHalUtilClasses.cpp +++ b/camera/CameraHalUtilClasses.cpp diff --git a/camera/CameraHal_Module.cpp b/camera/CameraHal_Module.cpp index 4f44f74..4f44f74 100755..100644 --- a/camera/CameraHal_Module.cpp +++ b/camera/CameraHal_Module.cpp diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp index 6fecf22..6fecf22 100755..100644 --- a/camera/CameraParameters.cpp +++ b/camera/CameraParameters.cpp diff --git a/camera/CameraProperties.cpp b/camera/CameraProperties.cpp index 5ee7b48..5ee7b48 100755..100644 --- a/camera/CameraProperties.cpp +++ b/camera/CameraProperties.cpp diff --git a/camera/Encoder_libjpeg.cpp b/camera/Encoder_libjpeg.cpp index 8b57aca..8b57aca 100755..100644 --- a/camera/Encoder_libjpeg.cpp +++ b/camera/Encoder_libjpeg.cpp diff --git a/camera/ExCameraParameters.cpp b/camera/ExCameraParameters.cpp index 7c86f45..7c86f45 100755..100644 --- a/camera/ExCameraParameters.cpp +++ b/camera/ExCameraParameters.cpp diff --git a/camera/MemoryManager.cpp b/camera/MemoryManager.cpp index f52bb05..f52bb05 100755..100644 --- a/camera/MemoryManager.cpp +++ b/camera/MemoryManager.cpp diff --git a/camera/NV12_resize.c b/camera/NV12_resize.c index 4fc0443..02be60b 100755..100644 --- a/camera/NV12_resize.c +++ b/camera/NV12_resize.c @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #include "NV12_resize.h" #include "DebugUtils.h" diff --git a/camera/SensorListener.cpp b/camera/SensorListener.cpp index adcb7b8..adcb7b8 100755..100644 --- a/camera/SensorListener.cpp +++ b/camera/SensorListener.cpp diff --git a/camera/V4LCameraAdapter/V4LCameraAdapter.cpp b/camera/V4LCameraAdapter/V4LCameraAdapter.cpp index 09164f3..e86b897 100755..100644 --- a/camera/V4LCameraAdapter/V4LCameraAdapter.cpp +++ b/camera/V4LCameraAdapter/V4LCameraAdapter.cpp @@ -319,7 +319,7 @@ status_t V4LCameraAdapter::initialize(CameraProperties::Properties* caps) char property[PROPERTY_VALUE_MAX]; int enable = 0; memset(property,0,sizeof(property)); - if(property_get("ro.camera.preview.UseMJPEG", property, NULL) > 0){ + if (property_get("ro.media.camera_preview.usemjpeg", property, NULL) > 0) { enable = atoi(property); } mUseMJPEG = (enable!=0)?true:false; @@ -327,7 +327,7 @@ status_t V4LCameraAdapter::initialize(CameraProperties::Properties* caps) if(property_get("camera.preview.DebugMJPEG", property, NULL) > 0){ enable = atoi(property); } - mDebugMJPEG = (enable!=0)?true:false; + mDebugMJPEG = (enable!=0)?true:false; } if(mUseMJPEG == true){ @@ -2802,7 +2802,7 @@ extern "C" int getValidFrameSize(int camera_fd, int pixel_format, char *framesiz support_w = 10000; support_h = 10000; memset(property,0,sizeof(property)); - if(property_get("ro.camera.preview.MaxSize", property, NULL) > 0){ + if (property_get("ro.media.camera_preview.maxsize", property, NULL) > 0) { CAMHAL_LOGDB("support Max Preview Size :%s",property); if(sscanf(property,"%dx%d",&support_w,&support_h)!=2){ support_w = 10000; @@ -2883,7 +2883,7 @@ static void ParserLimitedRateInfo(LimitedRate_t* rate) char* pos = NULL; memset(property,0,sizeof(property)); rate->num = 0; - if(property_get("ro.camera.preview.LimitedRate", property, NULL) > 0){ + if (property_get("ro.media.camera_preview.limitedrate", property, NULL) > 0) { pos = &property[0]; while((pos != NULL)&&(rate->num<MAX_LIMITED_RATE_NUM)){ if(sscanf(pos,"%dx%dx%d",&w,&h,&r)!=3){ @@ -3394,7 +3394,7 @@ extern "C" void loadCaps(int camera_id, CameraProperties::Properties* params) { int useMJPEG = 0; preview_format = enumFrameFormats(camera_fd, CAM_PREVIEW); memset(property,0,sizeof(property)); - if(property_get("ro.camera.preview.UseMJPEG", property, NULL) > 0){ + if (property_get("ro.media.camera_preview.usemjpeg", property, NULL) > 0) { useMJPEG = atoi(property); } #ifdef AMLOGIC_USB_CAMERA_SUPPORT diff --git a/camera/inc/NV12_resize.h b/camera/inc/NV12_resize.h index 927faf8..832472e 100755..100644 --- a/camera/inc/NV12_resize.h +++ b/camera/inc/NV12_resize.h @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #ifndef NV12_RESIZE_H_ #define NV12_RESIZE_H_ diff --git a/camera/inc/jpegenc_hw/jpegenc.h b/camera/inc/jpegenc_hw/jpegenc.h index f408a1f..944aa43 100755..100644 --- a/camera/inc/jpegenc_hw/jpegenc.h +++ b/camera/inc/jpegenc_hw/jpegenc.h @@ -1,3 +1,21 @@ +/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Description:
+ */
+
#ifndef AML_JPEG_ENCODER_M8_
#define AML_JPEG_ENCODER_M8_
diff --git a/camera/usb_fmt.cpp b/camera/usb_fmt.cpp index 45063a1..ceff222 100755..100644 --- a/camera/usb_fmt.cpp +++ b/camera/usb_fmt.cpp @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #ifndef __USB_FMT_C__ #define __USB_FMT_C__ diff --git a/camera/usb_fmt.h b/camera/usb_fmt.h index 99dfb19..c22d00d 100755..100644 --- a/camera/usb_fmt.h +++ b/camera/usb_fmt.h @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #ifndef __USB_FMT_H__ #define __USB_FMT_H__ #include <linux/videodev2.h> diff --git a/camera/utils/util.cpp b/camera/utils/util.cpp index 3a37f5a..4de9bb2 100755..100644 --- a/camera/utils/util.cpp +++ b/camera/utils/util.cpp @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #include <stdio.h> #include <stdlib.h> #include <unistd.h> diff --git a/camera/utils/util.h b/camera/utils/util.h index 3c5b3be..9e52178 100755..100644 --- a/camera/utils/util.h +++ b/camera/utils/util.h @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #ifndef AML_CAMERA_HARDWARE_INCLUDE_ #define AML_CAMERA_HARDWARE_INCLUDE_ diff --git a/camera/v3/Android.mk b/camera/v3/Android.mk index 7ede294..52109ef 100644 --- a/camera/v3/Android.mk +++ b/camera/v3/Android.mk @@ -27,7 +27,7 @@ LOCAL_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) CAMHAL_GIT_VERSION="$(shell cd $(LOCAL_PATH);git log | grep commit -m 1 | cut -d' ' -f 2)" CAMHAL_GIT_UNCOMMIT_FILE_NUM=$(shell cd $(LOCAL_PATH);git diff | grep +++ -c) CAMHAL_LAST_CHANGED="$(shell cd $(LOCAL_PATH);git log | grep Date -m 1)" -CAMHAL_BUILD_TIME=" $(shell date)" +CAMHAL_BUILD_TIME=" $(shell date --date=00:00)" CAMHAL_BUILD_NAME=" $(shell echo ${LOGNAME})" CAMHAL_BRANCH_NAME="$(shell cd $(LOCAL_PATH);git branch -a | sed -n '/'*'/p')" CAMHAL_BUILD_MODE=$(shell echo ${TARGET_BUILD_VARIANT}) diff --git a/camera/v3/EmulatedFakeCamera3.cpp b/camera/v3/EmulatedFakeCamera3.cpp index c17970c..80ec5a0 100644 --- a/camera/v3/EmulatedFakeCamera3.cpp +++ b/camera/v3/EmulatedFakeCamera3.cpp @@ -1687,7 +1687,7 @@ status_t EmulatedFakeCamera3::constructStaticInfo() { if ( mSensorType == SENSOR_USB) { char property[PROPERTY_VALUE_MAX]; - property_get("rw.camera.usb.faceback", property, "false"); + property_get("ro.media.camera_usb.faceback", property, "false"); if (strstr(property, "true")) mFacingBack = 1; else @@ -2992,6 +2992,7 @@ void EmulatedFakeCamera3::ReadoutThread::onJpegDone( camera3_capture_result result; result.frame_number = r.frameNumber; result.result = NULL; + result.input_buffer = NULL; result.num_output_buffers = 1; result.output_buffers = &mJpegHalBuffer; result.partial_result = 1; diff --git a/camera/v3/fake-pipeline2/Base.h b/camera/v3/fake-pipeline2/Base.h index c34f4e1..c34f4e1 100755..100644 --- a/camera/v3/fake-pipeline2/Base.h +++ b/camera/v3/fake-pipeline2/Base.h diff --git a/camera/v3/fake-pipeline2/JpegCompressor.cpp b/camera/v3/fake-pipeline2/JpegCompressor.cpp index 5bd7dfd..5bd7dfd 100755..100644 --- a/camera/v3/fake-pipeline2/JpegCompressor.cpp +++ b/camera/v3/fake-pipeline2/JpegCompressor.cpp diff --git a/camera/v3/fake-pipeline2/JpegCompressor.h b/camera/v3/fake-pipeline2/JpegCompressor.h index 6f3ac5f..6f3ac5f 100755..100644 --- a/camera/v3/fake-pipeline2/JpegCompressor.h +++ b/camera/v3/fake-pipeline2/JpegCompressor.h diff --git a/camera/v3/fake-pipeline2/NV12_resize.c b/camera/v3/fake-pipeline2/NV12_resize.c index 23eee0b..276aa08 100755..100644 --- a/camera/v3/fake-pipeline2/NV12_resize.c +++ b/camera/v3/fake-pipeline2/NV12_resize.c @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + //#define LOG_NDEBUG 0 #define LOG_TAG "CAMHAL_NV12_resize" #include "NV12_resize.h" diff --git a/camera/v3/fake-pipeline2/NV12_resize.h b/camera/v3/fake-pipeline2/NV12_resize.h index 927faf8..832472e 100755..100644 --- a/camera/v3/fake-pipeline2/NV12_resize.h +++ b/camera/v3/fake-pipeline2/NV12_resize.h @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #ifndef NV12_RESIZE_H_ #define NV12_RESIZE_H_ diff --git a/camera/v3/fake-pipeline2/Scene.cpp b/camera/v3/fake-pipeline2/Scene.cpp index 48296d2..48296d2 100755..100644 --- a/camera/v3/fake-pipeline2/Scene.cpp +++ b/camera/v3/fake-pipeline2/Scene.cpp diff --git a/camera/v3/fake-pipeline2/Scene.h b/camera/v3/fake-pipeline2/Scene.h index 66d1a69..66d1a69 100755..100644 --- a/camera/v3/fake-pipeline2/Scene.h +++ b/camera/v3/fake-pipeline2/Scene.h diff --git a/camera/v3/fake-pipeline2/Sensor.cpp b/camera/v3/fake-pipeline2/Sensor.cpp index a4ca278..f026b62 100755..100644 --- a/camera/v3/fake-pipeline2/Sensor.cpp +++ b/camera/v3/fake-pipeline2/Sensor.cpp @@ -1369,7 +1369,7 @@ int Sensor::getStreamConfigurations(uint32_t picSizes[], const int32_t kAvailabl support_w = 10000; support_h = 10000; memset(property, 0, sizeof(property)); - if(property_get("ro.camera.preview.MaxSize", property, NULL) > 0){ + if (property_get("ro.media.camera_preview.maxsize", property, NULL) > 0) { CAMHAL_LOGDB("support Max Preview Size :%s",property); if(sscanf(property,"%dx%d",&support_w,&support_h)!=2){ support_w = 10000; @@ -1800,7 +1800,7 @@ int Sensor::getPictureSizes(int32_t picSizes[], int size, bool preview) { support_w = 10000; support_h = 10000; memset(property, 0, sizeof(property)); - if(property_get("ro.camera.preview.MaxSize", property, NULL) > 0){ + if (property_get("ro.media.camera_preview.maxsize", property, NULL) > 0) { CAMHAL_LOGDB("support Max Preview Size :%s",property); if(sscanf(property,"%dx%d",&support_w,&support_h)!=2){ support_w = 10000; @@ -2270,10 +2270,12 @@ void Sensor::captureNV21(StreamBuffer b, uint32_t gain) { } ALOGVV("get frame NULL, sleep 5ms"); usleep(5000); - mTimeOutCount++; - if (mTimeOutCount > 300) { - DBG_LOGA("force sensor reset.\n"); - force_reset_sensor(); + if (mSensorType == SENSOR_USB) { + mTimeOutCount++; + if (mTimeOutCount > 300) { + DBG_LOGA("force sensor reset.\n"); + force_reset_sensor(); + } } continue; } diff --git a/camera/v3/fake-pipeline2/Sensor.h b/camera/v3/fake-pipeline2/Sensor.h index 15f9459..15f9459 100755..100644 --- a/camera/v3/fake-pipeline2/Sensor.h +++ b/camera/v3/fake-pipeline2/Sensor.h diff --git a/camera/v3/fake-pipeline2/camera_hw.cpp b/camera/v3/fake-pipeline2/camera_hw.cpp index 13a6826..7f3bd57 100755..100644 --- a/camera/v3/fake-pipeline2/camera_hw.cpp +++ b/camera/v3/fake-pipeline2/camera_hw.cpp @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #ifndef __CAMERA_HW__ #define __CAMERA_HW__ @@ -183,6 +201,10 @@ int stop_capturing(struct VideoInfo *vinfo) res = -1; } + if (!vinfo->preview.buf.length) { + vinfo->preview.buf.length = vinfo->tempbuflen; + } + for (i = 0; i < (int)vinfo->preview.rb.count; ++i) { if (munmap(vinfo->mem[i], vinfo->preview.buf.length) < 0) { DBG_LOGB("munmap failed errno=%d", errno); diff --git a/camera/v3/fake-pipeline2/camera_hw.h b/camera/v3/fake-pipeline2/camera_hw.h index aa1ee66..e7b39cd 100755..100644 --- a/camera/v3/fake-pipeline2/camera_hw.h +++ b/camera/v3/fake-pipeline2/camera_hw.h @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #ifndef __HW_CAMERA_HW_H__ #define __HW_CAMERA_HW_H__ #include <linux/videodev2.h> diff --git a/camera/v3/fake-pipeline2/ge2d.h b/camera/v3/fake-pipeline2/ge2d.h index bd74d02..73f7a3d 100755..100644 --- a/camera/v3/fake-pipeline2/ge2d.h +++ b/camera/v3/fake-pipeline2/ge2d.h @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #ifndef _GE2D_H_ #define _GE2D_H_ #ifdef __KERNEL__ diff --git a/camera/v3/fake-pipeline2/ge2d_main.h b/camera/v3/fake-pipeline2/ge2d_main.h index d2270bd..9da07ac 100755..100644 --- a/camera/v3/fake-pipeline2/ge2d_main.h +++ b/camera/v3/fake-pipeline2/ge2d_main.h @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #ifndef _GE2D_MAIN_H #define _GE2D_MAIN_H #ifdef __KERNEL__ diff --git a/camera/v3/fake-pipeline2/ge2d_stream.cpp b/camera/v3/fake-pipeline2/ge2d_stream.cpp index dd8f41b..dd8f41b 100755..100644 --- a/camera/v3/fake-pipeline2/ge2d_stream.cpp +++ b/camera/v3/fake-pipeline2/ge2d_stream.cpp diff --git a/camera/v3/fake-pipeline2/ge2d_stream.h b/camera/v3/fake-pipeline2/ge2d_stream.h index d056c10..d056c10 100755..100644 --- a/camera/v3/fake-pipeline2/ge2d_stream.h +++ b/camera/v3/fake-pipeline2/ge2d_stream.h diff --git a/camera/v3/fake-pipeline2/ge2d_wq.h b/camera/v3/fake-pipeline2/ge2d_wq.h index 6e8fafe..c390cc5 100755..100644 --- a/camera/v3/fake-pipeline2/ge2d_wq.h +++ b/camera/v3/fake-pipeline2/ge2d_wq.h @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #ifndef BITBLT_H_ #define BITBLT_H_ diff --git a/camera/v3/fake-pipeline2/tests/test_camera.cpp b/camera/v3/fake-pipeline2/tests/test_camera.cpp index cdd4233..15650b4 100755..100644 --- a/camera/v3/fake-pipeline2/tests/test_camera.cpp +++ b/camera/v3/fake-pipeline2/tests/test_camera.cpp @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Description: + */ + #include <camera_hw.h> static const char short_options[] = "d:hmruofc:"; diff --git a/camera/v3/fake-pipeline2/util.c b/camera/v3/fake-pipeline2/util.c index e784657..cf2bebd 100755..100644 --- a/camera/v3/fake-pipeline2/util.c +++ b/camera/v3/fake-pipeline2/util.c @@ -1,3 +1,21 @@ +/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Description:
+ */
+
#include <utils/Log.h>
#include <string.h>
diff --git a/camera/v3/fake-pipeline2/util.h b/camera/v3/fake-pipeline2/util.h index 16ef745..f6f0a16 100755..100644 --- a/camera/v3/fake-pipeline2/util.h +++ b/camera/v3/fake-pipeline2/util.h @@ -1,3 +1,21 @@ +/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Description:
+ */
+
#ifndef __UTIL_H
#define __UTIL_H
diff --git a/camera/v3/fake-pipeline2/v4l2-base.c b/camera/v3/fake-pipeline2/v4l2-base.c index 2746506..2746506 100755..100644 --- a/camera/v3/fake-pipeline2/v4l2-base.c +++ b/camera/v3/fake-pipeline2/v4l2-base.c diff --git a/hwcomposer/hwc2/common/base/HwcLayer.cpp b/hwcomposer/hwc2/common/base/HwcLayer.cpp index 403ae77..b3289cf 100755..100644 --- a/hwcomposer/hwc2/common/base/HwcLayer.cpp +++ b/hwcomposer/hwc2/common/base/HwcLayer.cpp @@ -323,10 +323,10 @@ void HwcLayer::presentOverlay(bool bPresent) { AmVideo::getInstance()->presentVideo(bPresent); - if (Utils::checkBoolProp("ro.vout.dualdisplay4")) { - vpp_changed = Utils::checkSysfsStatus( - SYSFS_AMVIDEO_CURIDX, mLastVal, 32); - } + //if (Utils::checkBoolProp("ro.vout.dualdisplay4")) { + // vpp_changed = Utils::checkSysfsStatus( + // SYSFS_AMVIDEO_CURIDX, mLastVal, 32); + //} mode_changed = Utils::checkSysfsStatus(SYSFS_DISPLAY_MODE, mLastMode, 32); free_scale_changed = Utils::checkSysfsStatus(SYSFS_FB0_FREE_SCALE, mLastFreescale, 32); diff --git a/hwcomposer/hwc2/common/devices/PhysicalDevice.cpp b/hwcomposer/hwc2/common/devices/PhysicalDevice.cpp index 66ecd3c..e3adc8e 100644 --- a/hwcomposer/hwc2/common/devices/PhysicalDevice.cpp +++ b/hwcomposer/hwc2/common/devices/PhysicalDevice.cpp @@ -1615,7 +1615,7 @@ int32_t PhysicalDevice::validateDisplay(uint32_t* outNumTypes, } } - bool noDevComp = Utils::checkBoolProp("sys.sf.debug.nohwc"); + bool noDevComp = Utils::checkBoolProp("vendor.sys.sf.debug.nohwc"); #ifndef USE_CONTINOUS_BUFFER_COMPOSER DTRACE("No continous buffer composer!"); noDevComp = true; diff --git a/media/amavutils/Amvideoutils.c b/media/amavutils/Amvideoutils.c index 3e80570..90ed26e 100755..100644 --- a/media/amavutils/Amvideoutils.c +++ b/media/amavutils/Amvideoutils.c @@ -103,7 +103,7 @@ int is_video_on_vpp2(void) char val[PROPERTY_VALUE_MAX]; memset(val, 0, sizeof(val)); - if (property_get("ro.vout.dualdisplay4", val, "false") + if (property_get("ro.media.vout.dualdisplay4", val, "false") && strcmp(val, "true") == 0) { memset(val, 0, sizeof(val)); if (amsysfs_get_sysfs_str("/sys/module/amvideo/parameters/cur_dev_idx", val, sizeof(val)) == 0) { @@ -123,7 +123,7 @@ int is_vertical_panel(void) // ro.vout.dualdisplay4.ver-panel char val[PROPERTY_VALUE_MAX]; memset(val, 0, sizeof(val)); - if (property_get("ro.vout.dualdisplay4.ver-panel", val, "false") + if (property_get("ro.media.vout.dualdisplay4.ver-panel", val, "false") && strcmp(val, "true") == 0) { ret = 1; } @@ -138,7 +138,7 @@ int is_screen_portrait(void) // ro.vout.dualdisplay4.ver-panel char val[PROPERTY_VALUE_MAX]; memset(val, 0, sizeof(val)); - if (property_get("ro.screen.portrait", val, "false") + if (property_get("ro.media.screen.portrait", val, "false") && strcmp(val, "true") == 0) { ret = 1; } @@ -183,7 +183,7 @@ int is_vertical_panel_reverse(void) // ro.vout.dualdisplay4.ver-panel char val[PROPERTY_VALUE_MAX]; memset(val, 0, sizeof(val)); - if (property_get("ro.ver-panel.reverse", val, "false") + if (property_get("ro.media.ver-panel.reverse", val, "false") && strcmp(val, "true") == 0) { ret = 1; } diff --git a/tv_input/TvInputIntf.cpp b/tv_input/TvInputIntf.cpp index 30ac335..66b3edd 100755..100644 --- a/tv_input/TvInputIntf.cpp +++ b/tv_input/TvInputIntf.cpp @@ -32,20 +32,6 @@ using namespace android; TvInputIntf::TvInputIntf() : mpObserver(nullptr) { mTvSession = TvServerHidlClient::connect(CONNECT_TYPE_HAL); mTvSession->setListener(this); - - int hdmiPorts = getHdmiPorts(); - int count = 0; - while (hdmiPorts !=0) { - if (count > HDMI_MAX_SUPPORT_NUM - 1) { - ALOGE("max support num:%d, but now count:%d", HDMI_MAX_SUPPORT_NUM, count); - break; - } - - mHdmiPorts[count++] = (hdmiPorts%10); - hdmiPorts = hdmiPorts/10; - } - - ALOGI("get hdmi ports:%d, port count:%d", hdmiPorts, count); } TvInputIntf::~TvInputIntf() @@ -123,16 +109,7 @@ int TvInputIntf::getSupportInputDevices(int *devices, int *count) } -int TvInputIntf::getHdmiPorts() -{ - return mTvSession->getHdmiPorts(); -} - int TvInputIntf::getHdmiPort(tv_source_input_t source_input) { - if (source_input > SOURCE_HDMI4) { - ALOGE("input source:%d > max hdmi source4: %d", (int)source_input , SOURCE_HDMI4); - return -1; - } - return mHdmiPorts[source_input - SOURCE_HDMI1]; + return mTvSession->getHdmiPorts(source_input); } diff --git a/tv_input/TvInputIntf.h b/tv_input/TvInputIntf.h index b6c463e..f538dc9 100644 --- a/tv_input/TvInputIntf.h +++ b/tv_input/TvInputIntf.h @@ -77,15 +77,12 @@ public: int getHdmiAvHotplugDetectOnoff(); int setTvObserver (TvPlayObserver *ob); int getSupportInputDevices(int *devices, int *count); - int getHdmiPorts(); int getHdmiPort(tv_source_input_t source_input); virtual void notify(const tv_parcel_t &parcel); private: sp<TvServerHidlClient> mTvSession; TvPlayObserver *mpObserver; - - int mHdmiPorts[HDMI_MAX_SUPPORT_NUM];// the length of hdmi_port should be equal to max_port_num }; #endif/*_ANDROID_TV_INPUT_INTERFACE_H_*/ diff --git a/tv_input/tv_input.cpp b/tv_input/tv_input.cpp index 5c8e036..9679c4c 100644 --- a/tv_input/tv_input.cpp +++ b/tv_input/tv_input.cpp @@ -104,7 +104,7 @@ int notifyDeviceStatus(tv_input_private_t *priv, tv_source_input_t inputSrc, int case SOURCE_HDMI3: case SOURCE_HDMI4: event.device_info.type = TV_INPUT_TYPE_HDMI; - event.device_info.hdmi.port_id = priv->mpTv->getHdmiPort(inputSrc); + event.device_info.hdmi.port_id = inputSrc - SOURCE_YPBPR2; event.device_info.audio_type = AUDIO_DEVICE_IN_HDMI; break; case SOURCE_SPDIF: @@ -220,10 +220,10 @@ static int tv_input_initialize(struct tv_input_device *dev, return -EINVAL; } tv_input_private_t *priv = (tv_input_private_t *)dev; - if (priv->callback != NULL) { + /*if (priv->callback != NULL) { ALOGE("tv input had been init done, do not need init again"); return -EEXIST; - } + }*/ priv->callback = callback; priv->callback_data = data; @@ -236,15 +236,22 @@ static int tv_input_get_stream_configurations(const struct tv_input_device *dev const tv_stream_config_t **configs) { tv_input_private_t *priv = (tv_input_private_t *)dev; - bool status = true; - if (SOURCE_AV1 <= device_id && device_id <= SOURCE_HDMI4) { - status = priv->mpTv->getSourceConnectStatus((tv_source_input_t)device_id); - } - LOGD("tv_input_get_stream_configurations source = %d, status = %d", device_id, status); - if (status) { + int isHotplugDetectOn = priv->mpTv->getHdmiAvHotplugDetectOnoff(); + if (isHotplugDetectOn == 0) { + LOGD("%s:Hot plug disabled!\n", __FUNCTION__); getAvailableStreamConfigs(device_id, num_configurations, configs); } else { - getUnavailableStreamConfigs(device_id, num_configurations, configs); + LOGD("%s:Hot plug enabled!\n", __FUNCTION__); + bool status = true; + if (SOURCE_AV1 <= device_id && device_id <= SOURCE_HDMI4) { + status = priv->mpTv->getSourceConnectStatus((tv_source_input_t)device_id); + } + LOGD("tv_input_get_stream_configurations source = %d, status = %d", device_id, status); + if (status) { + getAvailableStreamConfigs(device_id, num_configurations, configs); + } else { + getUnavailableStreamConfigs(device_id, num_configurations, configs); + } } return 0; } |