Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vino.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/time.h>
#include <linux/kmod.h>
#include <linux/i2c.h>
#include <linux/videodev2.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <linux/mutex.h>
#include <asm/paccess.h>
#include <asm/io.h>
#include <asm/sgi/ip22.h>
#include <asm/sgi/mc.h>
#include "vino.h"
#include "saa7191.h"
#include "indycam.h"

Go to the source code of this file.

Data Structures

struct  vino_input
 
struct  vino_clipping
 
struct  vino_data_format
 
struct  vino_data_norm
 
struct  vino_descriptor_table
 
struct  vino_framebuffer
 
struct  vino_framebuffer_fifo
 
struct  vino_framebuffer_queue
 
struct  vino_interrupt_data
 
struct  vino_channel_settings
 
struct  vino_settings
 
struct  i2c_algo_sgi_data
 

Macros

#define VINO_MODULE_VERSION   "0.0.7"
 
#define dprintk(x...)
 
#define VINO_NO_CHANNEL   0
 
#define VINO_CHANNEL_A   1
 
#define VINO_CHANNEL_B   2
 
#define VINO_PAL_WIDTH   768
 
#define VINO_PAL_HEIGHT   576
 
#define VINO_NTSC_WIDTH   640
 
#define VINO_NTSC_HEIGHT   480
 
#define VINO_MIN_WIDTH   32
 
#define VINO_MIN_HEIGHT   32
 
#define VINO_CLIPPING_START_ODD_D1   1
 
#define VINO_CLIPPING_START_ODD_PAL   15
 
#define VINO_CLIPPING_START_ODD_NTSC   12
 
#define VINO_CLIPPING_START_EVEN_D1   2
 
#define VINO_CLIPPING_START_EVEN_PAL   15
 
#define VINO_CLIPPING_START_EVEN_NTSC   12
 
#define VINO_INPUT_CHANNEL_COUNT   3
 
#define VINO_INPUT_NONE   -1
 
#define VINO_INPUT_COMPOSITE   0
 
#define VINO_INPUT_SVIDEO   1
 
#define VINO_INPUT_D1   2
 
#define VINO_PAGE_RATIO   (PAGE_SIZE / VINO_PAGE_SIZE)
 
#define VINO_FIFO_THRESHOLD_DEFAULT   16
 
#define VINO_FRAMEBUFFER_SIZE
 
#define VINO_FRAMEBUFFER_COUNT_MAX   8
 
#define VINO_FRAMEBUFFER_UNUSED   0
 
#define VINO_FRAMEBUFFER_IN_USE   1
 
#define VINO_FRAMEBUFFER_READY   2
 
#define VINO_QUEUE_ERROR   -1
 
#define VINO_QUEUE_MAGIC   0x20050125
 
#define VINO_MEMORY_NONE   0
 
#define VINO_MEMORY_MMAP   1
 
#define VINO_MEMORY_USERPTR   2
 
#define VINO_DUMMY_DESC_COUNT   4
 
#define VINO_DESC_FETCH_DELAY   5 /* microseconds */
 
#define VINO_MAX_FRAME_SKIP_COUNT   128
 
#define VINO_DATA_FMT_NONE   -1
 
#define VINO_DATA_FMT_GREY   0
 
#define VINO_DATA_FMT_RGB332   1
 
#define VINO_DATA_FMT_RGB32   2
 
#define VINO_DATA_FMT_YUV   3
 
#define VINO_DATA_FMT_COUNT   4
 
#define VINO_DATA_NORM_NONE   -1
 
#define VINO_DATA_NORM_NTSC   0
 
#define VINO_DATA_NORM_PAL   1
 
#define VINO_DATA_NORM_SECAM   2
 
#define VINO_DATA_NORM_D1   3
 
#define VINO_DATA_NORM_COUNT   4
 
#define SGI_I2C_FORCE_IDLE   (0 << 0)
 
#define SGI_I2C_NOT_IDLE   (1 << 0)
 
#define SGI_I2C_WRITE   (0 << 1)
 
#define SGI_I2C_READ   (1 << 1)
 
#define SGI_I2C_RELEASE_BUS   (0 << 2)
 
#define SGI_I2C_HOLD_BUS   (1 << 2)
 
#define SGI_I2C_XFER_DONE   (0 << 4)
 
#define SGI_I2C_XFER_BUSY   (1 << 4)
 
#define SGI_I2C_ACK   (0 << 5)
 
#define SGI_I2C_NACK   (1 << 5)
 
#define SGI_I2C_BUS_OK   (0 << 7)
 
#define SGI_I2C_BUS_ERR   (1 << 7)
 
#define camera_call(o, f, args...)   v4l2_subdev_call(vino_drvdata->camera, o, f, ##args)
 
#define decoder_call(o, f, args...)   v4l2_subdev_call(vino_drvdata->decoder, o, f, ##args)
 
#define VINO_INDYCAM_V4L2_CONTROL_COUNT   9
 
#define VINO_SAA7191_V4L2_CONTROL_COUNT   9
 

