解決済! 解決策の投稿を見る。
Some reference code to support adv7180 in Android R10.3.2, there are still many issues, but basic function is OK.
For Android camera application, PAL/NTSC on the fly switch is not working, de-interlance is also not working. The unit test application "mxc_v4l2_tvin" can work in Android too, and all fuction is OK.
Hope it can give you some help.
i encount the problem too,but i can't how to resolve it
You can try to disable the fb2 and re-enable it during swap.
echo 1> / sys/class/graphics/fb2/blank
Recently I am working on dual-display module in the IMX. 53 platform. Finished configuring Uboot, I entered to the serial console:
echo D: 720x576i-50> / sys/class/graphics/fb1/mode
echo 1> / sys/class/graphics/fb1/blank
echo 24> / sys/class/graphics/fb1/bits_per_pixel
echo 0> / sys/class/graphics/fb1/blank
setprop rw.VIDEO_TVOUT_DISPLAY 1
echo 2-layer-fb-bg> / sys/class/graphics/fb1/fsl_disp_property
At this point, the image can be displayed on the TV. But now I want to swap the image on LCD,then entered on the serial console:
echo 1-layer-fb> / sys/class/graphics/fb1/fsl_disp_property
echo 1> / sys/class/graphics/fb1/blank
setprop rw.VIDEO_TVOUT_DISPLAY 0
TV is turned off, howerver,the LCD image out the prompt message is:
Can not switch while fb2 (fb-fg) is on.
Find out the reasons is because
swap only happen between DP-BG and DC, while DP-FG disable
Question: How do I swap the channel and display on the LCD?
Grateful to Lee's guidance, I have to solve the problem, not screen scrolling when switching ADV7180 channel.
Some reference code to support adv7180 in Android R10.3.2, there are still many issues, but basic function is OK.
For Android camera application, PAL/NTSC on the fly switch is not working, de-interlance is also not working. The unit test application "mxc_v4l2_tvin" can work in Android too, and all fuction is OK.
Hope it can give you some help.
Thank you, This patch fix my problem .
I just moved to BSP 10.4, the old version mxc_v4l2_tvin.c is not working.
after applying your patch, it works again.
For Android level, I have no idea too.
I am working on the I.MX53 and Android platform, Video streaming is taking the Android framework, I switch the ADV7180 channels through a process in the external reference mxc_v4l2_tvin.c and delete the unwanted.For example type = V4L2_BUF_TYPE_VIDEO_OUTPUT,;ioctl (fd_output_v4l, VIDIOC_STREAMOFF, & type);But I did not succeed.
please give me some advices,thank you.
Qiang Li said:
You can reference to attached tvin test application, in function mxc_v4l_tvin_test(), it will check if input mode was changed between PAL and NTSC once per second, if changed, it will stop and restart the preview.
With the same code, you can also added code to check the adv7180 status register, if there is 'frame, scanline lost". Use the same code to stop and restart the preview.
chenjianqing said:type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
ioctl(fd_output_v4l, VIDIOC_STREAMOFF, &type);type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
ioctl(fd_capture_v4l, VIDIOC_STREAMOFF, &type);for (j = 0; j < g_output_num_buffers; j++) {
munmap(output_buffers[j].start, output_buffers[j].length);
}
for (j = 0; j < g_capture_num_buffers; j++) {
munmap(capture_buffers[j].start, capture_buffers[j].length);
}
from above ,I added the command VIDIOC_STREAMOFF in myself program,and then send the VIDIOC_REQBUFS and VIDIOC_STREAMON,but there no image.I want know how it do reset the idmac and how it work. Thank you very much!
Qiang Li said:You can reference to this discussion.
http://imxcommunity.org/forum/topics/screen-rolling-on-a-short-vide...
I reference to the application,and delete some about output program.Finnally,I am fail.This my program,please give my some advices.
Qiang Li said:
You can reference to attached tvin test application, in function mxc_v4l_tvin_test(), it will check if input mode was changed between PAL and NTSC once per second, if changed, it will stop and restart the preview.
With the same code, you can also added code to check the adv7180 status register, if there is 'frame, scanline lost". Use the same code to stop and restart the preview.
chenjianqing said:type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
ioctl(fd_output_v4l, VIDIOC_STREAMOFF, &type);type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
ioctl(fd_capture_v4l, VIDIOC_STREAMOFF, &type);for (j = 0; j < g_output_num_buffers; j++) {
munmap(output_buffers[j].start, output_buffers[j].length);
}
for (j = 0; j < g_capture_num_buffers; j++) {
munmap(capture_buffers[j].start, capture_buffers[j].length);
}
from above ,I added the command VIDIOC_STREAMOFF in myself program,and then send the VIDIOC_REQBUFS and VIDIOC_STREAMON,but there no image.I want know how it do reset the idmac and how it work. Thank you very much!
Qiang Li said:You can reference to this discussion.
http://imxcommunity.org/forum/topics/screen-rolling-on-a-short-vide...
You can reference to attached tvin test application, in function mxc_v4l_tvin_test(), it will check if input mode was changed between PAL and NTSC once per second, if changed, it will stop and restart the preview.
With the same code, you can also added code to check the adv7180 status register, if there is 'frame, scanline lost". Use the same code to stop and restart the preview.
chenjianqing said:
type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
ioctl(fd_output_v4l, VIDIOC_STREAMOFF, &type);type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
ioctl(fd_capture_v4l, VIDIOC_STREAMOFF, &type);for (j = 0; j < g_output_num_buffers; j++) {
munmap(output_buffers[j].start, output_buffers[j].length);
}
for (j = 0; j < g_capture_num_buffers; j++) {
munmap(capture_buffers[j].start, capture_buffers[j].length);
}
from above ,I added the command VIDIOC_STREAMOFF in myself program,and then send the VIDIOC_REQBUFS and VIDIOC_STREAMON,but there no image.I want know how it do reset the idmac and how it work. Thank you very much!
Qiang Li said:You can reference to this discussion.
http://imxcommunity.org/forum/topics/screen-rolling-on-a-short-vide...
type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
ioctl(fd_output_v4l, VIDIOC_STREAMOFF, &type);
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
ioctl(fd_capture_v4l, VIDIOC_STREAMOFF, &type);
for (j = 0; j < g_output_num_buffers; j++) {
munmap(output_buffers[j].start, output_buffers[j].length);
}
for (j = 0; j < g_capture_num_buffers; j++) {
munmap(capture_buffers[j].start, capture_buffers[j].length);
}
from above ,I added the command VIDIOC_STREAMOFF in myself program,and then send the VIDIOC_REQBUFS and VIDIOC_STREAMON,but there no image.I want know how it do reset the idmac and how it work. Thank you very much!
Qiang Li said:
You can reference to this discussion.
http://imxcommunity.org/forum/topics/screen-rolling-on-a-short-vide...
You can reference to this discussion.
This should be normal information, the interrupt means there is New Frame before end-of-frame error interrupt on IPU channel 0 (CSI), when you switchs the input source on adv7180, it can't make sure the switch happpens after a full frame was transfered and before a new frame.
But I think this will not impact the function, CSI can re-sync it.