From owner-svn-src-head@FreeBSD.ORG Wed May 4 13:09:20 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA0EF106564A; Wed, 4 May 2011 13:09:20 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDD498FC15; Wed, 4 May 2011 13:09:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44D9Kho050751; Wed, 4 May 2011 13:09:20 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44D9KwC050750; Wed, 4 May 2011 13:09:20 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201105041309.p44D9KwC050750@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 4 May 2011 13:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221434 - head/sys/compat/linux X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 13:09:21 -0000 Author: netchild Date: Wed May 4 13:09:20 2011 New Revision: 221434 URL: http://svn.freebsd.org/changeset/base/221434 Log: Commit the missing linux_videdev2_compat.h (lost somewhere between commit tree patch generation -> successful compile tree build test -> commmit). Pointy hat to: netchild Added: head/sys/compat/linux/linux_videodev2_compat.h (contents, props changed) Added: head/sys/compat/linux/linux_videodev2_compat.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linux/linux_videodev2_compat.h Wed May 4 13:09:20 2011 (r221434) @@ -0,0 +1,137 @@ +/* + * $FreeBSD$ + */ + +/* + * This file defines compatibility versions of several video structures + * defined in the Linux videodev2.h header (linux_videodev2.h). The + * structures defined in this file are the ones that have been determined + * to have 32- to 64-bit size dependencies. + */ + +#ifndef _LINUX_VIDEODEV2_COMPAT_H_ +#define _LINUX_VIDEODEV2_COMPAT_H_ + +struct l_v4l2_buffer { + uint32_t index; + enum v4l2_buf_type type; + uint32_t bytesused; + uint32_t flags; + enum v4l2_field field; + l_timeval timestamp; + struct v4l2_timecode timecode; + uint32_t sequence; + + /* memory location */ + enum v4l2_memory memory; + union { + uint32_t offset; + l_ulong userptr; + } m; + uint32_t length; + uint32_t input; + uint32_t reserved; +}; + +struct l_v4l2_framebuffer { + uint32_t capability; + uint32_t flags; +/* FIXME: in theory we should pass something like PCI device + memory + * region + offset instead of some physical address */ + l_uintptr_t base; + struct v4l2_pix_format fmt; +}; + +struct l_v4l2_clip { + struct v4l2_rect c; + l_uintptr_t next; +}; + +struct l_v4l2_window { + struct v4l2_rect w; + enum v4l2_field field; + uint32_t chromakey; + l_uintptr_t clips; + uint32_t clipcount; + l_uintptr_t bitmap; + uint8_t global_alpha; +}; + +struct l_v4l2_standard { + uint32_t index; + v4l2_std_id id; + uint8_t name[24]; + struct v4l2_fract frameperiod; /* Frames, not fields */ + uint32_t framelines; + uint32_t reserved[4]; +} +#ifdef COMPAT_LINUX32 /* 32bit linuxolator */ +__attribute__ ((packed)) +#endif +; + +struct l_v4l2_ext_control { + uint32_t id; + uint32_t size; + uint32_t reserved2[1]; + union { + int32_t value; + int64_t value64; + l_uintptr_t string; + } u; +} __attribute__ ((packed)); + +struct l_v4l2_ext_controls { + uint32_t ctrl_class; + uint32_t count; + uint32_t error_idx; + uint32_t reserved[2]; + l_uintptr_t controls; +}; + +struct l_v4l2_format { + enum v4l2_buf_type type; + union { + struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */ + struct l_v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ + struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ + struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ + uint8_t raw_data[200]; /* user-defined */ + } fmt; +} +#ifdef COMPAT_LINUX32 /* 32bit linuxolator */ +__attribute__ ((packed)) +#endif +; + +#ifdef VIDIOC_DQEVENT +struct l_v4l2_event { + uint32_t type; + union { + struct v4l2_event_vsync vsync; + uint8_t data[64]; + } u; + uint32_t pending; + uint32_t sequence; + struct l_timespec timestamp; + uint32_t reserved[9]; +}; +#endif + +struct l_v4l2_input { + uint32_t index; /* Which input */ + uint8_t name[32]; /* Label */ + uint32_t type; /* Type of input */ + uint32_t audioset; /* Associated audios (bitfield) */ + uint32_t tuner; /* Associated tuner */ + v4l2_std_id std; + uint32_t status; + uint32_t capabilities; + uint32_t reserved[3]; +} +#ifdef COMPAT_LINUX32 /* 32bit linuxolator */ +__attribute__ ((packed)) +#endif +; + +#endif /* _LINUX_VIDEODEV2_COMPAT_H_ */