[linux-dvb] Help. VIDIOC_S_FMT

Markus Rechberger mrechberger at gmail.com
Thu Nov 8 12:03:46 CET 2007


Hello Kevin,

On 11/8/07, kevin liu <lwtbenben at gmail.com> wrote:
> Dear everyone:
>     I wonder why v4l2 driver cancel all the urbs in VIDIOC_S_FMT and
> then reinit all the urbs to submit.
>     VIDIOC_S_FMT only negotiate frame format with application like
> mplayer and has nothing to do with our v4l2 driver.

there are several ways how you can deal with that, one way would be
that you set up the framebuffers again for a different framesize using
VIDIOC_S_FMT.

While doing that setup the mode needs to be switched on the device
depending on the device. When doing so you might bring it into an
unstable state if you just change it while the isoc or bulk transfers
are still running in the background.

http://www.thedirks.org/v4l2/v4l2dev.htm
"The size of the buffers often depends on the format of the data. For
example, the size of capture buffers is determined by the capture
image format set by the VIDIOC_S_FMT ioctl."

Hope this clears up your questions, if not let me know.


>     And in my driver I follow the way most drivers have taken, but
> when I use usb_submit_urb() in VIDIOC_S_FMT to submit all the urbs
> successfully reinited, my Ubuntu crashes. Caps and Scroll flash during
> my Ubuntu crashes. I can't get any value message from my syslog.
>
>    Could somebody help me with this issue?
>    Thank you in advance!

you very likely have a bad pointer in your driver, if you can publish
the code somewhere someone could have a look.

regards,
Markus



More information about the linux-dvb mailing list