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.

Video capture problem in saLoopback

Other Parts Discussed in Thread: TVP7002

Hi,

I am running the saLoopBack application. Problem observed in 'dq capture buffer' while video capturing.

videoCaptureMode = VPS_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_EMBEDDED_SYNC

videoIfMode = VPS_CAPT_VIDEO_IF_MODE_8BIT

inDataFormat = FVID2_DF_YUV422P

periodicCallbackEnable = 0
numCh = 1
numStream = 1
muxModeStartChId = 0

LOG:

# ./saLoopBack
VPSS_GRPX : (0)- venc 4 not running.
sh: line 0: echo: write error: Invalid argument
Driver Name: ti81xxvin
Driver bus info: TI81xxVPSS_DCTRL: venc 4 already stop
 Platform
Driver is capable of doing capture
saLoopBack:
 Mode set is 720P60
Driver Name: Inside ti81xxvin_check_format

Driver bus infhpitch : 870
o:
min_hpitch 0 min_numlines 240
sizeimage ca800
numlines 180
width 2d0, height 240, hpitch 870 numlines 240, pixfmt->pixelformat 56595559
================Opening fb0
=============================================
Capture Format:
=============================================================
fmt.type         = 1
fmt.width         = 720
fmt.height         = 576
fmt.pixelformat     = 1448695129
fmt.bytesperline     = 2160
fmt.sizeimage     = 1244160
=============================================================
=============================================================
Display Format:
=============================================================
fmt.type    check_var(0)
check_fb_var
xres = 1280, yres = 720, vxres = 1280, vyres = 5760,xoffset = 0, yoffset = 0
set_var(0)
set_fb_fix
pan_display(0)
setcamp(0)
     = 2
fmt.widthvram end 40fc1000 start 401b1000, offset 0
         = 1280
fmt.huser mmap regions start 87700000, len 16777216
eight         = 720
fmt.pixelformat     = 1448695129
fmt.bytesperline     = 2560
fmt.sizeimage     = 1843200
=============================================================


Fix Screen Info:
----------------
Line Length - 2560
Physical Address = 87700000
Buffer Length = 16777216

Var Screen Info:
----------------
Xres - 1280
Yres - 720
XrInside ti81xxvin_check_format
es Virtual - 128hpitch : 870
0
Yres Virtual min_hpitch 0 min_numlines 240
- 5760
nonstd  sizeimage 12fc00
     - 0
Bits Pnumlines 240
er Pixel - 16
blue lenth 5 msb 0 offset 0
red lenth 5 msb 0 offset 11
green lenth 6 msb 0 offset 5
trans lenth 0 msb 0 offset 0

Var Screen Info:
----------------
Xres - 1280
Yres - 720
Xres Virtual - 1280
Yres Virtual - 5760
nonstd       - 0
Bits Per Pixel - 16
blue lenth 5 msb 0 offset 0
red lenth 5 msb 0 offset 11
green lenth 6 msb 0 offset 5
trans lenth 0 msb 0 offset 0


Fix Screen Info:
----------------
Line Length - 2560
Physical Address = 87700000
Buffer Length = 16777216
buffer_addr[0] 401b1000
buffer_addr[1] 40373000
buffer_addr[2] 40535000
buffer_addr[3] 406f7000
buffer_addr[4] 408b9000
buffer_addr[5] 40a7b000
buffer_addr[6] 40c3d000
buffer_addr[7] 40dff000
Return Success
Inside queueCaptureBuffers
type 1 memory 2 index 0 m.userptr 401b1000 length 12fc00
type 1 memory 2 index 1 m.userptr 40373000 length 12fc00
type 1 memory 2 index 2 m.userptr 40535000 length 12fc00
type 1 memory 2 index 3 m.userptr 406f7000 length 12fc00
queueCaptureBuffers Success
Insided startCapture
LoopCount 0

(Application waiting in VIDIOC_DQBUF ioctl)

Kernel dmesg :

