This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Trying to Capture Bayer Raw with OMAP 3503 using v4l2 drivers

Hi,

I have a system with camera using OMAP 3503

I am running the latest linux running ,2.6.32

I am trying to do capture raw bayer:

static struct omap34xxcam_hw_config decoder_hwc = {
 .dev_index  = 0,
 .dev_minor  = 0,
 .dev_type  = OMAP34XXCAM_SLAVE_SENSOR,
 .u.sensor.sensor_isp = 1,
 .u.sensor.capture_mem = PAGE_ALIGN(NTSC_NUM_ACTIVE_PIXELS*NTSC_NUM_ACTIVE_LINES*2)*3,
};

static struct isp_interface_config davinci_if_config = {
 .ccdc_par_ser  = ISP_PARLL,
 //.dataline_shift  = 0x1, // shift == 1 doesn't work not interrupts
 .hsvs_syncdetect = ISPCTRL_SYNC_DETECT_VSRISE,
 .dataline_shift = 0x0,
   // .hsvs_syncdetect    = ISPCTRL_SYNC_DETECT_VSFALL,
 .strobe   = 0x0,
 .prestrobe  = 0x0,
 .shutter  = 0x0,
 .wait_hs_vs  = 2,
 .u.par.par_bridge = 0x0,
 .u.par.par_clk_pol = 0x0,
};
static struct v4l2_ifparm ifparm = {
   // .if_type = V4L2_IF_TYPE_BT656,
 .if_type = V4L2_IF_TYPE_BT656,
 .u   = {
  .bt656 = {
   .frame_start_on_rising_vs = 1,
   .bt_sync_correct = 0,
   .swap  = 0,
   .latch_clk_inv = 0,
   .nobt_hs_inv = 0, /* active high */
   .nobt_vs_inv = 0, /* active high */
   .mode  = V4L2_IF_TYPE_BT656_MODE_BT_8BIT,
   .clock_min = DAVINCI_XCLK_BT656,
   .clock_max = DAVINCI_XCLK_BT656,
  },
 },
};

I am trying to capture it in a file.  But it hoses on call to wait_event_interruptible() in file videobuf-core.c, function stream_next_buffer()

I tried to configure the the input format to be V4L2_PIX_FMT_SBGGR8 but I did not see support for this.  I tried to change this

to V4L2_PIX_FMT_SBGGR10 but I got compile failuer that it could not find the defintion which is defined in videodef2.h

Could some help?

Thanks,

Asha

 

  • Hi,

    I have similar problem. When I try capture data, driver hangs to wait  wait_event_interruptible() in the stream_next_buffer() function.

    I am using adv7180 decoder in the BT656 mode.

    Asha, have you solved this problem?

    Br,

    Erkki

  • Hi Erkki,

    I was trying to capture "raw sensor" image and yes I was able to capture after quite a bit of struggle. 

    Are you using the OMAP 3503 Eval board?

    Is your .if_type V4L2_IF_TYPE_BT656?

    As I understand, whenever it hangs at wait_event_interruptible() in the stream_next_buffer(), it means that it has not received enough data. 

    If the image size is 1080x1920 and you are capturing bt656, the data size should be 1080x1920x2 bytes.  But for raw capture, the data size is 1080x1920 bytes.

    Thanks,

    Asha

     

  • Hi Asha,

    I also solved our problem.

    There are not hs and vs signal connected to ISP in the our system. So isr function needs modification. I removed hs_vs interrupt handling in the isr function and now is used only VD0 interrupt.

    We cannot get data enought because correct interrupt didn't occurred.

    Br,

    Erkki