Name

VIDIOC_S_HW_FREQ_SEEK — Perform a hardware frequency seek

Synopsis

int fsfuncioctl(int fd,
 int request,
 struct v4l2_hw_freq_seek *argp);
 

Arguments

fd

File descriptor returned by open().

request

VIDIOC_S_HW_FREQ_SEEK

argp

Description

Start a hardware frequency seek from the current frequency. To do this applications initialize the tuner, type, seek_upward, spacing and wrap_around fields, and zero out the reserved array of a struct v4l2_hw_freq_seek and call the VIDIOC_S_HW_FREQ_SEEK ioctl with a pointer to this structure.

This ioctl is supported if the V4L2_CAP_HW_FREQ_SEEK capability is set.

Table A.87. struct v4l2_hw_freq_seek

__u32tunerThe tuner index number. This is the same value as in the struct v4l2_input tuner field and the struct v4l2_tuner index field.
enum v4l2_tuner_typetypeThe tuner type. This is the same value as in the struct v4l2_tuner type field.
__u32seek_upwardIf non-zero, seek upward from the current frequency, else seek downward.
__u32wrap_aroundIf non-zero, wrap around when at the end of the frequency range, else stop seeking.
__u32spacingIf non-zero, defines the hardware seek resolution in Hz. The driver selects the nearest value that is supported by the device. If spacing is zero a reasonable default value is used.
__u32reserved[7]Reserved for future extensions. Drivers and applications must set the array to zero.

Return Value

On success 0 is returned, on error -1 and the errno variable is set appropriately. The generic error codes are described at the Generic Error Codes chapter.

EINVAL

The tuner index is out of bounds or the value in the type field is wrong.

EAGAIN

The ioctl timed-out. Try again.