ti81xxvin ti81xxvin: VIDIOC_S_FMT
ti81xxvin ti81xxvin: ti81xxvin_check_format
Inside ti81xxvin_check_format
hpitch : 870
min_hpitch 0 min_numlines 240
sizeimage ca800
numlines 180
width 2d0, height 240, hpitch 870 numlines 240, pixfmt->pixelformat 56595559
ti81xxvin ti81xxvin: vidioc_reqbufs
ti81xxvin ti81xxvin: ti81xxvin_buffer_setup
vbuf: reqbufs: bufs=8, size=0x0 [0 pages total]
vbuf: __videobuf_free
vbuf: mmap setup: 8 buffers, 0 bytes each
t81xx_vidout t81xx_vidout: VIDOUT1: Get format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: set format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: Get format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: request buffer
t81xx_vidout t81xx_vidout: VIDOUT1: setup 8 buffers
vbuf: reqbufs: bufs=8, size=0x0 [0 pages total]
vbuf: __videobuf_free
vbuf: mmap setup: 8 buffers, 0 bytes each
Opening fb0
check_var(0)
check_fb_var
xres = 1280, yres = 720, vxres = 1280, vyres = 5760,xoffset = 0, yoffset = 0
set_var(0)
set_fb_fix
pan_display(0)
setcamp(0)
vram end 40fc1000 start 401b1000, offset 0
user mmap regions start 87700000, len 16777216
ti81xxvin ti81xxvin: vidioc_qbuf
vbuf: qbuf: requesting next field
ti81xxvin ti81xxvin: ti81xxvin_buffer_prepare
vbuf: qbuf: succeeded
ti81xxvin ti81xxvin: vidioc_qbuf
vbuf: qbuf: requesting next field
ti81xxvin ti81xxvin: ti81xxvin_buffer_prepare
vbuf: qbuf: succeeded
ti81xxvin ti81xxvin: vidioc_qbuf
vbuf: qbuf: requesting next field
ti81xxvin ti81xxvin: ti81xxvin_buffer_prepare
vbuf: qbuf: succeeded
ti81xxvin ti81xxvin: vidioc_qbuf
vbuf: qbuf: requesting next field
ti81xxvin ti81xxvin: ti81xxvin_buffer_prepare
vbuf: qbuf: succeeded
ti81xxvin ti81xxvin: vidioc_streamon
ti81xxvin ti81xxvin: ti81xxvin_check_format
Inside ti81xxvin_check_format
hpitch : 870
min_hpitch 0 min_numlines 240
sizeimage 12fc00
numlines 240
ti81xxvin ti81xxvin: ti81xxvin_buffer_queue
ti81xxvin ti81xxvin: ti81xxvin_buffer_queue
ti81xxvin ti81xxvin: ti81xxvin_buffer_queue
ti81xxvin ti81xxvin: ti81xxvin_buffer_queue
ti81xxvin ti81xxvin: vidioc_dqbuf
PHY: 0:01 - Link is Down
vbuf: dqbuf: next_buffer error: -512
ti81xxvin ti81xxvin: ti81xxvin_release
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vrelease for VIDOUT1
t81xx_vidout t81xx_vidout: VIDOUT1: free additional buffers
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vrelease for vidout1
Closing fb0
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vopen for vidout0
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vopen for VIDOUT0
t81xx_vidout t81xx_vidout: VIDOUT0: query capacities
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vopen for vidout1
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vopen for VIDOUT1
t81xx_vidout t81xx_vidout: VIDOUT1: query capacities
t81xx_vidout t81xx_vidout: VIDOUT1: Get format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: set format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: Get format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: request buffer
t81xx_vidout t81xx_vidout: VIDOUT1: setup 8 buffers
vbuf: reqbufs: bufs=8, size=0x0 [0 pages total]
vbuf: __videobuf_free
vbuf: mmap setup: 8 buffers, 0 bytes each
Opening fb0
check_var(0)
check_fb_var
xres = 1280, yres = 720, vxres = 1280, vyres = 5760,xoffset = 0, yoffset = 0
set_var(0)
set_fb_fix
pan_display(0)
setcamp(0)
vram end 40fbd000 start 401ad000, offset 0
user mmap regions start 87700000, len 16777216
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vrelease for VIDOUT0
t81xx_vidout t81xx_vidout: VIDOUT0: free additional buffers
vbuf: __videobuf_free
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vrelease for vidout0
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vrelease for VIDOUT1
t81xx_vidout t81xx_vidout: VIDOUT1: free additional buffers
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vrelease for vidout1
Closing fb0
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vopen for vidout0
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vopen for VIDOUT0
t81xx_vidout t81xx_vidout: VIDOUT0: query capacities
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vopen for vidout1
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vopen for VIDOUT1
t81xx_vidout t81xx_vidout: VIDOUT1: query capacities
t81xx_vidout t81xx_vidout: VIDOUT1: Get format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: set format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: Get format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: request buffer
t81xx_vidout t81xx_vidout: VIDOUT1: setup 8 buffers
vbuf: reqbufs: bufs=8, size=0x0 [0 pages total]
vbuf: __videobuf_free
vbuf: mmap setup: 8 buffers, 0 bytes each
Opening fb0
check_var(0)
check_fb_var
xres = 1280, yres = 720, vxres = 1280, vyres = 5760,xoffset = 0, yoffset = 0
set_var(0)
set_fb_fix
pan_display(0)
setcamp(0)
vram end 40fe3000 start 401d3000, offset 0
user mmap regions start 87700000, len 16777216
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vrelease for VIDOUT0
t81xx_vidout t81xx_vidout: VIDOUT0: free additional buffers
vbuf: __videobuf_free
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vrelease for vidout0
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vrelease for VIDOUT1
t81xx_vidout t81xx_vidout: VIDOUT1: free additional buffers
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vrelease for vidout1
Closing fb0
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vopen for vidout1
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vopen for VIDOUT1
t81xx_vidout t81xx_vidout: VIDOUT1: query capacities
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vopen for vidout1
t81xx_vidout t81xx_vidout: VIDOUT1: query capacities
t81xx_vidout t81xx_vidout: VIDOUT1: Get format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: set format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: Get format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: request buffer
t81xx_vidout t81xx_vidout: VIDOUT1: setup 8 buffers
vbuf: reqbufs: bufs=8, size=0x0 [0 pages total]
vbuf: __videobuf_free
vbuf: mmap setup: 8 buffers, 0 bytes each
Opening fb0
check_var(0)
check_fb_var
xres = 1280, yres = 720, vxres = 1280, vyres = 5760,xoffset = 0, yoffset = 0
set_var(0)
set_fb_fix
pan_display(0)
setcamp(0)
vram end 40f78000 start 40168000, offset 0
user mmap regions start 87700000, len 16777216
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vrelease for VIDOUT1
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vrelease for VIDOUT1
t81xx_vidout t81xx_vidout: VIDOUT1: free additional buffers
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vrelease for vidout1
Closing fb0
ti81xxvin ti81xxvin: ti81xxvin_open
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vopen for vidout1
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vopen for VIDOUT1
t81xx_vidout t81xx_vidout: VIDOUT1: query capacities
ti81xxvin ti81xxvin: VIDIOC_S_FMT
ti81xxvin ti81xxvin: ti81xxvin_check_format
Inside ti81xxvin_check_format
hpitch : 870
min_hpitch 0 min_numlines 240
sizeimage ca800
numlines 180
width 2d0, height 240, hpitch 870 numlines 240, pixfmt->pixelformat 56595559
ti81xxvin ti81xxvin: vidioc_reqbufs
ti81xxvin ti81xxvin: ti81xxvin_buffer_setup
vbuf: reqbufs: bufs=8, size=0x0 [0 pages total]
vbuf: __videobuf_free
vbuf: mmap setup: 8 buffers, 0 bytes each
t81xx_vidout t81xx_vidout: VIDOUT1: Get format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: set format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: Get format ioctl
t81xx_vidout t81xx_vidout: VIDOUT1: request buffer
t81xx_vidout t81xx_vidout: VIDOUT1: setup 8 buffers
vbuf: reqbufs: bufs=8, size=0x0 [0 pages total]
vbuf: __videobuf_free
vbuf: mmap setup: 8 buffers, 0 bytes each
Opening fb0
check_var(0)
check_fb_var
xres = 1280, yres = 720, vxres = 1280, vyres = 5760,xoffset = 0, yoffset = 0
set_var(0)
set_fb_fix
pan_display(0)
setcamp(0)
vram end 41005000 start 401f5000, offset 0
user mmap regions start 87700000, len 16777216
ti81xxvin ti81xxvin: vidioc_qbuf
vbuf: qbuf: requesting next field
ti81xxvin ti81xxvin: ti81xxvin_buffer_prepare
vbuf: qbuf: succeeded
ti81xxvin ti81xxvin: vidioc_qbuf
vbuf: qbuf: requesting next field
ti81xxvin ti81xxvin: ti81xxvin_buffer_prepare
vbuf: qbuf: succeeded
ti81xxvin ti81xxvin: vidioc_qbuf
vbuf: qbuf: requesting next field
ti81xxvin ti81xxvin: ti81xxvin_buffer_prepare
vbuf: qbuf: succeeded
ti81xxvin ti81xxvin: vidioc_qbuf
vbuf: qbuf: requesting next field
ti81xxvin ti81xxvin: ti81xxvin_buffer_prepare
vbuf: qbuf: succeeded
ti81xxvin ti81xxvin: vidioc_streamon
ti81xxvin ti81xxvin: ti81xxvin_check_format
Inside ti81xxvin_check_format
hpitch : 870
min_hpitch 0 min_numlines 240
sizeimage 12fc00
numlines 240
ti81xxvin ti81xxvin: ti81xxvin_buffer_queue
ti81xxvin ti81xxvin: ti81xxvin_buffer_queue
ti81xxvin ti81xxvin: ti81xxvin_buffer_queue
ti81xxvin ti81xxvin: ti81xxvin_buffer_queue
ti81xxvin ti81xxvin: vidioc_dqbuf
vbuf: dqbuf: next_buffer error: -512
ti81xxvin ti81xxvin: ti81xxvin_release
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: Entering ti81xx_vidout_vrelease for VIDOUT1
t81xx_vidout t81xx_vidout: VIDOUT1: free additional buffers
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
t81xx_vidout t81xx_vidout: VIDOUT1: buffer release
vbuf: __videobuf_free
t81xx_vidout t81xx_vidout: Exiting ti81xx_vidout_vrelease for vidout1
Closing fb0

Regards,

Rajeshkumar