2011-11-8 14:07:02

 

2011-11-8 14:07:02

 

E/FslCameraHAL( 2174): The preview size w 352, h 288 is not corrected
E/StagefrightRecorder( 2174): Could not change settings. Someone else is using camera 0?

StagefrightRecorder


setParameters

为什么参数设置失败

D/ProxyInterface( 2581): after recvMsg @ProxyInterface.java: Line 392
D/ProxyInterface( 2581): AMP_USER_INFORM_THROB...
D/ProxyInterface( 2581): before recvMsg @ProxyInterface.java: Line 389
D/ProxyInterface( 2581): after recvMsg @ProxyInterface.java: Line 392
D/ProxyInterface( 2581): AMP_REQUEST_TCP_PREVIEW...
I/CameraRecorder( 2581):  handleMessage@1
I/CameraRecorder( 2581):  Msg.MsgType.REQUEST_START_TCPVIEW
V/MediaRecorder( 2581): constructor
V/MediaRecorder( 2581): doCleanUp
V/MediaRecorder( 2581): setListener
V/MediaRecorder( 2581): setVideoSource(1)
V/MediaRecorder( 2581): Call init() since the media recorder is not initialized yet
V/MediaRecorder( 2581): init
D/ProxyInterface( 2581): before recvMsg @ProxyInterface.java: Line 389
V/MediaRecorder( 2581): setAudioSource(1)
V/MediaRecorder( 2581): setOutputFormat(2)
V/MediaRecorder( 2581): setVideoSize(352, 288)
V/MediaRecorder( 25VideoFrameRate(15)
V/MediaRecorder( 2581): setVideoEncoder(2)
V/MediaRecorder( 2581): setAudioEncoder(1)
V/MediaRecorder( 2581): setOutputFile(38, 0, 0)
I/MediaRecorderJNI( 2581): prepare: surface=0xa6a50 (identity=25)
V/MediaRecorder( 2581): setPreviewSurface(0xa6a50)
V/MediaRecorder( 2581): prepare
V/MediaRecorder( 2581): start
W/iMX ALSA( 2174): s_close--
D/iMX ALSA( 2174): open called for devices 00040000 in mode 0...
D/iMX ALSA( 2174): **** List of CAPTURE Hardware Devices ****
D/iMX ALSA( 2174): card 0: imx3stack [imx-3stack], device 0: SGTL5000 SGTL5000-0 []
W/iMX ALSA( 2174): enable MMAP access for PCM
D/iMX ALSA( 2174): **** List of CAPTURE Hardware Devices ****
D/iMX ALSA( 2174): card 0: imx3stack [imx-3stack], device 0: SGTL5000 SGTL5000-0 []
D/iMX ALSA( 2174): setDefaultControls set card: hw:00
I/iMX ALSA( 2174): Initialized ALSA CAPTURE device hw:00
W/AudioHardwareALSA( 2174): the hardware default channels  is 12, sampleRate is 44100, format is 1
W/CameraService( 2174): CameraService::connect X (pid 2174) rejected (existing client).
E/StagefrightRecorder( 2174): Camera connection could not be established.
W/        ( 2174): Call stop() when encoder has not started.
E/MediaRecorder( 2581): start failed: -16
E/CameraRecorder( 2581): start failed.
D/dalvikvm( 2581): GC_CONCURRENT freed 331K, 51% free 2871K/5767K, external 912K/1038K, paused 3ms+4ms
V/MediaRecorder( 2581): setListener
V/MediaRecorder( 2581): release
I/FslCameraHAL( 2174): ###the mesg disabled is 10###
I/FslCameraHAL( 2174): Camera hal already stop preview
I/FslCameraHAL( 2174): ###the mesg disabled is 1ff###
I/FslCameraHAL( 2174): Camera hal already stop preview
I/FslCameraHAL( 2174): Camera hal already stop preview
I/FslCameraHAL( 2174): close the device
I/OMXPlayer( 2174): Stop Player.
I/OMXPlayer( 2174): Stop Player.
W/iMX ALSA( 2174): s_close--
W/iMX ALSA( 2174): s_close--
V/MediaRecorder( 2581): destructor
D/ProxyInterface( 2581):  SocketTimeoutException [email protected]: Line 606
D/ProxyInterface( 2581):  SocketTimeoutException [email protected]: Line 606
D/ProxyInterface( 2581):  SocketTimeoutException [email protected]: Line 606
D/ProxyInterface( 2581):  SocketTimeoutException [email protected]: Line 606
D/ProxyInterface( 2581): after recvMsg @ProxyInterface.java: Line 392
D/ProxyInterface( 2581): AMP_USER_INFORM_THROB...
D/ProxyInterface( 2581): before recvMsg @ProxyInterface.java: Line 389
D/ProxyInterface( 2581):  SocketTimeoutException [email protected]: Line 606
D/ProxyInterface( 2581):  SocketTimeoutException [email protected]: Line 606

 

W/AudioHardwareALSA( 2174): the hardware default channels  is 12, sampleRate is 44100, format is 1
W/CameraService( 2174): CameraService::connect X (pid 2174) rejected (existing client).
E/StagefrightRecorder( 2174): Camera connection could not be established.
W/        ( 2174): Call stop() when encoder has not started.

认为有人在使用

CameraService::connect 失败

StagefrightRecorder 这个在存储的时候做

 

aster( 2174): A component of name 'OMX.Freescale.std.parser.fsl.sw-based' already exists, ignoring this one.
E/OMXMaster( 2174): A component of name 'OMX.Freescale.std.parser.fsl.sw-based' already exists, ignoring this one.
E/OMXMaster( 2174): A component of name 'OMX.Freescale.std.parser.fsl.sw-based' already exists, ignoring this one.
E/OMXMaster( 2174): A component of name 'OMX.Freescale.std.parser.fsl.sw-based' already exists, ignoring this one.
I/FslCameraHAL( 2174): Face Back Camera is ov, orient is 0
I/FslCameraHAL( 2174): Face Front Camera is #, orient is 0
I/FslCameraHAL( 2174): It is the CSI device
I/FslCameraHAL( 2174): Create the software encoder
I/FslCameraHAL( 2174): mPreviewFormat :NV12
I/FslCameraHAL( 2174): mUvcSpecialCaptureFormat :YUYV
I/FslCameraHAL( 2174): mPreviewCapturedFormat :NV12
I/FslCameraHAL( 2174): mPreviewCapturedFormat is 3231564e
I/FslCameraHAL( 2174): ##The supportedPictureSizes is ?##
I/FslCameraHAL( 2174): ##the supportedPreviewSizes is  ?##
I/FslCameraHAL( 2174): ##the supportedFPS is 15,30##
I/FslCameraHAL( 2174): created the fsl Camera hal
I/FslCameraHAL( 2174): ###the mesg enabled is d###
I/OMXPlayer( 2174): rw.VIDEO_RENDER_NAME: [video_render.overlay]
I/OMXPlayer( 2174): SetVideoRenderType 1
I/OMXPlayer( 2174): Loading content: /system/media/audio/ui/camera_click.ogg
D/ProxyInterface( 2528): after recvMsg @ProxyInterface.java: Line 392
D/ProxyUnhandled fault: external abort on non-linefetch (0x1018) at 0x2bbbc054
Interface( 2528): AMP_USER_INFORM_THROB...
D/ProxyInterface( 2528): before recvMsg @ProxyInterface.java: Line 389
Unhandled fault: external abort on non-linefetch (0x1018) at 0x2bbbc054
I/OMXPlayer( 2174): rw.VIDEO_RENDER_NAME: [video_render.overlay]
I/OMXPlayer( 2174): SetVideoRenderType 1
I/OMXPlayer( 2174): Loading content: /system/media/audio/ui/VideoRecord.ogg
Unhandled fault: external abort on non-linefetch (0x1018) at 0x2bbcd054
Unhandled fault: external abort on non-linefetch (0x1018) at 0x2bbcd054
I/FslCameraHAL( 2174): ##the set preview size is 352x288 ##
E/FslCameraHAL( 2174): The preview size w 352, h 288 is not corrected
E/StagefrightRecorder( 2174): Could not change settings. Someone else is using camera 0?
W/        ( 2174): Call stop() when encoder has not started.
E/MediaRecorder( 2528): start failed: -16
E/CameraRecorder( 2528): start failed.
D/ProxyInterface( 2528):  SocketTimeoutException [email protected]: Line 606
D/ProxyInterface( 2528):  SocketTimeoutException [email protected]: Line 606
D/ProxyInterface( 2528):  SocketTimeoutException [email protected]: Line 606
D/ProxyInterface( 2528):  SocketTimeoutException [email protected]: Line 606


EnumDevParam
这分辨率不支持 ?
csi 和 uvc

应该为csi的

后置摄像头

uvc 和 csi的查询接口不一样

还有一个基类 V4l2CapDeviceBase

    CAMERA_HAL_ERR_RET CameraHal::Init()
    {
        CAMERA_HAL_LOG_FUNC;
        CAMERA_HAL_ERR_RET ret = CAMERA_HAL_ERR_NONE;
        mCameraReady == true;

        if ((ret = AolLocForInterBuf())<0)
            return ret;
        if ((ret = InitCameraHalParam()) < 0)
            return ret;
        if (mPPDeviceNeed == true && mPPDevice == NULL)
            return CAMERA_HAL_ERR_PP_NULL;
        if ((ret = CameraMiscInit()) < 0)
            return ret;

        return ret;
    }
   
    初始化得时候会枚举设备参数
   
    基类实现了捕获设备的接口
   
    mxc_v4l_open 打开

如果是打开失败 out/target/product/imx51_bbg/system/lib/libcamera.so

mxc_v4l2_probe match后做了什么?

跟谁match的?


v4l2_int_device_try_attach_all

int v4l2_int_device_register(struct v4l2_int_device *d)
{
 if (d->type == v4l2_int_type_slave)
  sort(d->u.slave->ioctls, d->u.slave->num_ioctls,
       sizeof(struct v4l2_int_ioctl_desc),
       &ioctl_sort_cmp, NULL);
 mutex_lock(&mutex);
 list_add(&d->head, &int_list);
 v4l2_int_device_try_attach_all();
 mutex_unlock(&mutex);

 return 0;
}

ioctl_sort_cmp 比较大小

struct v4l2_int_master {
 int (*attach)(struct v4l2_int_device *slave);
 void (*detach)(struct v4l2_int_device *slave);
};

struct v4l2_int_device {
 /* Don't touch head. */
 struct list_head head;

 struct module *module;

 char name[V4L2NAMESIZE];

 enum v4l2_int_type type;
 union {
  struct v4l2_int_master *master;
  struct v4l2_int_slave *slave;
 } u;

 void *priv;
};

主从设备

每个slave 有自己的ioctl 描述

struct v4l2_int_slave {
 /* Don't touch master. */
 struct v4l2_int_device *master;

 char attach_to[V4L2NAMESIZE];

 int num_ioctls;
 struct v4l2_int_ioctl_desc *ioctls;
};

主设备调用从设备的方法

slave attach 有什么问题

static int mxc_v4l2_master_attach(struct v4l2_int_device *slave)

实际上这个函数就没有走


In MVC: init_camera_struct
m->type != v4l2_int_type_master 0  m->name mxc_v4l2_cap
s->type != v4l2_int_type_slave  1  s->u.slave->master -21444612720x
zhw m->name mxc_v4l2_cap ,s->u.slave->attach_to .?

现在可能是slave没有注册

现在看一下slave 注册有什么问题

OV3640 根本没有注册

int __init
i2c_register_board_info(int busnum,
 struct i2c_board_info const *info, unsigned len)
{
 int status;

 down_write(&__i2c_board_lock);

 /* dynamic bus numbers will be assigned after the last static one */
 if (busnum >= __i2c_first_dynamic_bus_num)
  __i2c_first_dynamic_bus_num = busnum + 1;

 for (status = 0; len; len--, info++) {
  struct i2c_devinfo *devinfo;

  devinfo = kzalloc(sizeof(*devinfo), GFP_KERNEL);
  if (!devinfo) {
   pr_debug("i2c-core: can't register boardinfo!\n");
   status = -ENOMEM;
   break;
  }

  devinfo->busnum = busnum;
  devinfo->board_info = *info;
  list_add_tail(&devinfo->list, &__i2c_board_list);
 }

 up_write(&__i2c_board_lock);

 return status;
}


注册板I2C信息

现在的问题是怎么来读这个数组呢?

先看注册的驱动对不对

寄存器写失败

 

 

 

 

 

 

 

   
   


 

你可能感兴趣的:(2011-11-8 14:07:02)