The problem is even after release() is done, the singleton
variable is not cleared, so a new openCameraHardware()
call could return an instance which is already released.
The singleton variable is cleared in the destructor, so
we wait until that happens in openCameraHardware().
-- Set the antibanding to 60Hz for the US (Should be 50Hz for the
rest of the world.)
-- Save the cropping info returned when taking a picture and then
pass it to the JPEG encoder. This enables digital zoom for JPEG
images (cropping and upsampling).
Signed-off-by: Iliyan Malchev <malchev@google.com>
-- general cleanup: made a bunch of functions static to
QualcommCameraHardware.cpp, not class members; got rid of unnecessary
private member variables. The only functions that remain as members
are native_set_dimension() and native_jpeg_encode()
-- removed kRawFrameHeaderSize; aDSP frame offsets are zero now;
-- simplify reg_unreg_buf
-- Removed PreviewPmemPool and RawPmemPool, which do not need to be
specialized on top of PmemPool. We use PmemPool instead.
-- use PmemPool to both create pmem pools and register them with the driver
-- takePicture runs in a separate thread
-- the destructor keeps a singleton lock
-- PmemPool calls dup() on the camera-control file descriptor to guard against
release() calling close() on it before PmemPool has a chance to deregister
pmem from the camera driver.
-- got rid of hal_mmap() and hal_munmap() entirely and created a PmemHeap to
manage thumbnails.
-- removed support for CAPTURE_RAW. The CameraService can already do this.
Signed-off-by: Iliyan Malchev <malchev@google.com>
precondition: preview is running
-- call startRecording()
-- a preview frame arrives, causing the record callback to be called, and then
blocks on mRecordWait.wait()
-- call stopRecording(), which sets mReleasedRecordingFrame and signals
mRecordWait;
-- call startRecording(), which clears mReleasedRecordingFrame;
-- receivePreviewFrame() wakes up, checks mReleasedRecordingFrame, and
blocks again on mRecordWait.wait(), without having notified the client.
Signed-off-by: Iliyan Malchev <malchev@google.com>
libcamera2 uses code under vendor/qcom/proprietary/mm-camera, which is the
(Qualcomm proprietary) user-space component of the new camera framework.
Signed-off-by: Iliyan Malchev <malchev@google.com>
This change is the first part of a fix for issue 1846343, :
- Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources.
- renamed streamType to inputSource in all native functions handling audio record.
A second change is required in opencore author driver and android audio input to completely fix the issue.
After testing, setting auto-focus (AF) and white-balance (WB) change
the color.
AF will be enabled during AF start (camera_af_start()). There is no
need to enable autofocus in setParameters. So, it is removed.
WB is "AUTO" by default. If WB setting is unchanged, do not set it
again.
Original author: wuchengli
Merged from: //branches/cupcake/...
Automated import of CL 143154