Functions

 MODULE_DESCRIPTION ("SGI VINO Video4Linux2 driver")
 
 MODULE_VERSION (VINO_MODULE_VERSION)
 
 MODULE_AUTHOR ("Mikael Nousiainen <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 module_param_named (pixelconv, vino_pixel_conversion, int, 0)
 
 MODULE_PARM_DESC (pixelconv,"enable pixel conversion (non-zero value enables)")
 
 DECLARE_TASKLET (vino_tasklet_a, vino_capture_tasklet, VINO_CHANNEL_A)
 
 DECLARE_TASKLET (vino_tasklet_b, vino_capture_tasklet, VINO_CHANNEL_B)
 
 module_init (vino_module_init)
 
 module_exit (vino_module_exit)
 

Variables

struct v4l2_queryctrl vino_indycam_v4l2_controls []
 
struct v4l2_queryctrl vino_saa7191_v4l2_controls []
 
struct v4l2_ioctl_ops vino_ioctl_ops
 

Macro Definition Documentation

#define camera_call (   o,
  f,
  args... 
)    v4l2_subdev_call(vino_drvdata->camera, o, f, ##args)

Definition at line 358 of file vino.c.

#define decoder_call (   o,
  f,
  args... 
)    v4l2_subdev_call(vino_drvdata->decoder, o, f, ##args)

Definition at line 360 of file vino.c.

#define dprintk (   x...)

Definition at line 73 of file vino.c.

#define SGI_I2C_ACK   (0 << 5)

Definition at line 157 of file vino.c.

#define SGI_I2C_BUS_ERR   (1 << 7)

Definition at line 160 of file vino.c.

#define SGI_I2C_BUS_OK   (0 << 7)

Definition at line 159 of file vino.c.

#define SGI_I2C_FORCE_IDLE   (0 << 0)

Definition at line 149 of file vino.c.

#define SGI_I2C_HOLD_BUS   (1 << 2)

Definition at line 154 of file vino.c.

#define SGI_I2C_NACK   (1 << 5)

Definition at line 158 of file vino.c.

#define SGI_I2C_NOT_IDLE   (1 << 0)

Definition at line 150 of file vino.c.

#define SGI_I2C_READ   (1 << 1)

Definition at line 152 of file vino.c.

#define SGI_I2C_RELEASE_BUS   (0 << 2)

Definition at line 153 of file vino.c.

#define SGI_I2C_WRITE   (0 << 1)

Definition at line 151 of file vino.c.

#define SGI_I2C_XFER_BUSY   (1 << 4)

Definition at line 156 of file vino.c.

#define SGI_I2C_XFER_DONE   (0 << 4)

Definition at line 155 of file vino.c.

#define VINO_CHANNEL_A   1

Definition at line 77 of file vino.c.

#define VINO_CHANNEL_B   2

Definition at line 78 of file vino.c.

#define VINO_CLIPPING_START_EVEN_D1   2

Definition at line 92 of file vino.c.

#define VINO_CLIPPING_START_EVEN_NTSC   12

Definition at line 94 of file vino.c.

#define VINO_CLIPPING_START_EVEN_PAL   15

Definition at line 93 of file vino.c.

#define VINO_CLIPPING_START_ODD_D1   1

Definition at line 88 of file vino.c.

#define VINO_CLIPPING_START_ODD_NTSC   12

Definition at line 90 of file vino.c.

#define VINO_CLIPPING_START_ODD_PAL   15

Definition at line 89 of file vino.c.

#define VINO_DATA_FMT_COUNT   4

Definition at line 137 of file vino.c.

#define VINO_DATA_FMT_GREY   0

Definition at line 132 of file vino.c.

#define VINO_DATA_FMT_NONE   -1

Definition at line 131 of file vino.c.

#define VINO_DATA_FMT_RGB32   2

Definition at line 134 of file vino.c.

#define VINO_DATA_FMT_RGB332   1

Definition at line 133 of file vino.c.

#define VINO_DATA_FMT_YUV   3

Definition at line 135 of file vino.c.

#define VINO_DATA_NORM_COUNT   4

Definition at line 146 of file vino.c.

#define VINO_DATA_NORM_D1   3

Definition at line 144 of file vino.c.

#define VINO_DATA_NORM_NONE   -1

Definition at line 140 of file vino.c.

#define VINO_DATA_NORM_NTSC   0

Definition at line 141 of file vino.c.

#define VINO_DATA_NORM_PAL   1

Definition at line 142 of file vino.c.

#define VINO_DATA_NORM_SECAM   2

Definition at line 143 of file vino.c.

#define VINO_DESC_FETCH_DELAY   5 /* microseconds */

Definition at line 126 of file vino.c.

#define VINO_DUMMY_DESC_COUNT   4

Definition at line 125 of file vino.c.

#define VINO_FIFO_THRESHOLD_DEFAULT   16

Definition at line 106 of file vino.c.

#define VINO_FRAMEBUFFER_COUNT_MAX   8

Definition at line 112 of file vino.c.

#define VINO_FRAMEBUFFER_IN_USE   1

Definition at line 115 of file vino.c.

#define VINO_FRAMEBUFFER_READY   2

Definition at line 116 of file vino.c.

#define VINO_FRAMEBUFFER_SIZE
Value:
+ 3 * PAGE_SIZE) & ~(PAGE_SIZE - 1))

