/* This file is auto-generated by sync-with-kernel.sh */
#include <linux/compiler.h>
#include "linux/dvb/dmx.h"
#include "linux/dvb/frontend.h"
#include "linux/v4l2-subdev.h"
#include "linux/videodev2.h"
#include "ioctl_32.h"
#include "ioctl_64.h"

union v4l_parms {
	int		i;
	unsigned long	ulong;
	u_int32_t	u32;
	v4l2_std_id	id;
	enum v4l2_priority prio;

	/* ioctl structs */
	struct dmx_buffer			p_dmx_buffer;
	struct dmx_exportbuffer			p_dmx_exportbuffer;
	struct dmx_pes_filter_params		p_dmx_pes_filter_params;
	struct dmx_requestbuffers		p_dmx_requestbuffers;
	struct dmx_sct_filter_params		p_dmx_sct_filter_params;
	struct dmx_stc				p_dmx_stc;
	struct dtv_properties			p_dtv_properties;
	struct dvb_diseqc_master_cmd		p_dvb_diseqc_master_cmd;
	struct dvb_diseqc_slave_reply		p_dvb_diseqc_slave_reply;
	struct dvb_frontend_event		p_dvb_frontend_event;
	struct dvb_frontend_info		p_dvb_frontend_info;
	struct dvb_frontend_parameters		p_dvb_frontend_parameters;
	struct v4l2_audio			p_v4l2_audio;
	struct v4l2_audioout			p_v4l2_audioout;
	struct v4l2_buffer			p_v4l2_buffer;
	struct v4l2_capability			p_v4l2_capability;
	struct v4l2_control			p_v4l2_control;
	struct v4l2_create_buffers		p_v4l2_create_buffers;
	struct v4l2_crop			p_v4l2_crop;
	struct v4l2_cropcap			p_v4l2_cropcap;
	struct v4l2_dbg_chip_info		p_v4l2_dbg_chip_info;
	struct v4l2_dbg_register		p_v4l2_dbg_register;
	struct v4l2_decoder_cmd			p_v4l2_decoder_cmd;
	struct v4l2_dv_timings			p_v4l2_dv_timings;
	struct v4l2_dv_timings_cap		p_v4l2_dv_timings_cap;
	struct v4l2_edid			p_v4l2_edid;
	struct v4l2_enc_idx			p_v4l2_enc_idx;
	struct v4l2_encoder_cmd			p_v4l2_encoder_cmd;
	struct v4l2_enum_dv_timings		p_v4l2_enum_dv_timings;
	struct v4l2_event			p_v4l2_event;
	struct v4l2_event_subscription		p_v4l2_event_subscription;
	struct v4l2_exportbuffer		p_v4l2_exportbuffer;
	struct v4l2_ext_controls		p_v4l2_ext_controls;
	struct v4l2_fmtdesc			p_v4l2_fmtdesc;
	struct v4l2_format			p_v4l2_format;
	struct v4l2_framebuffer			p_v4l2_framebuffer;
	struct v4l2_frequency			p_v4l2_frequency;
	struct v4l2_frequency_band		p_v4l2_frequency_band;
	struct v4l2_frmivalenum			p_v4l2_frmivalenum;
	struct v4l2_frmsizeenum			p_v4l2_frmsizeenum;
	struct v4l2_hw_freq_seek		p_v4l2_hw_freq_seek;
	struct v4l2_input			p_v4l2_input;
	struct v4l2_jpegcompression		p_v4l2_jpegcompression;
	struct v4l2_modulator			p_v4l2_modulator;
	struct v4l2_output			p_v4l2_output;
	struct v4l2_query_ext_ctrl		p_v4l2_query_ext_ctrl;
	struct v4l2_queryctrl			p_v4l2_queryctrl;
	struct v4l2_querymenu			p_v4l2_querymenu;
	struct v4l2_requestbuffers		p_v4l2_requestbuffers;
	struct v4l2_selection			p_v4l2_selection;
	struct v4l2_sliced_vbi_cap		p_v4l2_sliced_vbi_cap;
	struct v4l2_standard			p_v4l2_standard;
	struct v4l2_streamparm			p_v4l2_streamparm;
	struct v4l2_subdev_capability		p_v4l2_subdev_capability;
	struct v4l2_subdev_crop			p_v4l2_subdev_crop;
	struct v4l2_subdev_format		p_v4l2_subdev_format;
	struct v4l2_subdev_frame_interval	p_v4l2_subdev_frame_interval;
	struct v4l2_subdev_frame_interval_enum	p_v4l2_subdev_frame_interval_enum;
	struct v4l2_subdev_frame_size_enum	p_v4l2_subdev_frame_size_enum;
	struct v4l2_subdev_mbus_code_enum	p_v4l2_subdev_mbus_code_enum;
	struct v4l2_subdev_selection		p_v4l2_subdev_selection;
	struct v4l2_tuner			p_v4l2_tuner;
};
#define ioc(type, cmd) { CMD32_##cmd, CMD64_##cmd, cmd, #type, #cmd }

