--- /Angelica/V4L2/ti81xxvin_main.c 2011-11-29 04:33:46.000000000 -0500 +++ /Angelica/V4L2/ti81xxvin_main_patched.c 2012-04-02 10:06:48.099602753 -0400 @@ -934,9 +934,10 @@ ti81xxvin_dbg(1, debug, "videobuf streamoff failed\n"); ti81xxvin_vps_delete(inst); +#if 0 ret = v4l2_subdev_call(ti81xxvin_obj.sd[inst->curr_sd_index], video, s_stream, 0); - +#endif if (ret && (ret != -ENOIOCTLCMD)) ti81xxvin_dbg(1, debug, "stream off failed in subdev\n"); return ret; @@ -1278,6 +1279,7 @@ return -ERESTARTSYS; /* Call querystd function of decoder device */ +#if 0 ret = v4l2_subdev_call(ti81xxvin_obj.sd[inst->curr_sd_index], video, query_dv_preset, qpreset); if (ret < 0) { @@ -1285,6 +1287,7 @@ " for sub devices\n"); goto vidioc_query_dv_preset_exit; } + inst->video.cur_dv_preset.preset = V4L2_DV_INVALID; inst->video.cur_std_id = V4L2_STD_UNKNOWN; inst->video.cur_dv_preset = *qpreset; @@ -1292,6 +1295,18 @@ ret = v4l2_subdev_call(ti81xxvin_obj.sd[inst->curr_sd_index], video, g_mbus_fmt, &mbus_framefmt); /* Get the information about the standard */ +#endif + mbus_framefmt.width = 800; + mbus_framefmt.height = 600; + mbus_framefmt.code = V4L2_MBUS_FMT_YUYV8_2X8; + mbus_framefmt.field = V4L2_FIELD_NONE; + mbus_framefmt.field = V4L2_COLORSPACE_REC709; + + qpreset->preset = V4L2_DV_INVALID; + inst->video.cur_dv_preset.preset = V4L2_DV_INVALID; + inst->video.cur_std_id = V4L2_STD_UNKNOWN; + inst->video.cur_dv_preset = *qpreset; + if (ti81xxvin_update_std_info(inst, &mbus_framefmt)) { ret = -EINVAL; ti81xxvin_err("Error getting the standard info\n"); @@ -1330,6 +1345,7 @@ return -ERESTARTSYS; /* Call querystd function of decoder device */ +#if 0 ret = v4l2_subdev_call(ti81xxvin_obj.sd[inst->curr_sd_index], video, querystd, norm); if (ret < 0) { @@ -1349,6 +1365,7 @@ ti81xxvin_err("Error getting the standard info\n"); goto querystd_exit; } +#endif /* Configure the default format information according to the std * selected */ @@ -1391,6 +1408,7 @@ /* Call encoder subdevice function to set the standard */ if (mutex_lock_interruptible(&buf_obj->buf_lock)) return -ERESTARTSYS; +#if 0 /* Call the V4l2 subdev to set the preset */ ret = v4l2_subdev_call(ti81xxvin_obj.sd[inst->curr_sd_index], video, s_dv_preset, dv_preset); @@ -1402,6 +1420,18 @@ ret = v4l2_subdev_call(ti81xxvin_obj.sd[inst->curr_sd_index], video, g_mbus_fmt, &mbus_framefmt); +#endif + mbus_framefmt.width = 800; + mbus_framefmt.height = 600; + mbus_framefmt.code = V4L2_MBUS_FMT_YUYV8_2X8; + mbus_framefmt.field = V4L2_FIELD_NONE; + mbus_framefmt.field = V4L2_COLORSPACE_REC709; + + dv_preset->preset = V4L2_DV_INVALID; + inst->video.cur_dv_preset.preset = V4L2_DV_INVALID; + inst->video.cur_std_id = V4L2_STD_UNKNOWN; + inst->video.cur_dv_preset = *dv_preset; + /* Get the information about the standard */ if (ti81xxvin_update_std_info(inst, &mbus_framefmt)) { ret = -EINVAL; @@ -1453,6 +1483,7 @@ /* Call encoder subdevice function to set the standard */ if (mutex_lock_interruptible(&buf_obj->buf_lock)) return -ERESTARTSYS; +#if 0 /* Call the V4l2 subdev to set the preset */ ret = v4l2_subdev_call(ti81xxvin_obj.sd[inst->curr_sd_index], core, s_std, *norm); @@ -1470,7 +1501,7 @@ ti81xxvin_err("Error getting the standard info\n"); goto s_std_exit; } - +#endif /* Configure the default format information according to the std * selected */ @@ -1537,11 +1568,13 @@ ti81xxvin_dbg(2, debug, "vidioc_enum_dv_presets\n"); if (mutex_lock_interruptible(&buf_obj->buf_lock)) return -ERESTARTSYS; + /* Call the V4l2 subdev to set the preset */ ret = v4l2_subdev_call(ti81xxvin_obj.sd[inst->curr_sd_index], video, enum_dv_presets, preset); if (ret) goto enum_dv_presets_exit; + mutex_unlock(&buf_obj->buf_lock); return 0; @@ -1727,6 +1760,7 @@ ret = ti81xxvin_check_format(inst, &buf_obj->fmt.fmt.pix, 0); if (ret) return ret; +#if 0 /* After checking the buffer format. Call the FVID2 Create and * Set format for starting the driver */ @@ -1738,6 +1772,7 @@ ti81xxvin_dbg(1, debug, "stream on failed in subdev\n"); return ret; } +#endif ret = ti81xxvin_vps_create(inst); if (ret) { ti81xxvin_err("Vps create failed\n"); @@ -1790,9 +1825,10 @@ vps_capture_unregister_isr(ti81xxvin_instance_isr, (void *)inst->instance_id, inst->instance_id); ti81xxvin_vps_create_failed: +#if 0 ret = v4l2_subdev_call(ti81xxvin_obj.sd[inst->curr_sd_index], video, s_stream, 0); - +#endif return ret; } @@ -2415,12 +2451,18 @@ goto probe_out; } + err = v4l2_device_register(ti81xxvin_dev, &ti81xxvin_obj.v4l2_dev); if (err) { v4l2_err(ti81xxvin_dev->driver, "Error registering" " v4l2 device\n"); goto probe_subdev_out; } + + + + + for (i = 0; i < 1; i++) { subdevdata = &config->subdev_info[i]; ti81xxvin_obj.sd[i] = @@ -2454,6 +2496,8 @@ if (ti81xxvin_obj.sd[i]) ti81xxvin_obj.sd[i]->grp_id = 1 << i; } + + v4l2_info(&ti81xxvin_obj.v4l2_dev, "TI81xx HDVPSS Capture driver" " initialized\n");