Definition at line 108 of file vino.c.

#define VINO_FRAMEBUFFER_UNUSED   0

Definition at line 114 of file vino.c.

#define VINO_INDYCAM_V4L2_CONTROL_COUNT   9

Definition at line 505 of file vino.c.

#define VINO_INPUT_CHANNEL_COUNT   3

Definition at line 96 of file vino.c.

#define VINO_INPUT_COMPOSITE   0

Definition at line 100 of file vino.c.

#define VINO_INPUT_D1   2

Definition at line 102 of file vino.c.

#define VINO_INPUT_NONE   -1

Definition at line 99 of file vino.c.

#define VINO_INPUT_SVIDEO   1

Definition at line 101 of file vino.c.

#define VINO_MAX_FRAME_SKIP_COUNT   128

Definition at line 128 of file vino.c.

#define VINO_MEMORY_MMAP   1

Definition at line 122 of file vino.c.

#define VINO_MEMORY_NONE   0

Definition at line 121 of file vino.c.

#define VINO_MEMORY_USERPTR   2

Definition at line 123 of file vino.c.

#define VINO_MIN_HEIGHT   32

Definition at line 86 of file vino.c.

#define VINO_MIN_WIDTH   32

Definition at line 85 of file vino.c.

#define VINO_MODULE_VERSION   "0.0.7"

Definition at line 63 of file vino.c.

#define VINO_NO_CHANNEL   0

Definition at line 76 of file vino.c.

#define VINO_NTSC_HEIGHT   480

Definition at line 83 of file vino.c.

#define VINO_NTSC_WIDTH   640

Definition at line 82 of file vino.c.

#define VINO_PAGE_RATIO   (PAGE_SIZE / VINO_PAGE_SIZE)

Definition at line 104 of file vino.c.

#define VINO_PAL_HEIGHT   576

Definition at line 81 of file vino.c.

#define VINO_PAL_WIDTH   768

Definition at line 80 of file vino.c.

#define VINO_QUEUE_ERROR   -1

Definition at line 118 of file vino.c.

#define VINO_QUEUE_MAGIC   0x20050125

Definition at line 119 of file vino.c.

#define VINO_SAA7191_V4L2_CONTROL_COUNT   9

Definition at line 583 of file vino.c.

Function Documentation

DECLARE_TASKLET ( vino_tasklet_a  ,
vino_capture_tasklet  ,
VINO_CHANNEL_A   
)
DECLARE_TASKLET ( vino_tasklet_b  ,
vino_capture_tasklet  ,
VINO_CHANNEL_B   
)
MODULE_AUTHOR ( "Mikael Nousiainen <[email protected]>"  )
MODULE_DESCRIPTION ( "SGI VINO Video4Linux2 driver )
module_exit ( vino_module_exit  )
module_init ( vino_module_init  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( pixelconv  ,
vino_pixel_conversion  ,
int  ,
 
)
MODULE_PARM_DESC ( pixelconv  ,
"enable pixel conversion (non-zero value enables)"   
)
MODULE_VERSION ( VINO_MODULE_VERSION  )

Variable Documentation

struct v4l2_queryctrl vino_indycam_v4l2_controls[]

Definition at line 507 of file vino.c.

struct v4l2_ioctl_ops vino_ioctl_ops
Initial value:
= {
.vidioc_enum_fmt_vid_cap = vino_enum_fmt_vid_cap,
.vidioc_g_fmt_vid_cap = vino_g_fmt_vid_cap,
.vidioc_s_fmt_vid_cap = vino_s_fmt_vid_cap,
.vidioc_try_fmt_vid_cap = vino_try_fmt_vid_cap,
.vidioc_querycap = vino_querycap,
.vidioc_enum_input = vino_enum_input,
.vidioc_g_input = vino_g_input,
.vidioc_s_input = vino_s_input,
.vidioc_g_std = vino_g_std,
.vidioc_s_std = vino_s_std,
.vidioc_querystd = vino_querystd,
.vidioc_cropcap = vino_cropcap,
.vidioc_s_crop = vino_s_crop,
.vidioc_g_crop = vino_g_crop,
.vidioc_s_parm = vino_s_parm,
.vidioc_g_parm = vino_g_parm,
.vidioc_reqbufs = vino_reqbufs,
.vidioc_querybuf = vino_querybuf,
.vidioc_qbuf = vino_qbuf,
.vidioc_dqbuf = vino_dqbuf,
.vidioc_streamon = vino_streamon,
.vidioc_streamoff = vino_streamoff,
.vidioc_queryctrl = vino_queryctrl,
.vidioc_g_ctrl = vino_g_ctrl,
.vidioc_s_ctrl = vino_s_ctrl,
}

Definition at line 4024 of file vino.c.

struct v4l2_queryctrl vino_saa7191_v4l2_controls[]

Definition at line 585 of file vino.c.