/* All defined ioctls */
static const struct {
	u_int32_t cmd32;	/* The 32-bit ioctl value, should never change */
	u_int32_t cmd64;	/* The 64-bit ioctl value, should never change */
	u_int32_t cmd;
	const char *type;
	const char *name;
} ioctls[] = {
	/* ioctl structs */
	ioc(demux, DMX_ADD_PID),							/*  __u16 */
	ioc(demux, DMX_DQBUF),								/*  struct dmx_buffer */
	ioc(demux, DMX_EXPBUF),								/*  struct dmx_exportbuffer */
	ioc(demux, DMX_GET_PES_PIDS),							/*  __u16[5] */
	ioc(demux, DMX_GET_STC),							/*  struct dmx_stc */
	ioc(demux, DMX_QBUF),								/*  struct dmx_buffer */
	ioc(demux, DMX_QUERYBUF),							/*  struct dmx_buffer */
	ioc(demux, DMX_REMOVE_PID),							/*  __u16 */
	ioc(demux, DMX_REQBUFS),							/*  struct dmx_requestbuffers */
	ioc(demux, DMX_SET_BUFFER_SIZE),						/*  void */
	ioc(demux, DMX_SET_FILTER),							/*  struct dmx_sct_filter_params */
	ioc(demux, DMX_SET_PES_FILTER),							/*  struct dmx_pes_filter_params */
	ioc(demux, DMX_START),								/*  void */
	ioc(demux, DMX_STOP),								/*  void */
	ioc(frontend, FE_DISEQC_RECV_SLAVE_REPLY),					/*  struct dvb_diseqc_slave_reply */
	ioc(frontend, FE_DISEQC_RESET_OVERLOAD),					/*  void */
	ioc(frontend, FE_DISEQC_SEND_BURST),						/*  void */
	ioc(frontend, FE_DISEQC_SEND_MASTER_CMD),					/*  struct dvb_diseqc_master_cmd */
	ioc(frontend, FE_DISHNETWORK_SEND_LEGACY_CMD),					/*  void */
	ioc(frontend, FE_ENABLE_HIGH_LNB_VOLTAGE),					/*  void */
	ioc(frontend, FE_GET_EVENT),							/*  struct dvb_frontend_event */
	ioc(frontend, FE_GET_FRONTEND),							/*  struct dvb_frontend_parameters */
	ioc(frontend, FE_GET_INFO),							/*  struct dvb_frontend_info */
	ioc(frontend, FE_GET_PROPERTY),							/*  struct dtv_properties */
	ioc(frontend, FE_READ_BER),							/*  __u32 */
	ioc(frontend, FE_READ_SIGNAL_STRENGTH),						/*  __u16 */
	ioc(frontend, FE_READ_SNR),							/*  __u16 */
	ioc(frontend, FE_READ_STATUS),							/*  fe_status_t */
	ioc(frontend, FE_READ_UNCORRECTED_BLOCKS),					/*  __u32 */
	ioc(frontend, FE_SET_FRONTEND),							/*  struct dvb_frontend_parameters */
	ioc(frontend, FE_SET_FRONTEND_TUNE_MODE),					/*  void */
	ioc(frontend, FE_SET_PROPERTY),							/*  struct dtv_properties */
	ioc(frontend, FE_SET_TONE),							/*  void */
	ioc(frontend, FE_SET_VOLTAGE),							/*  void */
	ioc(video, VIDIOC_CREATE_BUFS),							/*  struct v4l2_create_buffers */
	ioc(video, VIDIOC_CROPCAP),							/*  struct v4l2_cropcap */
	ioc(video, VIDIOC_DBG_G_CHIP_INFO),						/*  struct v4l2_dbg_chip_info */
	ioc(video, VIDIOC_DBG_G_REGISTER),						/*  struct v4l2_dbg_register */
	ioc(video, VIDIOC_DBG_S_REGISTER),						/*  struct v4l2_dbg_register */
	ioc(video, VIDIOC_DECODER_CMD),							/*  struct v4l2_decoder_cmd */
	ioc(video, VIDIOC_DQBUF),							/*  struct v4l2_buffer */
	ioc(video, VIDIOC_DQEVENT),							/*  struct v4l2_event */
	ioc(video, VIDIOC_DV_TIMINGS_CAP),						/*  struct v4l2_dv_timings_cap */
	ioc(video, VIDIOC_ENCODER_CMD),							/*  struct v4l2_encoder_cmd */
	ioc(video, VIDIOC_ENUMAUDIO),							/*  struct v4l2_audio */
	ioc(video, VIDIOC_ENUMAUDOUT),							/*  struct v4l2_audioout */
	ioc(video, VIDIOC_ENUMINPUT),							/*  struct v4l2_input */
	ioc(video, VIDIOC_ENUMOUTPUT),							/*  struct v4l2_output */
	ioc(video, VIDIOC_ENUMSTD),							/*  struct v4l2_standard */
	ioc(video, VIDIOC_ENUM_DV_TIMINGS),						/*  struct v4l2_enum_dv_timings */
	ioc(video, VIDIOC_ENUM_FMT),							/*  struct v4l2_fmtdesc */
	ioc(video, VIDIOC_ENUM_FRAMEINTERVALS),						/*  struct v4l2_frmivalenum */
	ioc(video, VIDIOC_ENUM_FRAMESIZES),						/*  struct v4l2_frmsizeenum */
	ioc(video, VIDIOC_ENUM_FREQ_BANDS),						/*  struct v4l2_frequency_band */
	ioc(video, VIDIOC_EXPBUF),							/*  struct v4l2_exportbuffer */
	ioc(video, VIDIOC_G_AUDIO),							/*  struct v4l2_audio */
	ioc(video, VIDIOC_G_AUDOUT),							/*  struct v4l2_audioout */
	ioc(video, VIDIOC_G_CROP),							/*  struct v4l2_crop */
	ioc(video, VIDIOC_G_CTRL),							/*  struct v4l2_control */
	ioc(video, VIDIOC_G_DV_TIMINGS),						/*  struct v4l2_dv_timings */
	ioc(video, VIDIOC_G_EDID),							/*  struct v4l2_edid */
	ioc(video, VIDIOC_G_ENC_INDEX),							/*  struct v4l2_enc_idx */
	ioc(video, VIDIOC_G_EXT_CTRLS),							/*  struct v4l2_ext_controls */
	ioc(video, VIDIOC_G_FBUF),							/*  struct v4l2_framebuffer */
	ioc(video, VIDIOC_G_FMT),							/*  struct v4l2_format */
	ioc(video, VIDIOC_G_FREQUENCY),							/*  struct v4l2_frequency */
	ioc(video, VIDIOC_G_INPUT),							/*  int */
	ioc(video, VIDIOC_G_JPEGCOMP),							/*  struct v4l2_jpegcompression */
	ioc(video, VIDIOC_G_MODULATOR),							/*  struct v4l2_modulator */
	ioc(video, VIDIOC_G_OUTPUT),							/*  int */
	ioc(video, VIDIOC_G_PARM),							/*  struct v4l2_streamparm */
	ioc(video, VIDIOC_G_PRIORITY),							/*  __u32 */
	ioc(video, VIDIOC_G_SELECTION),							/*  struct v4l2_selection */
	ioc(video, VIDIOC_G_SLICED_VBI_CAP),						/*  struct v4l2_sliced_vbi_cap */
	ioc(video, VIDIOC_G_STD),							/*  v4l2_std_id */
	ioc(video, VIDIOC_G_TUNER),							/*  struct v4l2_tuner */
	ioc(video, VIDIOC_LOG_STATUS),							/*  void */
	ioc(video, VIDIOC_OVERLAY),							/*  int */
	ioc(video, VIDIOC_PREPARE_BUF),							/*  struct v4l2_buffer */
	ioc(video, VIDIOC_QBUF),							/*  struct v4l2_buffer */
	ioc(video, VIDIOC_QUERYBUF),							/*  struct v4l2_buffer */
	ioc(video, VIDIOC_QUERYCAP),							/*  struct v4l2_capability */
	ioc(video, VIDIOC_QUERYCTRL),							/*  struct v4l2_queryctrl */
	ioc(video, VIDIOC_QUERYMENU),							/*  struct v4l2_querymenu */
	ioc(video, VIDIOC_QUERYSTD),							/*  v4l2_std_id */
	ioc(video, VIDIOC_QUERY_DV_TIMINGS),						/*  struct v4l2_dv_timings */
	ioc(video, VIDIOC_QUERY_EXT_CTRL),						/*  struct v4l2_query_ext_ctrl */
	ioc(video, VIDIOC_REQBUFS),							/*  struct v4l2_requestbuffers */
	ioc(video, VIDIOC_STREAMOFF),							/*  int */
	ioc(video, VIDIOC_STREAMON),							/*  int */
	ioc(subdev, VIDIOC_SUBDEV_DV_TIMINGS_CAP),					/*  struct v4l2_dv_timings_cap */
	ioc(subdev, VIDIOC_SUBDEV_ENUMSTD),						/*  struct v4l2_standard */
	ioc(subdev, VIDIOC_SUBDEV_ENUM_DV_TIMINGS),					/*  struct v4l2_enum_dv_timings */
	ioc(subdev, VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL),					/*  struct v4l2_subdev_frame_interval_enum */
	ioc(subdev, VIDIOC_SUBDEV_ENUM_FRAME_SIZE),					/*  struct v4l2_subdev_frame_size_enum */
	ioc(subdev, VIDIOC_SUBDEV_ENUM_MBUS_CODE),					/*  struct v4l2_subdev_mbus_code_enum */
	ioc(subdev, VIDIOC_SUBDEV_G_CROP),						/*  struct v4l2_subdev_crop */
	ioc(subdev, VIDIOC_SUBDEV_G_DV_TIMINGS),					/*  struct v4l2_dv_timings */
	ioc(subdev, VIDIOC_SUBDEV_G_EDID),						/*  struct v4l2_edid */
	ioc(subdev, VIDIOC_SUBDEV_G_FMT),						/*  struct v4l2_subdev_format */
	ioc(subdev, VIDIOC_SUBDEV_G_FRAME_INTERVAL),					/*  struct v4l2_subdev_frame_interval */
	ioc(subdev, VIDIOC_SUBDEV_G_SELECTION),						/*  struct v4l2_subdev_selection */
	ioc(subdev, VIDIOC_SUBDEV_G_STD),						/*  v4l2_std_id */
	ioc(subdev, VIDIOC_SUBDEV_QUERYCAP),						/*  struct v4l2_subdev_capability */
	ioc(subdev, VIDIOC_SUBDEV_QUERYSTD),						/*  v4l2_std_id */
	ioc(subdev, VIDIOC_SUBDEV_QUERY_DV_TIMINGS),					/*  struct v4l2_dv_timings */
	ioc(subdev, VIDIOC_SUBDEV_S_CROP),						/*  struct v4l2_subdev_crop */
	ioc(subdev, VIDIOC_SUBDEV_S_DV_TIMINGS),					/*  struct v4l2_dv_timings */
	ioc(subdev, VIDIOC_SUBDEV_S_EDID),						/*  struct v4l2_edid */
	ioc(subdev, VIDIOC_SUBDEV_S_FMT),						/*  struct v4l2_subdev_format */
	ioc(subdev, VIDIOC_SUBDEV_S_FRAME_INTERVAL),					/*  struct v4l2_subdev_frame_interval */
	ioc(subdev, VIDIOC_SUBDEV_S_SELECTION),						/*  struct v4l2_subdev_selection */
	ioc(subdev, VIDIOC_SUBDEV_S_STD),						/*  v4l2_std_id */
	ioc(video, VIDIOC_SUBSCRIBE_EVENT),						/*  struct v4l2_event_subscription */
	ioc(video, VIDIOC_S_AUDIO),							/*  struct v4l2_audio */
	ioc(video, VIDIOC_S_AUDOUT),							/*  struct v4l2_audioout */
	ioc(video, VIDIOC_S_CROP),							/*  struct v4l2_crop */
	ioc(video, VIDIOC_S_CTRL),							/*  struct v4l2_control */
	ioc(video, VIDIOC_S_DV_TIMINGS),						/*  struct v4l2_dv_timings */
	ioc(video, VIDIOC_S_EDID),							/*  struct v4l2_edid */
	ioc(video, VIDIOC_S_EXT_CTRLS),							/*  struct v4l2_ext_controls */
	ioc(video, VIDIOC_S_FBUF),							/*  struct v4l2_framebuffer */
	ioc(video, VIDIOC_S_FMT),							/*  struct v4l2_format */
	ioc(video, VIDIOC_S_FREQUENCY),							/*  struct v4l2_frequency */
	ioc(video, VIDIOC_S_HW_FREQ_SEEK),						/*  struct v4l2_hw_freq_seek */
	ioc(video, VIDIOC_S_INPUT),							/*  int */
	ioc(video, VIDIOC_S_JPEGCOMP),							/*  struct v4l2_jpegcompression */
	ioc(video, VIDIOC_S_MODULATOR),							/*  struct v4l2_modulator */
	ioc(video, VIDIOC_S_OUTPUT),							/*  int */
	ioc(video, VIDIOC_S_PARM),							/*  struct v4l2_streamparm */
	ioc(video, VIDIOC_S_PRIORITY),							/*  __u32 */
	ioc(video, VIDIOC_S_SELECTION),							/*  struct v4l2_selection */
	ioc(video, VIDIOC_S_STD),							/*  v4l2_std_id */
	ioc(video, VIDIOC_S_TUNER),							/*  struct v4l2_tuner */
	ioc(video, VIDIOC_TRY_DECODER_CMD),						/*  struct v4l2_decoder_cmd */
	ioc(video, VIDIOC_TRY_ENCODER_CMD),						/*  struct v4l2_encoder_cmd */
	ioc(video, VIDIOC_TRY_EXT_CTRLS),						/*  struct v4l2_ext_controls */
	ioc(video, VIDIOC_TRY_FMT),							/*  struct v4l2_format */
	ioc(video, VIDIOC_UNSUBSCRIBE_EVENT),						/*  struct v4l2_event_subscription */
};
#define S_IOCTLS sizeof(ioctls)/sizeof(ioctls[0])
