在全志r40m平台调通ov5640(分色排版)V1.1版本
来源:互联网 发布:泼墨门事件知乎 编辑:程序博客网 时间:2024/04/30 02:23
OV5640的驱动里面经过搜索分辨率可以设置为:2592x1936, 2048x1536, 1600x1200, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480
拍照出来的分辨率有:2592x1936, 2048x1536, 1600x1200, 1920x1080 ,1280x720,
丢失的分辨率有:1280x960, 1024x768, 800x600, 640x480
可能与全志R40平台的Android的framework有关系。或者是驱动里面有些分辨率没有进去?
在全志r40m平台调通ov5640
2017/11/20 9:18
版本:V1.1
开发板使用:BPI-M2U
1、配置ov5640在android层配置的分辨率(预览/拍照/录像)
注意:系统自带的快拍APP就在这里查找分辨率参数发送到camera的HAL层。
这里的默认分辨率设置为:640x480
驱动里面搜索可以设置为:2592x1936, 2048x1536, 1600x1200, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480
W:\r40\ov5640_ap6212a0a1_r40m\lichee\linux-3.10\drivers\media\platform\sunxi-vfe\device\ov5640.c
搜索:regs[] = {
static struct regval_list sensor_default_regs[] = {
static struct regval_list sensor_qsxga_regs[] = { //qsxga: 2592*1936
static struct regval_list sensor_qxga_regs[] = { //qxga: 2048*1536
static struct regval_list sensor_uxga_regs[] = { //UXGA: 1600*1200
static struct regval_list sensor_sxga_regs[] = { //SXGA: 1280*960
static struct regval_list sensor_xga_regs[] = { //XGA: 1024*768
static struct regval_list sensor_1080p_regs[] = { //1080: 1920*1080
static struct regval_list sensor_720p_regs[] = { //1280*720
static struct regval_list sensor_svga_regs[] = { //SVGA: 800*600
static struct regval_list sensor_vga_regs[] = { //VGA: 640*480
static struct regval_list sensor_oe_disable_regs[] = {
static struct regval_list sensor_oe_enable_regs[] = {
static struct regval_list sensor_sw_stby_on_regs[] = {
static struct regval_list sensor_sw_stby_off_regs[] = {
static unsigned char sensor_af_fw_regs[] = {
static struct regval_list sensor_wb_auto_regs[] = {
static struct regval_list sensor_wb_incandescence_regs[] = {
static struct regval_list sensor_wb_fluorescent_regs[] = {
static struct regval_list sensor_wb_tungsten_regs[] = {
static struct regval_list sensor_wb_daylight_regs[] = {
static struct regval_list sensor_wb_cloud_regs[] = {
static struct regval_list sensor_colorfx_none_regs[] = {
static struct regval_list sensor_colorfx_bw_regs[] = {
static struct regval_list sensor_colorfx_sepia_regs[] = {
static struct regval_list sensor_colorfx_negative_regs[] = {
static struct regval_list sensor_colorfx_emboss_regs[] = {
static struct regval_list sensor_colorfx_sketch_regs[] = {
static struct regval_list sensor_colorfx_sky_blue_regs[] = {
static struct regval_list sensor_colorfx_grass_green_regs[] = {
static struct regval_list sensor_colorfx_skin_whiten_regs[] = {
static struct regval_list sensor_colorfx_vivid_regs[] = {
static struct regval_list sensor_colorfx_aqua_regs[] = {
static struct regval_list sensor_colorfx_art_freeze_regs[] = {
static struct regval_list sensor_colorfx_silhouette_regs[] = {
static struct regval_list sensor_colorfx_solarization_regs[] = {
static struct regval_list sensor_colorfx_antique_regs[] = {
static struct regval_list sensor_colorfx_set_cbcr_regs[] = {
static struct regval_list sensor_sharpness_auto_regs[] = {
static struct regval_list sensor_denoise_auto_regs[] = {
static struct regval_list sensor_brightness_neg4_regs[] = {
static struct regval_list sensor_brightness_neg3_regs[] = {
static struct regval_list sensor_brightness_neg2_regs[] = {
static struct regval_list sensor_brightness_neg1_regs[] = {
static struct regval_list sensor_brightness_zero_regs[] = {
static struct regval_list sensor_brightness_pos1_regs[] = {
static struct regval_list sensor_brightness_pos2_regs[] = {
static struct regval_list sensor_brightness_pos3_regs[] = {
static struct regval_list sensor_brightness_pos4_regs[] = {
static struct regval_list sensor_contrast_neg4_regs[] = {
static struct regval_list sensor_contrast_neg3_regs[] = {
static struct regval_list sensor_contrast_neg2_regs[] = {
static struct regval_list sensor_contrast_neg1_regs[] = {
static struct regval_list sensor_contrast_zero_regs[] = {
static struct regval_list sensor_contrast_pos1_regs[] = {
static struct regval_list sensor_contrast_pos2_regs[] = {
static struct regval_list sensor_contrast_pos3_regs[] = {
static struct regval_list sensor_contrast_pos4_regs[] = {
static struct regval_list sensor_saturation_neg4_regs[] = {
static struct regval_list sensor_saturation_neg3_regs[] = {
static struct regval_list sensor_saturation_neg2_regs[] = {
static struct regval_list sensor_saturation_neg1_regs[] = {
static struct regval_list sensor_saturation_zero_regs[] = {
static struct regval_list sensor_saturation_pos1_regs[] = {
static struct regval_list sensor_saturation_pos2_regs[] = {
static struct regval_list sensor_saturation_pos3_regs[] = {
static struct regval_list sensor_saturation_pos4_regs[] = {
static struct regval_list sensor_ev_neg4_regs[] = {
static struct regval_list sensor_ev_neg3_regs[] = {
static struct regval_list sensor_ev_neg2_regs[] = {
static struct regval_list sensor_ev_neg1_regs[] = {
static struct regval_list sensor_ev_zero_regs[] = {
static struct regval_list sensor_ev_pos1_regs[] = {
static struct regval_list sensor_ev_pos2_regs[] = {
static struct regval_list sensor_ev_pos3_regs[] = {
static struct regval_list sensor_ev_pos4_regs[] = {
static struct regval_list sensor_ev_neg4_regs[] = {
static struct regval_list sensor_ev_neg3_regs[] = {
static struct regval_list sensor_ev_neg2_regs[] = {
static struct regval_list sensor_ev_neg1_regs[] = {
static struct regval_list sensor_ev_zero_regs[] = {
static struct regval_list sensor_ev_pos1_regs[] = {
static struct regval_list sensor_ev_pos2_regs[] = {
static struct regval_list sensor_ev_pos3_regs[] = {
static struct regval_list sensor_ev_pos4_regs[] = {
V:\wyb\r16v11\ov5640_parrotv1.1\android\device\softwinner\astar-evb30\configs\camera.cfg
;-------------------------------------------------------------------------------
; 用于camera的配置
;
; 采用格式:
; key = key_value
; 注意: 每个key需要顶格写;
; key_value紧跟着key后面的等号后面, 位于同一行中;
; key_value限制大小为256字节以内;
;
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
; exif information of "make" and "model"
;-------------------------------------------------------------------------------
key_camera_exif_make = MAKE_R40
key_camera_exif_model = MODEL_R40
;-------------------------------------------------------------------------------
; 1 for single camera, 2 for double camera
;-------------------------------------------------------------------------------
number_of_camera = 2
;-------------------------------------------------------------------------------
; CAMERA_FACING_BACK
; gc2035
;-------------------------------------------------------------------------------
camera_id = 0
;-------------------------------------------------------------------------------
; 1 for CAMERA_FACING_FRONT
; 0 for CAMERA_FACING_BACK
;-------------------------------------------------------------------------------
camera_facing = 0
;-------------------------------------------------------------------------------
; 1 for camera without isp(using built-in isp of Axx)
; 0 for camera with isp
;-------------------------------------------------------------------------------
use_builtin_isp = 0
;-------------------------------------------------------------------------------
; camera orientation (0, 90, 180, 270)
;-------------------------------------------------------------------------------
camera_orientation = 0
;-------------------------------------------------------------------------------
; driver device name
;-------------------------------------------------------------------------------
camera_device = /dev/video0
;-------------------------------------------------------------------------------
; device id
; for two camera devices with one CSI
;-------------------------------------------------------------------------------
device_id = 0
used_preview_size = 1
key_support_preview_size = 1280x720,640x480
key_default_preview_size = 640x480
used_picture_size = 1
key_support_picture_size = 640x480,320x240,1280x720
key_default_picture_size = 640x480
used_flash_mode = 0
key_support_flash_mode = on,off,auto
key_default_flash_mode = off
used_color_effect=1
key_support_color_effect = none,mono,negative,sepia,aqua
key_default_color_effect = none
used_frame_rate = 1
key_support_frame_rate = 30
key_default_frame_rate = 30
used_focus_mode = 0
key_support_focus_mode = auto,infinity,macro,fixed,continuous-video,continuous-picture
key_default_focus_mode = auto
used_scene_mode = 0
key_support_scene_mode = auto,portrait,landscape,night,night-portrait,theatre,beach,snow,sunset,steadyphoto,fireworks,sports,party,candlelight,barcode
key_default_scene_mode = auto
used_white_balance = 1
key_support_white_balance = auto,incandescent,fluorescent,warm-fluorescent,daylight,cloudy-daylight
key_default_white_balance = auto
used_exposure_compensation = 1
key_max_exposure_compensation = 3
key_min_exposure_compensation = -3
key_step_exposure_compensation = 1
key_default_exposure_compensation = 0
key_horizonal_view_angle = 48.6
key_vertical_view_angle = 37.0
;-------------------------------------------------------------------------------
; CAMERA_FACING_FRONT
; gc0307
;-------------------------------------------------------------------------------
camera_id = 1
;-------------------------------------------------------------------------------
; 1 for camera without isp(using built-in isp of Axx)
; 0 for camera with isp
;-------------------------------------------------------------------------------
use_builtin_isp = 0
;-------------------------------------------------------------------------------
; 1 for CAMERA_FACING_FRONT
; 0 for CAMERA_FACING_BACK
;-------------------------------------------------------------------------------
camera_facing = 1
;-------------------------------------------------------------------------------
; camera orientation (0, 90, 180, 270)
;-------------------------------------------------------------------------------
camera_orientation = 0
;-------------------------------------------------------------------------------
; driver device name
;-------------------------------------------------------------------------------
camera_device = /dev/video1
;-------------------------------------------------------------------------------
; device id
; for two camera devices with one CSI
;-------------------------------------------------------------------------------
device_id = 0
used_preview_size = 1
key_support_preview_size = 1280x720,640x480
key_default_preview_size = 640x480
used_picture_size = 1
key_support_picture_size = 1280x720,640x480,320x240
key_default_picture_size = 640x480
used_flash_mode = 0
key_support_flash_mode = on,off,auto
key_default_flash_mode = on
used_color_effect= 1
key_support_color_effect = none,mono,negative,sepia,aqua
key_default_color_effect = none
used_frame_rate = 1
key_support_frame_rate = 30
key_default_frame_rate = 30
used_focus_mode = 0
key_support_focus_mode = auto,infinity,macro,fixed
key_default_focus_mode = auto
used_scene_mode = 0
key_support_scene_mode = auto,portrait,landscape,night,night-portrait,theatre,beach,snow,sunset,steadyphoto,fireworks,sports,party,candlelight,barcode
key_default_scene_mode = auto
used_white_balance = 0
key_support_white_balance = auto,incandescent,fluorescent,warm-fluorescent,daylight,cloudy-daylight
key_default_white_balance = auto
used_exposure_compensation = 1
key_max_exposure_compensation = 3
key_min_exposure_compensation = -3
key_step_exposure_compensation = 1
key_default_exposure_compensation = 0
key_horizonal_view_angle = 44.3
key_vertical_view_angle = 33.9
修改为:
;-------------------------------------------------------------------------------
; 用于camera的配置
;
; 采用格式:
; key = key_value
; 注意: 每个key需要顶格写;
; key_value紧跟着key后面的等号后面, 位于同一行中;
; key_value限制大小为256字节以内;
;
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
; exif information of "make" and "model"
;-------------------------------------------------------------------------------
key_camera_exif_make = MAKE_R40
key_camera_exif_model = MODEL_R40
;-------------------------------------------------------------------------------
; 1 for single camera, 2 for double camera
;-------------------------------------------------------------------------------
number_of_camera = 1
;-------------------------------------------------------------------------------
; CAMERA_FACING_BACK
; gc2035 OV5640
;-------------------------------------------------------------------------------
camera_id = 0
;-------------------------------------------------------------------------------
; 1 for CAMERA_FACING_FRONT
; 0 for CAMERA_FACING_BACK
;-------------------------------------------------------------------------------
camera_facing = 0
;-------------------------------------------------------------------------------
; 1 for camera without isp(using built-in isp of Axx)
; 0 for camera with isp
;-------------------------------------------------------------------------------
use_builtin_isp = 0
;-------------------------------------------------------------------------------
; camera orientation (0, 90, 180, 270)
;-------------------------------------------------------------------------------
camera_orientation = 0
;-------------------------------------------------------------------------------
; driver device name
;-------------------------------------------------------------------------------
camera_device = /dev/video0
;-------------------------------------------------------------------------------
; device id
; for two camera devices with one CSI
;-------------------------------------------------------------------------------
device_id = 0
used_preview_size = 1
key_support_preview_size = 2592x1936, 2048x1536, 1600x1200, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480
key_default_preview_size = 640x480
used_picture_size = 1
key_support_picture_size = 2592x1936, 2048x1536, 1600x1200, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480
key_default_picture_size = 640x480
used_flash_mode = 0
key_support_flash_mode = on,off,auto
key_default_flash_mode = off
used_color_effect = 1
key_support_color_effect = none,mono,negative,sepia,aqua
key_default_color_effect = none
;(请严重注意这个帧率要和后面的media_profiles.xml中的一致,否则在1080p录像的时候会出问题!)
used_frame_rate = 1
key_support_frame_rate = 30
key_default_frame_rate = 30
used_focus_mode = 0
key_support_focus_mode = auto,infinity,macro,fixed,continuous-video,continuous-picture
key_default_focus_mode = auto
used_scene_mode = 0
key_support_scene_mode = auto,portrait,landscape,night,night-portrait,theatre,beach,snow,sunset,steadyphoto,fireworks,sports,party,candlelight,barcode
key_default_scene_mode = auto
used_white_balance = 1
key_support_white_balance = auto,incandescent,fluorescent,warm-fluorescent,daylight,cloudy-daylight
key_default_white_balance = auto
used_exposure_compensation = 1
key_max_exposure_compensation = 3
key_min_exposure_compensation = -3
key_step_exposure_compensation = 1
key_default_exposure_compensation = 0
key_horizonal_view_angle = 48.6
key_vertical_view_angle = 37.0
2、
W:\r40\ov5640_ap6212a0a1_r40m\android\device\softwinner\azalea-m2ultra\configs\media_profiles.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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.
-->
<!DOCTYPE MediaSettings [
<!ELEMENT MediaSettings (CamcorderProfiles,
EncoderOutputFileFormat+,
VideoEncoderCap+,
AudioEncoderCap+,
VideoDecoderCap,
AudioDecoderCap)>
<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
<!ELEMENT EncoderProfile (Video, Audio)>
<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
<!ATTLIST EncoderProfile fileFormat (mp4) #REQUIRED>
<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
<!ELEMENT Video EMPTY>
<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
<!ATTLIST Video bitRate CDATA #REQUIRED>
<!ATTLIST Video width CDATA #REQUIRED>
<!ATTLIST Video height CDATA #REQUIRED>
<!ATTLIST Video frameRate CDATA #REQUIRED>
<!ELEMENT Audio EMPTY>
<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
<!ATTLIST Audio bitRate CDATA #REQUIRED>
<!ATTLIST Audio sampleRate CDATA #REQUIRED>
<!ATTLIST Audio channels (1|2) #REQUIRED>
<!ELEMENT ImageEncoding EMPTY>
<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
<!ELEMENT ImageDecoding EMPTY>
<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
<!ELEMENT Camera EMPTY>
<!ATTLIST Camera previewFrameRate CDATA #REQUIRED>
<!ELEMENT EncoderOutputFileFormat EMPTY>
<!ATTLIST EncoderOutputFileFormat name (mp4) #REQUIRED>
<!ELEMENT VideoEncoderCap EMPTY>
<!ATTLIST VideoEncoderCap name (h264) #REQUIRED>
<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
<!ELEMENT AudioEncoderCap EMPTY>
<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
<!ELEMENT VideoDecoderCap EMPTY>
<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
<!ELEMENT AudioDecoderCap EMPTY>
<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
]>
<!--
This file is used to declare the multimedia profiles and capabilities
on an android-powered device.
-->
<MediaSettings>
<!-- Each camcorder profile defines a set of predefined configuration parameters -->
<!-- Back Camera -->
<!-- Front Camera -->
<CamcorderProfiles cameraId="0">
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1500000"
width="640"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="3000000"
width="1280"
height="720"
frameRate="30" />
<Audio codec="aac"
bitRate="128000"
sampleRate="16000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1500000"
width="640"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="90" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
<Camera previewFrameRate="0" />
</CamcorderProfiles>
<CamcorderProfiles cameraId="1">
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1500000"
width="640"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1500000"
width="1280"
height="720"
frameRate="30" />
<Audio codec="aac"
bitRate="128000"
sampleRate="16000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1500000"
width="640"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="90" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
<Camera previewFrameRate="0" />
</CamcorderProfiles>
<EncoderOutputFileFormat name="mp4" />
<!--
If a codec is not enabled, it is invisible to the applications
In other words, the applications won't be able to use the codec
or query the capabilities of the codec at all if it is disabled
-->
<VideoEncoderCap name="h264" enabled="true"
minBitRate="64000" maxBitRate="3000000"
minFrameWidth="320" maxFrameWidth="1920"
minFrameHeight="240" maxFrameHeight="1200"
minFrameRate="1" maxFrameRate="30" />
<AudioEncoderCap name="aac" enabled="true"
minBitRate="12200" maxBitRate="51200"
minSampleRate="8000" maxSampleRate="44100"
minChannels="1" maxChannels="2" />
<AudioEncoderCap name="amrwb" enabled="true"
minBitRate="6600" maxBitRate="23050"
minSampleRate="16000" maxSampleRate="16000"
minChannels="1" maxChannels="1" />
<AudioEncoderCap name="amrnb" enabled="true"
minBitRate="5525" maxBitRate="12200"
minSampleRate="8000" maxSampleRate="8000"
minChannels="1" maxChannels="1" />
<!--
FIXME:
We do not check decoder capabilities at present
At present, we only check whether windows media is visible
for TEST applications. For other applications, we do
not perform any checks at all.
-->
<VideoDecoderCap name="wmv" enabled="true"/>
<AudioDecoderCap name="wma" enabled="true"/>
<!--
The VideoEditor Capability configuration:
- maxInputFrameWidth: maximum video width of imported video clip.
- maxInputFrameHeight: maximum video height of imported video clip.
- maxOutputFrameWidth: maximum video width of exported video clip.
- maxOutputFrameHeight: maximum video height of exported video clip.
- maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
used to limit the amount of memory for prefetched YUV frames.
For this platform, it allows maximum 30MB(3MB per 1080p frame x 10
frames) memory.
-->
<VideoEditorCap maxInputFrameWidth="1920"
maxInputFrameHeight="1080" maxOutputFrameWidth="1920"
maxOutputFrameHeight="1080" maxPrefetchYUVFrames="10"/>
<!--
The VideoEditor Export codec profile and level values
correspond to the values in OMX_Video.h.
E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
and level 4096 means OMX_VIDEO_AVCLevel41.
Please note that the values are in decimal.
These values are for video encoder.
-->
<!--
Codec = h.264, Baseline profile, level 4.1
-->
<ExportVideoProfile name="h264" profile= "1" level="4096"/>
<!--
Codec = h.263, Baseline profile, level 0
-->
<ExportVideoProfile name="h263" profile= "1" level="1"/>
<!--
Codec = mpeg4, Simple profile, level 5
-->
<ExportVideoProfile name="m4v" profile= "1" level="128"/>
</MediaSettings>
修改为:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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.
-->
<!DOCTYPE MediaSettings [
<!ELEMENT MediaSettings (CamcorderProfiles,
EncoderOutputFileFormat+,
VideoEncoderCap+,
AudioEncoderCap+,
VideoDecoderCap,
AudioDecoderCap)>
<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
<!ELEMENT EncoderProfile (Video, Audio)>
<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
<!ATTLIST EncoderProfile fileFormat (mp4) #REQUIRED>
<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
<!ELEMENT Video EMPTY>
<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
<!ATTLIST Video bitRate CDATA #REQUIRED>
<!ATTLIST Video width CDATA #REQUIRED>
<!ATTLIST Video height CDATA #REQUIRED>
<!ATTLIST Video frameRate CDATA #REQUIRED>
<!ELEMENT Audio EMPTY>
<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
<!ATTLIST Audio bitRate CDATA #REQUIRED>
<!ATTLIST Audio sampleRate CDATA #REQUIRED>
<!ATTLIST Audio channels (1|2) #REQUIRED>
<!ELEMENT ImageEncoding EMPTY>
<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
<!ELEMENT ImageDecoding EMPTY>
<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
<!ELEMENT Camera EMPTY>
<!ATTLIST Camera previewFrameRate CDATA #REQUIRED>
<!ELEMENT EncoderOutputFileFormat EMPTY>
<!ATTLIST EncoderOutputFileFormat name (mp4) #REQUIRED>
<!ELEMENT VideoEncoderCap EMPTY>
<!ATTLIST VideoEncoderCap name (h264) #REQUIRED>
<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
<!ELEMENT AudioEncoderCap EMPTY>
<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
<!ELEMENT VideoDecoderCap EMPTY>
<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
<!ELEMENT AudioDecoderCap EMPTY>
<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
]>
<!--
This file is used to declare the multimedia profiles and capabilities
on an android-powered device.
-->
<MediaSettings>
<!-- Each camcorder profile defines a set of predefined configuration parameters -->
<!-- Back Camera -->
<!-- Front Camera -->
<CamcorderProfiles cameraId="0">
<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="9000000"
width="1920"
height="1080"
frameRate="30" />
<Audio codec="aac"
bitRate="128000"
sampleRate="44100"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="3000000"
width="1280"
height="720"
frameRate="30" />
<Audio codec="aac"
bitRate="128000"
sampleRate="44100"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1500000"
width="640"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="9000000"
width="1920"
height="1080"
frameRate="24" />
<Audio codec="aac"
bitRate="128000"
sampleRate="44100"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="3000000"
width="1280"
height="720"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="128000"
sampleRate="44100"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1500000"
width="640"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="90" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
<Camera previewFrameRate="0" />
</CamcorderProfiles>
<CamcorderProfiles cameraId="1">
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1500000"
width="640"
height="480"
frameRate="10" />
<Audio codec="aac"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1500000"
width="640"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="90" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
<Camera previewFrameRate="0" />
</CamcorderProfiles>
<EncoderOutputFileFormat name="mp4" />
<!--
If a codec is not enabled, it is invisible to the applications
In other words, the applications won't be able to use the codec
or query the capabilities of the codec at all if it is disabled
-->
<VideoEncoderCap name="h264" enabled="true"
minBitRate="64000" maxBitRate="3000000"
minFrameWidth="320" maxFrameWidth="1920"
minFrameHeight="240" maxFrameHeight="1200"
minFrameRate="1" maxFrameRate="30" />
<AudioEncoderCap name="aac" enabled="true"
minBitRate="12200" maxBitRate="51200"
minSampleRate="8000" maxSampleRate="44100"
minChannels="1" maxChannels="2" />
<AudioEncoderCap name="amrwb" enabled="true"
minBitRate="6600" maxBitRate="23050"
minSampleRate="16000" maxSampleRate="16000"
minChannels="1" maxChannels="1" />
<AudioEncoderCap name="amrnb" enabled="true"
minBitRate="5525" maxBitRate="12200"
minSampleRate="8000" maxSampleRate="8000"
minChannels="1" maxChannels="1" />
<!--
FIXME:
We do not check decoder capabilities at present
At present, we only check whether windows media is visible
for TEST applications. For other applications, we do
not perform any checks at all.
-->
<VideoDecoderCap name="wmv" enabled="true"/>
<AudioDecoderCap name="wma" enabled="true"/>
<!--
The VideoEditor Capability configuration:
- maxInputFrameWidth: maximum video width of imported video clip.
- maxInputFrameHeight: maximum video height of imported video clip.
- maxOutputFrameWidth: maximum video width of exported video clip.
- maxOutputFrameHeight: maximum video height of exported video clip.
- maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
used to limit the amount of memory for prefetched YUV frames.
For this platform, it allows maximum 30MB(3MB per 1080p frame x 10
frames) memory.
-->
<VideoEditorCap maxInputFrameWidth="1920"
maxInputFrameHeight="1080" maxOutputFrameWidth="1920"
maxOutputFrameHeight="1080" maxPrefetchYUVFrames="10"/>
<!--
The VideoEditor Export codec profile and level values
correspond to the values in OMX_Video.h.
E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
and level 4096 means OMX_VIDEO_AVCLevel41.
Please note that the values are in decimal.
These values are for video encoder.
-->
<!--
Codec = h.264, Baseline profile, level 4.1
-->
<ExportVideoProfile name="h264" profile= "1" level="4096"/>
<!--
Codec = h.263, Baseline profile, level 0
-->
<ExportVideoProfile name="h263" profile= "1" level="1"/>
<!--
Codec = mpeg4, Simple profile, level 5
-->
<ExportVideoProfile name="m4v" profile= "1" level="128"/>
</MediaSettings>
3、
W:\r40\ov5640_ap6212a0a1_r40m\android\device\softwinner\azalea-m2ultra\azalea_m2ultra.mk
W:\r40\ov5640_ap6212a0a1_r40m\android\device\softwinner\azalea-m2ultra\BoardConfig.mk
W:\r40\ov5640_ap6212a0a1_r40m\android\device\softwinner\azalea-m2ultra\init.sun8iw11p1.rc
# csi module
insmod /system/vendor/modules/videobuf2-core.ko
insmod /system/vendor/modules/videobuf2-memops.ko
insmod /system/vendor/modules/videobuf2-vmalloc.ko
insmod /system/vendor/modules/videobuf2-dma-contig.ko
insmod /system/vendor/modules/vfe_io.ko
insmod /system/vendor/modules/gc0328c.ko
insmod /system/vendor/modules/gc2145.ko
insmod /system/vendor/modules/ov5640.ko
insmod /system/vendor/modules/vfe_v4l2.ko
# usb camera module
insmod /system/vendor/modules/uvcvideo.ko
修改为:
# csi module
insmod /system/vendor/modules/videobuf2-dma-contig.ko
insmod /system/vendor/modules/vfe_io.ko
#insmod /system/vendor/modules/gc0328c.ko
#insmod /system/vendor/modules/gc2145.ko
insmod /system/vendor/modules/ov5640.ko
insmod /system/vendor/modules/vfe_v4l2.ko
# usb camera module
#insmod /system/vendor/modules/videobuf2-core.ko
#insmod /system/vendor/modules/videobuf2-memops.ko
#insmod /system/vendor/modules/videobuf2-vmalloc.ko
#insmod /system/vendor/modules/uvcvideo.ko
W:\r40\ov5640_ap6212a0a1_r40m\android\device\softwinner\azalea-m2ultra\ueventd.sun8iw11p1.rc
/dev/disp 0770 system system
/dev/cedar_dev 0666 media media
/dev/ace_dev 0666 system system
/dev/ump 0777 system graphics
/dev/mali 0666 system graphics
/dev/video* 0770 media media
/dev/ttyUSB0 0777 system system
/dev/ttyUSB1 0777 system system
/dev/ttyUSB2 0777 system system
/dev/ttyUSB3 0777 system system
/dev/ttyACM0 0777 system system
/dev/ttyACM1 0777 system system
/dev/ttyACM2 0777 system system
/dev/gps 0777 system system
/dev/pa_dev 0777 system system
/dev/sunxi_mem 0666 media media
/dev/g2d 0660 media media
/dev/deinterlace 0666 media media
/dev/fd_dev 0660 media media
/dev/sr0 0777 system system
/dev/ion 0777 system graphics
/dev/transform 0660 system system
/dev/pvrsrvkm 0666 root root
/dev/pvr_sync 0666 system graphics
/dev/block/by-name/misc 0660 system system
/dev/block/by-name/frp 0600 system system
/dev/opteearmtz00 0660 drmrpc drmrpc
4、
W:\r40\ov5640_ap6212a0a1_r40m\android\frameworks\base\packages\SettingsProvider\res\values\defaults.xml
<integer name="def_screen_off_timeout">60000</integer>
修改为:
<integer name="def_screen_off_timeout">1800000</integer>
<bool name="def_lockscreen_disabled">false</bool>
修改为:
<bool name="def_lockscreen_disabled">true</bool>
5、
W:\r40\ov5640_ap6212a0a1_r40m\android\hardware\broadcom\wlan\bcmdhd\firmware\ap6212\device-bcm.mk
W:\r40\ov5640_ap6212a0a1_r40m\android\device\softwinner\azalea-m2ultra\bluetooth\bt_vendor.conf
(解决不接电池的时候出现:电量不足的情况!)
W:\r40\ov5640_ap6212a0a1_r40m\android\packages\apps\Camera2\src\com\android\camera\CameraActivity.java
private AlertDialog mLocationDialog;
private BroadcastReceiver mBatteryInfoReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {
int Level = intent.getIntExtra("level", 0);
int Scale = intent.getIntExtra("scale", 100);
/*
*Logic:
*1.the battery level is lower then 5%.
*2.if in camera, make sure that not in the snapshot progress.
*3.if in videocamera, make sure that not in the videorecording progress.
*4.everytime starting the camera activity, the battery level is broadcasted,
* if meeting the conditions above, give a dialog, press it and finish the activity.
*5.if the conditions are not satisfied when started, play for a moment, in the camera acitvity
* or video camera activity, the conditiosn are satisfied, also give a dialog for finishing the activity.
*
*by fuqiang.
*/
if(Level < 5)
{
Runnable runnable_close_camera = new Runnable() {
@Override
public void run() {
//close the camera.
CameraActivity.this.finish();
}
};
showLocationDialog();
}
/*
*Logic:
*1.the battery level is lhigher then 5% and lower than 15%.
*2.if in camera, make sure that not in the snapshot progress.
*3.if in videocamera, make sure that not in the videorecording progress.
*4.whether in camera or in videocamera, make sure that the flash mode is supported.
*5.everytime starting the camera activity, the battery level is broadcasted,
* if meeting the conditions above, forbidden the flash(gray icon), give a dialog to notise user.
*6.if the conditions are not satisfied when started, play for a moment, in the camera acitvity
* or video camera activity, the conditiosn are satisfied, forbidden the flash and give a notice dialog.
*7.the dialog is only given once for each camera activity starting.
*
*by fuqiang.
*/
else if(Level < 16)
{
//close the flash mode.
/*
if (mIsLowBatteryDialogShown == false)
{
mRotateDialog.showAlertDialog(
getString(R.string.warning),
getString(R.string.low_battery_15),
null, null,
getString(R.string.close), null);
mIsLowBatteryDialogShown = true;
}
*/
}
}
}
};
修改为:
private AlertDialog mLocationDialog;
private BroadcastReceiver mBatteryInfoReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {
int Level = intent.getIntExtra("level", 0);
int Scale = intent.getIntExtra("scale", 100);
Log.w(TAG, "2016/11/29 19:54 &&&& wenyuanbo battery Level" + Level);
/*
*Logic:
*1.the battery level is lower then 5%.
*2.if in camera, make sure that not in the snapshot progress.
*3.if in videocamera, make sure that not in the videorecording progress.
*4.everytime starting the camera activity, the battery level is broadcasted,
* if meeting the conditions above, give a dialog, press it and finish the activity.
*5.if the conditions are not satisfied when started, play for a moment, in the camera acitvity
* or video camera activity, the conditiosn are satisfied, also give a dialog for finishing the activity.
*
*by fuqiang.
*/
if(Level < 5)
{
//Runnable runnable_close_camera = new Runnable() {
//@Override
//public void run() {
////close the camera.
////CameraActivity.this.finish();
//}
//};
//
//showLocationDialog();
Log.w(TAG, "2016/11/29 18:20 **** wenyuanbo battery Level" + Level);
}
/*
*Logic:
*1.the battery level is lhigher then 5% and lower than 15%.
*2.if in camera, make sure that not in the snapshot progress.
*3.if in videocamera, make sure that not in the videorecording progress.
*4.whether in camera or in videocamera, make sure that the flash mode is supported.
*5.everytime starting the camera activity, the battery level is broadcasted,
* if meeting the conditions above, forbidden the flash(gray icon), give a dialog to notise user.
*6.if the conditions are not satisfied when started, play for a moment, in the camera acitvity
* or video camera activity, the conditiosn are satisfied, forbidden the flash and give a notice dialog.
*7.the dialog is only given once for each camera activity starting.
*
*by fuqiang.
*/
else if(Level < 16)
{
//close the flash mode.
/*
if (mIsLowBatteryDialogShown == false)
{
mRotateDialog.showAlertDialog(
getString(R.string.warning),
getString(R.string.low_battery_15),
null, null,
getString(R.string.close), null);
mIsLowBatteryDialogShown = true;
}
*/
}
}
}
};
6、
W:\r40\ov5640_ap6212a0a1_r40m\lichee\linux-3.10\drivers\media\platform\sunxi-vfe\device\Makefile
obj-m+= ov5640.o
#obj-m+= ov2640.o
#obj-m+= ov7736.o
#obj-m+= s5k4ec.o
#obj-m+= s5k4ec_mipi.o
#obj-m+= gc2035.o
#obj-m+= gt2005.o
#obj-m+= gc0307.o
#obj-m+= gc0308.o
#obj-m+= gc0328.o
#obj-m+= gc0328c.o
#obj-m+= gc0329.o
#obj-m+= gc0311.o
#obj-m+= hi253.o
#obj-m+= sp2518.o
#obj-m+= sp2519.o
#obj-m+= sp0718.o
#obj-m+= sp0838.o
#obj-m+= ov16825.o
#obj-m+= ov5650.o
#obj-m+= ov5647.o
#obj-m+= ov5647_mipi.o
#obj-m+= t8et5.o
#obj-m+= s5k4e1.o
#obj-m+= s5k4e1_mipi.o
#obj-m+= sp2518.o
#obj-m+= sp0718.o
#obj-m+= gc5004.o
#obj-m+= gc5004_mipi.o
#obj-m+= ov5648.o
#obj-m+= ar0330.o
#obj-m+= ov5648.o
#obj-m+= sp5408.o
#obj-m+= ov12830.o
#obj-m+= ov8825.o
#obj-m+= ov8850.o
#obj-m+= gc2155.o
#obj-m+= ov8858.o
#obj-m+= ov13850.o
#obj-m+= imx214.o
#obj-m+= ov8858_4lane.o
#obj-m+= sp5409.o
#obj-m+= s5k5e2yx.o
#obj-m+= ov2710_mipi.o
#obj-m+= ov2686.o
7、(可选)在probe函数检测摄像头的时候增加打印:
W:\r40\ov5640_ap6212a0a1_r40m\lichee\linux-3.10\drivers\media\platform\sunxi-vfe\device\ov5640.c
static int sensor_detect(struct v4l2_subdev *sd)
{
data_type rdval;
LOG_ERR_RET(sensor_read(sd, 0x300a, &rdval))
if(rdval != 0x56)
return -ENODEV;
LOG_ERR_RET(sensor_read(sd, 0x300b, &rdval))
if(rdval != 0x40)
return -ENODEV;
return 0;
}
修改为:
static int sensor_detect(struct v4l2_subdev *sd)
{
data_type rdval;
printk("****wyb %s:%d/%s()! \n", __FILE__, __LINE__, __func__);
LOG_ERR_RET(sensor_read(sd, 0x300a, &rdval))
printk("****wyb %s:%d/%s()! 0x300a rdval=0x%02x\n", __FILE__, __LINE__, __func__, rdval);
if(rdval != 0x56)
return -ENODEV;
LOG_ERR_RET(sensor_read(sd, 0x300b, &rdval))
printk("****wyb %s:%d/%s()! 0x300b rdval=0x%02x\n", __FILE__, __LINE__, __func__, rdval);
if(rdval != 0x40)
return -ENODEV;
return 0;
}
8、(可选修改)
W:\r40\ov5640_ap6212a0a1_r40m\lichee\tools\pack\chips\sun8iw11p1\configs\default\env.cfg
#kernel command arguments
#enforcing=0
earlyprintk=sunxi-uart,0x01c28000
initcall_debug=0
console=ttyS0,115200
nor_root=/dev/mtdblock2
nand_root=/dev/system
mmc_root=/dev/mmcblk0p7
init=/init
loglevel=8
cma=256M
vmalloc=384MB
selinux=enforcing
#set kernel cmdline if boot.img or recovery.img has no cmdline we will use this
setargs_nor=setenv bootargs enforcing=${enforcing} earlyprintk=${earlyprintk} initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${nor_root} init=${init} partitions=${partitions} cma=${cma}
setargs_nand=setenv bootargs enforcing=${enforcing} earlyprintk=${earlyprintk} initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${nand_root} init=${init} partitions=${partitions} cma=${cma} vmalloc=${vmalloc}
setargs_mmc=setenv bootargs enforcing=${enforcing} earlyprintk=${earlyprintk} initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${mmc_root} init=${init} partitions=${partitions} cma=${cma} vmalloc=${vmalloc}
#nand command syntax: sunxi_flash read address partition_name read_bytes
#0x4007f800 = 0x40080000(kernel entry) - 0x800(boot.img header 2k)
boot_normal=sunxi_flash read 40007800 boot;boota 40007800
boot_recovery=sunxi_flash read 40007800 recovery;boota 40007800
boot_fastboot=fastboot
#recovery key
recovery_key_value_max=0x13
recovery_key_value_min=0x10
#fastboot key
fastboot_key_value_max=0x8
fastboot_key_value_min=0x2
#uboot system env config
bootdelay=3
#default bootcmd, will change at runtime according to key press
bootcmd=run setargs_nand boot_normal#default nand boot
9、
W:\r40\ov5640_ap6212a0a1_r40m\lichee\tools\pack\chips\sun8iw11p1\configs\m2ultra\sys_config.fex
;----------------------------------------------------------------------------------
;i2c configuration
;----------------------------------------------------------------------------------
[twi0]
twi0_used = 1
twi0_scl = port:PB00<2><default><default><default>
twi0_sda = port:PB01<2><default><default><default>
[twi1]
twi1_used = 1
twi1_scl = port:PB18<2><default><default><default>
twi1_sda = port:PB19<2><default><default><default>
[twi2]
twi2_used = 1
twi2_scl = port:PB20<2><default><default><default>
twi2_sda = port:PB21<2><default><default><default>
[twi3]
twi3_used = 0
twi3_scl = port:PI0<3><default><default><default>
twi3_sda = port:PI1<3><default><default><default>
[twi4]
twi4_used = 1
twi4_scl = port:PI02<3><default><default><default>
twi4_sda = port:PI03<3><default><default><default>
;----------------------------------------------------------------------------------
;TWI device configuration
;compatible --- device name
;reg --- device address
;----------------------------------------------------------------------------------
;[twi0/twi_board0]
;compatible =
;reg =
;--------------------------------------------------------------------------------
;csi (COMS Sensor Interface) configuration
;csi(x)_dev(x)_used: 0:disable 1:enable
;csi(x)_dev(x)_isp_used 0:not use isp 1:use isp
;csi(x)_dev(x)_fmt: 0:yuv 1:bayer raw rgb
;csi(x)_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby
;csi(x)_dev(x)_vflip: flip in vertical direction 0:disable 1:enable
;csi(x)_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable
;csi(x)_dev(x)_iovdd: camera module io power handle string, pmu power supply
;csi(x)_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply
;csi(x)_dev(x)_avdd: camera module analog power handle string, pmu power supply
;csi(x)_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply
;csi(x)_dev(x)_dvdd: camera module core power handle string, pmu power supply
;csi(x)_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply
;csi(x)_dev(x)_afvdd: camera module vcm power handle string, pmu power supply
;csi(x)_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply
;fill voltage in uV, e.g. iovdd = 2.8V, csix_iovdd_vol = 2800000
;fill handle string as below:
;axp22_eldo3
;axp22_dldo4
;axp22_eldo2
;fill handle string "" when not using any pmu power supply
;--------------------------------------------------------------------------------
[csi0]
csi0_used= 1
csi0_sensor_list= 0
csi0_pck = port:PE00<3><default><default><default>
csi0_mck = port:PE01<1><0><1><0>
csi0_hsync = port:PE02<3><default><default><default>
csi0_vsync = port:PE03<3><default><default><default>
csi0_d0 = port:PE04<3><default><default><default>
csi0_d1 = port:PE05<3><default><default><default>
csi0_d2 = port:PE06<3><default><default><default>
csi0_d3 = port:PE07<3><default><default><default>
csi0_d4 = port:PE08<3><default><default><default>
csi0_d5 = port:PE09<3><default><default><default>
csi0_d6 = port:PE10<3><default><default><default>
csi0_d7 = port:PE11<3><default><default><default>
[csi0/csi0_dev0]
csi0_dev0_used= 1
csi0_dev0_mname = "ov5640"
csi0_dev0_twi_addr= 0x78
csi0_dev0_twi_id= 4
csi0_dev0_pos= "rear"
csi0_dev0_isp_used = 0
csi0_dev0_fmt = 0
csi0_dev0_stby_mode = 0
csi0_dev0_vflip = 0
csi0_dev0_hflip = 0
csi0_dev0_iovdd = "csi-iovcc"
csi0_dev0_iovdd_vol = 2800000
csi0_dev0_avdd = "csi-avdd"
csi0_dev0_avdd_vol = 2800000
csi0_dev0_dvdd = "csi-dvdd"
csi0_dev0_dvdd_vol = 1500000
csi0_dev0_afvdd = "csi-afvcc"
csi0_dev0_afvdd_vol = 2800000
csi0_dev0_power_en =
csi0_dev0_reset = port:PI07<1><0><1><0>
csi0_dev0_pwdn = port:PI06<1><0><1><0>
csi0_dev0_flash_used = 0
csi0_dev0_flash_type = 2
csi0_dev0_flash_en =
csi0_dev0_flash_mode =
csi0_dev0_flvdd = ""
csi0_dev0_flvdd_vol=
csi0_dev0_af_pwdn =
csi0_dev0_act_used = 0
csi0_dev0_act_name = "ad5820_act"
csi0_dev0_act_slave = 0x18
[csi1]
csi1_used = 0
csi1_sensor_list = 0
csi1_pck = port:PG00<3><default><default><default>
csi1_mck = port:PG01<1><0><1><0>
csi1_hsync = port:PG02<3><default><default><default>
csi1_vsync = port:PG03<3><default><default><default>
csi1_d0 = port:PG04<3><default><default><default>
csi1_d1 = port:PG05<3><default><default><default>
csi1_d2 = port:PG06<3><default><default><default>
csi1_d3 = port:PG07<3><default><default><default>
csi1_d4 = port:PG08<3><default><default><default>
csi1_d5 = port:PG09<3><default><default><default>
csi1_d6 = port:PG10<3><default><default><default>
csi1_d7 = port:PG11<3><default><default><default>
[csi1/csi1_dev0]
csi1_dev0_used= 0
csi1_dev0_mname = "ov5640"
csi1_dev0_twi_addr = 0x78
csi1_dev0_twi_id = 1
csi1_dev0_pos = "rear"
csi1_dev0_isp_used = 0
csi1_dev0_fmt = 0
csi1_dev0_stby_mode = 0
csi1_dev0_vflip = 0
csi1_dev0_hflip = 0
csi1_dev0_iovdd = ""
csi1_dev0_iovdd_vol = 2800000
csi1_dev0_avdd = ""
csi1_dev0_avdd_vol = 2800000
csi1_dev0_dvdd = ""
csi1_dev0_dvdd_vol = 1500000
csi1_dev0_afvdd = ""
csi1_dev0_afvdd_vol = 2800000
csi1_dev0_power_en =
csi1_dev0_reset = port:PH14<1><0><1><0>
csi1_dev0_pwdn = port:PH17<1><0><1><0>
csi1_dev0_flash_used = 0
csi1_dev0_flash_type = 2
csi1_dev0_flash_en =
csi1_dev0_flash_mode =
csi1_dev0_flvdd = ""
csi1_dev0_flvdd_vol =
csi1_dev0_af_pwdn =
csi1_dev0_act_used = 0
csi1_dev0_act_name = "ad5820_act"
csi1_dev0_act_slave = 0x18
10、编译刷机只有(请接上OV5640):
shell@azalea-m2ultra:/ $
shell@azalea-m2ultra:/ $ lsmod
Module Size Used by
ft5x_ts 63846 0
bcmdhd 646383 0
vfe_v4l2 206031 1
ov5640 31818 0
vfe_io 38748 3 vfe_v4l2,ov5640
videobuf2_dma_contig 10274 1 vfe_v4l2
gt82x 10796 0
mali 208447 20
nand 301229 0
shell@azalea-m2ultra:/ $
shell@azalea-m2ultra:/ $
shell@azalea-m2ultra:/ $ cd /dev
(权限不足)
shell@azalea-m2ultra:/dev $ ls -l
opendir failed, Permission denie[ 2026.019201] type=1400 audit(1262316742.140:10): avc: denied { read } for pid=14918 comm="ls" name="/" dev="tmpfs" ino=5130 scontext=u:r:shell:s0 tcontext=u:object_r:device:s0 tclass=dir permissive=0
d
255|shell@azalea-m2ultra:/dev $
255|shell@azalea-m2ultra:/dev $ su
root@azalea-m2ultra:/dev #
root@azalea-m2ultra:/dev #
root@azalea-m2ultra:/dev # ls -l v*
crw------- root root 7, 0 2010-01-01 10:58 vcs
crw------- root root 7, 1 2010-01-01 10:58 vcs1
crw------- root root 7, 128 2010-01-01 10:58 vcsa
crw------- root root 7, 129 2010-01-01 10:58 vcsa1
crwxrwx--- media media 81, 0 2010-01-01 10:58 video0
root@azalea-m2ultra:/dev #
root@azalea-m2ultra:/dev #
出图的效果:红绿蓝都正确出来了,拍照的颜色在电脑上面正常。但是(默认的驱动下)通过HDMI输出颜色偏暖色,不知道是HDMI输出的问题,还是显示的问题。
OV5640的驱动里面经过搜索分辨率可以设置为:2592x1936, 2048x1536, 1600x1200, 1280x960, 1024x768, 1920x1080 ,1280x720, 800x600, 640x480
拍照出来的分辨率有:2592x1936, 2048x1536, 1600x1200, 1920x1080 ,1280x720,
丢失的分辨率有:1280x960, 1024x768, 800x600, 640x480
可能与全志R40平台的Android的framework有关系。或者是驱动里面有些分辨率没有进去?
以1080p的分辨率录像可以达到30fps。(通过射手播放器显示:)
视频: MPEG4 Video (H264) 1920x1080 29.98fps [VideoHandle]
音频: AAC 44100Hz 单声道 96Kbps [SoundHandle]
视频画面: 1920 x 1080 (画面比例 16:9)
时间长度: 00:54:36
文件尺寸: 1192MB (1250540926 bytes)
文件类型: stormplayer.mp4
如果采用核心板设计,摄像头在底板上,通过FFC排线/插针连接,CB-S开发板以1080p录像只能够到25fps。
也就是FFC排线/插针传输的可靠速度(每秒):
1920*1080*2*25B=103680000B=829440000b(不到1Gbps)
速算:
1920*1080*2*25B约等于2000*1000*2*25B=2M*50B=100MB约等于1Gb(速算的时候1B取10位)
1080p录像的体积:
录像一分钟不到25MB。也就是一秒钟不到0.5MB。
一小时不到1.5GB(参考:54分钟使用了1.22GB)
- 在全志r40m平台调通ov5640(分色排版)V1.1版本
- 31在全志r40m平台调通ov5640(分色排版)
- 在全志r40平台tinav2.1系统下调通ov5640(分色排版)V1.1
- 全志R16平台的parrotv1.1的系统点亮OV5640(分色排版)版本V1.2
- 在全志r40平台tinav2.1系统下调通ov5640(分色排版)
- 在全志R16平台的androidM系统下调通OV5640(分色排版)
- 31在全志r40m平台调通ov5640(草稿)
- 全志R16平台的parrotv1.1的系统点亮OV5640(分色排版)EVB30
- 全志R16平台调通RTL8189ES的步骤v1.1(分色排版)android4.4.2
- 09全志r40m平台的SATA验证(分色排版)
- 全志R16平台的Android6系统下调通rtl8189es(分色排版)V1.1
- 全志R16的android4.4.2平台点亮gc2145(evb30)版本:V1.1(分色排版)
- 通过全志R16平台TINAV2.1下的LCD显示BMP图片(分色排版)V1.0版本
- 在全志A64平台点亮GC2145 V1.0(分色排版)录像有问题
- 如何调整全志R16平台在tinav2.1下的频率V1.0(分色排版)
- 在全志R16平台的tinav2.1系统下点亮客户的RGB屏幕V1.0(分色排版)
- 全志A33平台调通AP6181(分色排版)
- 全志R16平台的Android6系统下调通rtl8189es(分色排版)V1.0
- Python-正则对象的方法
- kettle
- ribbon类同层次图
- 防止平均数溢出的算法
- C#托管和非托管的资源(一)——资源
- 在全志r40m平台调通ov5640(分色排版)V1.1版本
- 关于listener加载不到的问题
- 消息队列函数(msgget、msgctl、msgsnd、msgrcv)及其范例
- 果餐时客的自建电商与第三方平台战略转型-2017年11月江西IDC排行榜与发展报告
- 接口测试框架搭建思路
- Oracle安装——环境准备
- mt2503 [BT dialer v2.1]只能接听,不能挂断来电
- sublime使用xdebug调试php
- MySQL-----MySQL主-从双机热备