原创 续:i.MX27视频应用技术详解-TW2835

2011-10-11 12:28 1695 7 7 分类: 消费电子

 

typedef struct _cam_data {

         struct video_device *video_dev;

 

         /* semaphore guard against SMP multithreading */

         struct semaphore busy_lock;

 

         int open_count;

 

         /* params lock for this camera */

         struct semaphore param_lock;

 

         /* Encorder */

         struct list_head ready_q;

         struct list_head done_q;

         struct list_head working_q;

         int ping_pong_csi;

         spinlock_t int_lock;

         struct mxc_v4l_frame frame[FRAME_NUM];

         int skip_frame;

    int overflow;

         wait_queue_head_t enc_queue;

         int enc_counter;

         dma_addr_t rot_enc_bufs[2];

         void *rot_enc_bufs_vaddr[2];

         int rot_enc_buf_size[2];

         enum v4l2_buf_type type;

 

         /* still image capture */

         wait_queue_head_t still_queue;

         int still_counter;

         dma_addr_t still_buf;

         void *still_buf_vaddr;

 

         /* overlay */

         struct v4l2_window win;

         struct v4l2_framebuffer v4l2_fb;

         dma_addr_t vf_bufs[2];

         void *vf_bufs_vaddr[2];

         int vf_bufs_size[2];

         dma_addr_t rot_vf_bufs[2];

         void *rot_vf_bufs_vaddr[2];

         int rot_vf_buf_size[2];

         bool overlay_active;

         int output;

         struct fb_info *overlay_fb;

 

         /* v4l2 format */

         struct v4l2_format v2f;

         int rotation;

         struct v4l2_mxc_offset offset;

 

         /* V4l2 control bit */

         int bright;

         int hue;

         int contrast;

         int saturation;

         int red;

         int green;

         int blue;

         int ae_mode;

         int ae_enable;

         int awb_enable;

         int flicker_ctrl;

 

         /* standart */

         struct v4l2_streamparm streamparm;

         struct v4l2_standard standard;

 

         /* crop */

         struct v4l2_rect crop_bounds;

         struct v4l2_rect crop_defrect;

         struct v4l2_rect crop_current;

 

         int (*enc_update_eba) (dma_addr_t eba, int *bufferNum);

         int (*enc_enable) (void *private);

         int (*enc_disable) (void *private);

         void (*enc_callback) (u32 mask, void *dev);

         int (*vf_start_adc) (void *private);

         int (*vf_stop_adc) (void *private);

         int (*vf_start_sdc) (void *private);

         int (*vf_stop_sdc) (void *private);

         int (*csi_start) (void *private);

         int (*csi_stop) (void *private);

 

         /* misc status flag */

         bool overlay_on;

         bool capture_on;

         int overlay_pid;

         int capture_pid;

         bool low_power;

         wait_queue_head_t power_queue;

 

         /* camera sensor interface */

         struct camera_sensor *cam_sensor;

} cam_data;

 

  1. v4l2采集驱动以及显示驱动[overlay输出]

负责控制csi接口采集视频,并实现标准的的v4l2接口,给应用程序调用。这是中应用层访问视频的标志接口。

 

    二、常见问题。

   

    1.视频出现串扰现象

        最后查出是使用了不合格的tvs管

    2.视频上出现了有规则的横向水波纹

        将TW2835的1.8V DC-DC供电改为1.8V LDO供电消除开关噪声,无水波纹出现

    3.运行时1,2路的图像下部和3,4路蓝屏图像一起闪动

        将TW2835的输出范围由1~254调整为16~235

    4.运行一段时间后视频死掉

        软件调整码流匹配

文章版权属于成都莱得科技有限责任公司所有,转载请注明出处。

网址:www.nidetech.com,联系电话:18080873876,技术交流QQ:1460879610

 

文章评论0条评论)

登录后参与讨论
我要评论
0
7
关闭 站长推荐上一条 /2 下一条