This is why "v4l2-ctl -s 5" used before my simple test program (modified
capture example with mmap method) finally has no effect for VOU.
When the test program opens video device it causes reset PAL mode in VOU
and
does not in TV encoder.
Right, this is actually a bug in the VOU driver. It didn't affect me,
because I was opening the device only once before all the configuration
and streaming. Could you create and submit a patch to save the standard in
driver private data and restore it on open() after the reset? I guess,
other configuration parameters are lost too, feel free to fix them as
well.
Here you are. Something like that? I avoided encoder reconfiguration (it is
not needed) - do not call sh_vou_s_std() and in result
v4l2_device_call_until_err().
--- sh_vou.c.orig 2012-06-06 15:58:28.785086939 +0000
+++ sh_vou.c 2012-06-06 17:04:30.684586479 +0000
@@ -1183,6 +1183,13 @@ static int sh_vou_open(struct file *file
vou_dev->status = SH_VOU_IDLE;
return ret;
}
+
+ /* restore std */
+ if (vou_dev->std & V4L2_STD_525_60)
+ sh_vou_reg_ab_set(vou_dev, VOUCR,
+
sh_vou_ntsc_mode(vou_dev->pdata->bus_fmt) << 29, 7 << 29);
+ else
+ sh_vou_reg_ab_set(vou_dev, VOUCR, 5 << 29, 7 << 29);
}
videobuf_queue_dma_contig_init(&vou_file->vbq, &sh_vou_video_qops,
I tested the std restoring and picture is synced/stable in PAL mode now.
However I have still problem after 480 line because next lines are always
green.
Fixing other configuration parameters seems little more complicated
(sh_vou_s_fmt_vid_out(), sh_vou_configure_geometry()).
> > I noticed that VOU is limited to NTSC resolution: "Maximum
> > destination
> > image
> > size: 720 x 240 per field".
>
> You mean in the datasheet?
Yes, exactly.
> I don't have it currently at hand, but I seem
> to remember, that there was a bug and the VOU does actually support a
> full
> PAL resolution too. I'm not 100% certain, though.
OK, I will test it. Do you remember how you discovered that?
Asked the manufacturer company :)
OK:) I found the sentence in sh_vou.c: "Cropping scheme: max useful image is
720x480, and the total video area is 858x525 (NTSC) or 864x625 (PAL)." Next
is some magic:)
No, I'll send it to you off the list - Laurent agreed. But he also said,
it was a preliminary version of his yavta proram, so, you might be able to
use that one.
OK, the code you sent works much better than my simple video output program
but the same problem after 480 line. I have to investigate it.
I use yavta for frame capturing tests.
Unfortunately I will be outside the company next 2 weeks. I will have remote
access only to my hardware so more tests are not possible then.
best regards
Janusz
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html