lkml.org 
[lkml]   [2010]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Async/N_Block V4L2 ioctls for stop hw_seek, fetch preset list
Date
On Friday, December 03, 2010 06:46:40 Manjunatha halli wrote:
> Hi Mauro, Hans,
>
> V4L2 ioctl's up until seem to be set of synchronous calls where the application tends to expect the result of the ioctl when the ioctl ends.
> However this limits us from implementing a key feature such as STOP_SEEK.
>
> So when seeking, i.e hw_seek the application as such blocks till it gets a result. So Can this be an async call as in the application? i.e
> Suppose I send another hw_seek after this, with STOP option by making use of one of the bytes in the reserved set of the structure v4l2_hw_freq_seek?
> (like the WL1273 has used for channel_spacing)
>
> Also today most radios tend to come with the get preset list option, i.e complete_scan feature, where in the application sends one ioctl and the radio
> gets the list of all available channels and sends it back to application, so that the application can then make use of S_FREQ to tune to any of the
> available frequencies.
>
> With these sort of features, can we make certain ioctls ASYNC? Non-Blocking, Can V4L2 provide a standard way of notifying back to user-space?
> Or How can we make use of the Poll, FAsync/SIGnal mechanism? In this scenario?

What you need to use is the event API. See Documentation/video4linux/v4l2-framework.txt,
section 'V4L2 events' and the event ioctls in the V4L2 spec.

In the case of a hw_seek you would set the file handle to non-blocking, call hwseek
and wait for an event to arrive. hw-seek detects whether the filehandle is blocking
or non-blocking and either operates in blocking mode (i.e. wait until finished) or
non-blocking mode where it just returns and asynchronously keeps on seeking and
sends events when something is found.

So all the building blocks are available to do this cleanly.

Regards,

Hans

--
Hans Verkuil - video4linux developer - sponsored by Cisco


\
 
 \ /
  Last update: 2010-12-03 09:45    [W:1.157 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site