Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ivtv-driver.h File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/list.h>
#include <linux/unistd.h>
#include <linux/pagemap.h>
#include <linux/scatterlist.h>
#include <linux/kthread.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <asm/uaccess.h>
#include <asm/byteorder.h>
#include <linux/dvb/video.h>
#include <linux/dvb/audio.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fh.h>
#include <media/tuner.h>
#include <media/cx2341x.h>
#include <media/ir-kbd-i2c.h>
#include <linux/ivtv.h>

Go to the source code of this file.

Data Structures

struct  ivtv_options
 
struct  ivtv_mailbox
 
struct  ivtv_api_cache
 
struct  ivtv_mailbox_data
 
struct  ivtv_sg_element
 
struct  ivtv_sg_host_element
 
struct  ivtv_user_dma
 
struct  ivtv_dma_page_info
 
struct  ivtv_buffer
 
struct  ivtv_queue
 
struct  ivtv_stream
 
struct  ivtv_open_id
 
struct  yuv_frame_info
 
struct  yuv_playback_info
 
struct  vbi_cc
 
struct  vbi_vps
 
struct  vbi_info
 
struct  ivtv
 

Macros

#define IVTV_ENCODER_OFFSET   0x00000000
 
#define IVTV_ENCODER_SIZE   0x00800000 /* Total size is 0x01000000, but only first half is used */
 
#define IVTV_DECODER_OFFSET   0x01000000
 
#define IVTV_DECODER_SIZE   0x00800000 /* Total size is 0x01000000, but only first half is used */
 
#define IVTV_REG_OFFSET   0x02000000
 
#define IVTV_REG_SIZE   0x00010000
 
#define IVTV_MAX_CARDS   32
 
#define IVTV_ENC_STREAM_TYPE_MPG   0
 
#define IVTV_ENC_STREAM_TYPE_YUV   1
 
#define IVTV_ENC_STREAM_TYPE_VBI   2
 
#define IVTV_ENC_STREAM_TYPE_PCM   3
 
#define IVTV_ENC_STREAM_TYPE_RAD   4
 
#define IVTV_DEC_STREAM_TYPE_MPG   5
 
#define IVTV_DEC_STREAM_TYPE_VBI   6
 
#define IVTV_DEC_STREAM_TYPE_VOUT   7
 
#define IVTV_DEC_STREAM_TYPE_YUV   8
 
#define IVTV_MAX_STREAMS   9
 
#define IVTV_DMA_SG_OSD_ENT   (2883584/PAGE_SIZE) /* sg entities */
 
#define IVTV_REG_DMAXFER   (0x0000)
 
#define IVTV_REG_DMASTATUS   (0x0004)
 
#define IVTV_REG_DECDMAADDR   (0x0008)
 
#define IVTV_REG_ENCDMAADDR   (0x000c)
 
#define IVTV_REG_DMACONTROL   (0x0010)
 
#define IVTV_REG_IRQSTATUS   (0x0040)
 
#define IVTV_REG_IRQMASK   (0x0048)
 
#define IVTV_REG_ENC_SDRAM_REFRESH   (0x07F8)
 
#define IVTV_REG_ENC_SDRAM_PRECHARGE   (0x07FC)
 
#define IVTV_REG_DEC_SDRAM_REFRESH   (0x08F8)
 
#define IVTV_REG_DEC_SDRAM_PRECHARGE   (0x08FC)
 
#define IVTV_REG_VDM   (0x2800)
 
#define IVTV_REG_AO   (0x2D00)
 
#define IVTV_REG_BYTEFLUSH   (0x2D24)
 
#define IVTV_REG_SPU   (0x9050)
 
#define IVTV_REG_HW_BLOCKS   (0x9054)
 
#define IVTV_REG_VPU   (0x9058)
 
#define IVTV_REG_APU   (0xA064)
 
#define IVTV_REG_DEC_LINE_FIELD   (0x28C0)
 
#define IVTV_DBGFLG_WARN   (1 << 0)
 
#define IVTV_DBGFLG_INFO   (1 << 1)
 
#define IVTV_DBGFLG_MB   (1 << 2)
 
#define IVTV_DBGFLG_IOCTL   (1 << 3)
 
#define IVTV_DBGFLG_FILE   (1 << 4)
 
#define IVTV_DBGFLG_DMA   (1 << 5)
 
#define IVTV_DBGFLG_IRQ   (1 << 6)
 
#define IVTV_DBGFLG_DEC   (1 << 7)
 
#define IVTV_DBGFLG_YUV   (1 << 8)
 
#define IVTV_DBGFLG_I2C   (1 << 9)
 
#define IVTV_DBGFLG_HIGHVOL   (1 << 10)
 
#define IVTV_DEBUG(x, type, fmt, args...)
 
#define IVTV_DEBUG_WARN(fmt, args...)   IVTV_DEBUG(IVTV_DBGFLG_WARN, "warn", fmt , ## args)
 
#define IVTV_DEBUG_INFO(fmt, args...)   IVTV_DEBUG(IVTV_DBGFLG_INFO, "info", fmt , ## args)
 
#define IVTV_DEBUG_MB(fmt, args...)   IVTV_DEBUG(IVTV_DBGFLG_MB, "mb", fmt , ## args)
 
#define IVTV_DEBUG_DMA(fmt, args...)   IVTV_DEBUG(IVTV_DBGFLG_DMA, "dma", fmt , ## args)
 
#define IVTV_DEBUG_IOCTL(fmt, args...)   IVTV_DEBUG(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args)
 
#define IVTV_DEBUG_FILE(fmt, args...)   IVTV_DEBUG(IVTV_DBGFLG_FILE, "file", fmt , ## args)
 
#define IVTV_DEBUG_I2C(fmt, args...)   IVTV_DEBUG(IVTV_DBGFLG_I2C, "i2c", fmt , ## args)
 
#define IVTV_DEBUG_IRQ(fmt, args...)   IVTV_DEBUG(IVTV_DBGFLG_IRQ, "irq", fmt , ## args)
 
#define IVTV_DEBUG_DEC(fmt, args...)   IVTV_DEBUG(IVTV_DBGFLG_DEC, "dec", fmt , ## args)
 
#define IVTV_DEBUG_YUV(fmt, args...)   IVTV_DEBUG(IVTV_DBGFLG_YUV, "yuv", fmt , ## args)
 
#define IVTV_DEBUG_HIGH_VOL(x, type, fmt, args...)
 
#define IVTV_DEBUG_HI_WARN(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_WARN, "warn", fmt , ## args)
 
#define IVTV_DEBUG_HI_INFO(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_INFO, "info", fmt , ## args)
 
#define IVTV_DEBUG_HI_MB(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_MB, "mb", fmt , ## args)
 
#define IVTV_DEBUG_HI_DMA(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DMA, "dma", fmt , ## args)
 
#define IVTV_DEBUG_HI_IOCTL(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args)
 
#define IVTV_DEBUG_HI_FILE(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_FILE, "file", fmt , ## args)
 
#define IVTV_DEBUG_HI_I2C(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_I2C, "i2c", fmt , ## args)
 
#define IVTV_DEBUG_HI_IRQ(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IRQ, "irq", fmt , ## args)
 
#define IVTV_DEBUG_HI_DEC(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DEC, "dec", fmt , ## args)
 
#define IVTV_DEBUG_HI_YUV(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_YUV, "yuv", fmt , ## args)
 
#define IVTV_ERR(fmt, args...)   v4l2_err(&itv->v4l2_dev, fmt , ## args)
 
#define IVTV_WARN(fmt, args...)   v4l2_warn(&itv->v4l2_dev, fmt , ## args)
 
#define IVTV_INFO(fmt, args...)   v4l2_info(&itv->v4l2_dev, fmt , ## args)
 
#define OUT_NONE   0
 
#define OUT_MPG   1
 
#define OUT_YUV   2
 
#define OUT_UDMA_YUV   3
 
#define OUT_PASSTHROUGH   4
 
#define IVTV_MAX_PGM_INDEX   (400)
 
#define IVTV_DEFAULT_I2C_CLOCK_PERIOD   20
 
#define IVTV_F_B_NEED_BUF_SWAP   (1 << 0) /* this buffer should be byte swapped */
 
#define IVTV_F_S_DMA_PENDING   0 /* this stream has pending DMA */
 
#define IVTV_F_S_DMA_HAS_VBI   1 /* the current DMA request also requests VBI data */
 
#define IVTV_F_S_NEEDS_DATA   2 /* this decoding stream needs more data */
 
#define IVTV_F_S_CLAIMED   3 /* this stream is claimed */
 
#define IVTV_F_S_STREAMING   4 /* the fw is decoding/encoding this stream */
 
#define IVTV_F_S_INTERNAL_USE   5 /* this stream is used internally (sliced VBI processing) */
 
#define IVTV_F_S_PASSTHROUGH   6 /* this stream is in passthrough mode */
 
#define IVTV_F_S_STREAMOFF   7 /* signal end of stream EOS */
 
#define IVTV_F_S_APPL_IO   8 /* this stream is used read/written by an application */
 
#define IVTV_F_S_PIO_PENDING   9 /* this stream has pending PIO */
 
#define IVTV_F_S_PIO_HAS_VBI   1 /* the current PIO request also requests VBI data */
 
#define IVTV_F_I_DMA   0 /* DMA in progress */
 
#define IVTV_F_I_UDMA   1 /* UDMA in progress */
 
#define IVTV_F_I_UDMA_PENDING   2 /* UDMA pending */
 
#define IVTV_F_I_SPEED_CHANGE   3 /* a speed change is in progress */
 
#define IVTV_F_I_EOS   4 /* end of encoder stream reached */
 
#define IVTV_F_I_RADIO_USER   5 /* the radio tuner is selected */
 
#define IVTV_F_I_DIG_RST   6 /* reset digitizer */
 
#define IVTV_F_I_DEC_YUV   7 /* YUV instead of MPG is being decoded */
 
#define IVTV_F_I_UPDATE_CC   9 /* CC should be updated */
 
#define IVTV_F_I_UPDATE_WSS   10 /* WSS should be updated */
 
#define IVTV_F_I_UPDATE_VPS   11 /* VPS should be updated */
 
#define IVTV_F_I_DECODING_YUV   12 /* this stream is YUV frame decoding */
 
#define IVTV_F_I_ENC_PAUSED   13 /* the encoder is paused */
 
#define IVTV_F_I_VALID_DEC_TIMINGS   14 /* last_dec_timing is valid */
 
#define IVTV_F_I_HAVE_WORK   15 /* used in the interrupt handler: there is work to be done */
 
#define IVTV_F_I_WORK_HANDLER_VBI   16 /* there is work to be done for VBI */
 
#define IVTV_F_I_WORK_HANDLER_YUV   17 /* there is work to be done for YUV */
 
#define IVTV_F_I_WORK_HANDLER_PIO   18 /* there is work to be done for PIO */
 
#define IVTV_F_I_PIO   19 /* PIO in progress */
 
#define IVTV_F_I_DEC_PAUSED   20 /* the decoder is paused */
 
#define IVTV_F_I_INITED   21 /* set after first open */
 
#define IVTV_F_I_FAILED   22 /* set if first open failed */
 
#define IVTV_F_I_WORK_HANDLER_PCM   23 /* there is work to be done for PCM */
 
#define IVTV_F_I_EV_DEC_STOPPED   28 /* decoder stopped event */
 
#define IVTV_F_I_EV_VSYNC   29 /* VSYNC event */
 
#define IVTV_F_I_EV_VSYNC_FIELD   30 /* VSYNC event field (0 = first, 1 = second field) */
 
#define IVTV_F_I_EV_VSYNC_ENABLED   31 /* VSYNC event enabled */
 
#define IVTV_YUV_MODE_INTERLACED   0x00
 
#define IVTV_YUV_MODE_PROGRESSIVE   0x01
 
#define IVTV_YUV_MODE_AUTO   0x02
 
#define IVTV_YUV_MODE_MASK   0x03
 
#define IVTV_YUV_SYNC_EVEN   0x00
 
#define IVTV_YUV_SYNC_ODD   0x04
 
#define IVTV_YUV_SYNC_MASK   0x04
 
#define IVTV_YUV_BUFFERS   8
 
#define IVTV_VBI_FRAMES   32
 
#define write_sync(val, reg)   do { writel(val, reg); readl(reg); } while (0)
 
#define read_reg(reg)   readl(itv->reg_mem + (reg))
 
#define write_reg(val, reg)   writel(val, itv->reg_mem + (reg))
 
#define write_reg_sync(val, reg)   do { write_reg(val, reg); read_reg(reg); } while (0)
 
#define read_enc(addr)   readl(itv->enc_mem + (u32)(addr))
 
#define write_enc(val, addr)   writel(val, itv->enc_mem + (u32)(addr))
 
#define write_enc_sync(val, addr)   do { write_enc(val, addr); read_enc(addr); } while (0)
 
#define read_dec(addr)   readl(itv->dec_mem + (u32)(addr))
 
#define write_dec(val, addr)   writel(val, itv->dec_mem + (u32)(addr))
 
#define write_dec_sync(val, addr)   do { write_dec(val, addr); read_dec(addr); } while (0)
 
#define ivtv_call_hw(itv, hw, o, f, args...)
 
#define ivtv_call_all(itv, o, f, args...)   ivtv_call_hw(itv, 0, o, f , ##args)
 
#define ivtv_call_hw_err(itv, hw, o, f, args...)
 
#define ivtv_call_all_err(itv, o, f, args...)   ivtv_call_hw_err(itv, 0, o, f , ##args)
 

Functions

void ivtv_set_irq_mask (struct ivtv *itv, u32 mask)
 
void ivtv_clear_irq_mask (struct ivtv *itv, u32 mask)
 
int ivtv_set_output_mode (struct ivtv *itv, int mode)
 
struct ivtv_streamivtv_get_output_stream (struct ivtv *itv)
 
int ivtv_msleep_timeout (unsigned int msecs, int intr)
 
int ivtv_waitq (wait_queue_head_t *waitq)
 
void ivtv_read_eeprom (struct ivtv *itv, struct tveeprom *tv)
 
int ivtv_init_on_first_open (struct ivtv *itv)
 

Variables

int ivtv_debug
 
int(* ivtv_ext_init )(struct ivtv *)
 
int ivtv_first_minor
 

Macro Definition Documentation

#define ivtv_call_all (   itv,
  o,
  f,
  args... 
)    ivtv_call_hw(itv, 0, o, f , ##args)

Definition at line 836 of file ivtv-driver.h.

#define ivtv_call_all_err (   itv,
  o,
  f,
  args... 
)    ivtv_call_hw_err(itv, 0, o, f , ##args)

Definition at line 848 of file ivtv-driver.h.

#define ivtv_call_hw (   itv,
  hw,
  o,
  f,
  args... 
)
Value:
do { \
__v4l2_device_call_subdevs_p(&(itv)->v4l2_dev, __sd, \
!(hw) || (__sd->grp_id & (hw)), o, f , ##args); \
} while (0)

Definition at line 829 of file ivtv-driver.h.

#define ivtv_call_hw_err (   itv,
  hw,
  o,
  f,
  args... 
)
Value:
({ \
__v4l2_device_call_subdevs_until_err_p(&(itv)->v4l2_dev, __sd, \
!(hw) || (__sd->grp_id & (hw)), o, f , ##args); \
})

Definition at line 841 of file ivtv-driver.h.

#define IVTV_DBGFLG_DEC   (1 << 7)

Definition at line 135 of file ivtv-driver.h.

#define IVTV_DBGFLG_DMA   (1 << 5)

Definition at line 133 of file ivtv-driver.h.

#define IVTV_DBGFLG_FILE   (1 << 4)

Definition at line 132 of file ivtv-driver.h.

#define IVTV_DBGFLG_HIGHVOL   (1 << 10)

Definition at line 139 of file ivtv-driver.h.

#define IVTV_DBGFLG_I2C   (1 << 9)

Definition at line 137 of file ivtv-driver.h.

#define IVTV_DBGFLG_INFO   (1 << 1)

Definition at line 129 of file ivtv-driver.h.

#define IVTV_DBGFLG_IOCTL   (1 << 3)

Definition at line 131 of file ivtv-driver.h.

#define IVTV_DBGFLG_IRQ   (1 << 6)

Definition at line 134 of file ivtv-driver.h.

#define IVTV_DBGFLG_MB   (1 << 2)

Definition at line 130 of file ivtv-driver.h.

#define IVTV_DBGFLG_WARN   (1 << 0)

Definition at line 128 of file ivtv-driver.h.

#define IVTV_DBGFLG_YUV   (1 << 8)

Definition at line 136 of file ivtv-driver.h.

#define IVTV_DEBUG (   x,
  type,
  fmt,
  args... 
)
Value:
do { \
if ((x) & ivtv_debug) \
v4l2_info(&itv->v4l2_dev, " " type ": " fmt , ##args); \
} while (0)

Definition at line 141 of file ivtv-driver.h.

#define IVTV_DEBUG_DEC (   fmt,
  args... 
)    IVTV_DEBUG(IVTV_DBGFLG_DEC, "dec", fmt , ## args)

Definition at line 154 of file ivtv-driver.h.

#define IVTV_DEBUG_DMA (   fmt,
  args... 
)    IVTV_DEBUG(IVTV_DBGFLG_DMA, "dma", fmt , ## args)

Definition at line 149 of file ivtv-driver.h.

#define IVTV_DEBUG_FILE (   fmt,
  args... 
)    IVTV_DEBUG(IVTV_DBGFLG_FILE, "file", fmt , ## args)

Definition at line 151 of file ivtv-driver.h.

#define IVTV_DEBUG_HI_DEC (   fmt,
  args... 
)    IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DEC, "dec", fmt , ## args)

Definition at line 170 of file ivtv-driver.h.

#define IVTV_DEBUG_HI_DMA (   fmt,
  args... 
)    IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DMA, "dma", fmt , ## args)

Definition at line 165 of file ivtv-driver.h.

#define IVTV_DEBUG_HI_FILE (   fmt,
  args... 
)    IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_FILE, "file", fmt , ## args)

Definition at line 167 of file ivtv-driver.h.

#define IVTV_DEBUG_HI_I2C (   fmt,
  args... 
)    IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_I2C, "i2c", fmt , ## args)

Definition at line 168 of file ivtv-driver.h.

#define IVTV_DEBUG_HI_INFO (   fmt,
  args... 
)    IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_INFO, "info", fmt , ## args)

Definition at line 163 of file ivtv-driver.h.

#define IVTV_DEBUG_HI_IOCTL (   fmt,
  args... 
)    IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args)

Definition at line 166 of file ivtv-driver.h.

#define IVTV_DEBUG_HI_IRQ (   fmt,
  args... 
)    IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_IRQ, "irq", fmt , ## args)

Definition at line 169 of file ivtv-driver.h.

#define IVTV_DEBUG_HI_MB (   fmt,
  args... 
)    IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_MB, "mb", fmt , ## args)

Definition at line 164 of file ivtv-driver.h.

#define IVTV_DEBUG_HI_WARN (   fmt,
  args... 
)    IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_WARN, "warn", fmt , ## args)

Definition at line 162 of file ivtv-driver.h.

#define IVTV_DEBUG_HI_YUV (   fmt,
  args... 
)    IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_YUV, "yuv", fmt , ## args)

Definition at line 171 of file ivtv-driver.h.

#define IVTV_DEBUG_HIGH_VOL (   x,
  type,
  fmt,
  args... 
)
Value:
do { \
if (((x) & ivtv_debug) && (ivtv_debug & IVTV_DBGFLG_HIGHVOL)) \
v4l2_info(&itv->v4l2_dev, " " type ": " fmt , ##args); \
} while (0)

Definition at line 157 of file ivtv-driver.h.

#define IVTV_DEBUG_I2C (   fmt,
  args... 
)    IVTV_DEBUG(IVTV_DBGFLG_I2C, "i2c", fmt , ## args)

Definition at line 152 of file ivtv-driver.h.

#define IVTV_DEBUG_INFO (   fmt,
  args... 
)    IVTV_DEBUG(IVTV_DBGFLG_INFO, "info", fmt , ## args)

Definition at line 147 of file ivtv-driver.h.

#define IVTV_DEBUG_IOCTL (   fmt,
  args... 
)    IVTV_DEBUG(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args)

Definition at line 150 of file ivtv-driver.h.

#define IVTV_DEBUG_IRQ (   fmt,
  args... 
)    IVTV_DEBUG(IVTV_DBGFLG_IRQ, "irq", fmt , ## args)

Definition at line 153 of file ivtv-driver.h.

#define IVTV_DEBUG_MB (   fmt,
  args... 
)    IVTV_DEBUG(IVTV_DBGFLG_MB, "mb", fmt , ## args)

Definition at line 148 of file ivtv-driver.h.

#define IVTV_DEBUG_WARN (   fmt,
  args... 
)    IVTV_DEBUG(IVTV_DBGFLG_WARN, "warn", fmt , ## args)

Definition at line 146 of file ivtv-driver.h.

#define IVTV_DEBUG_YUV (   fmt,
  args... 
)    IVTV_DEBUG(IVTV_DBGFLG_YUV, "yuv", fmt , ## args)

Definition at line 155 of file ivtv-driver.h.

#define IVTV_DEC_STREAM_TYPE_MPG   5

Definition at line 89 of file ivtv-driver.h.

#define IVTV_DEC_STREAM_TYPE_VBI   6

Definition at line 90 of file ivtv-driver.h.

#define IVTV_DEC_STREAM_TYPE_VOUT   7

Definition at line 91 of file ivtv-driver.h.

#define IVTV_DEC_STREAM_TYPE_YUV   8

Definition at line 92 of file ivtv-driver.h.

#define IVTV_DECODER_OFFSET   0x01000000

Definition at line 75 of file ivtv-driver.h.

#define IVTV_DECODER_SIZE   0x00800000 /* Total size is 0x01000000, but only first half is used */

Definition at line 76 of file ivtv-driver.h.

#define IVTV_DEFAULT_I2C_CLOCK_PERIOD   20

Definition at line 188 of file ivtv-driver.h.

#define IVTV_DMA_SG_OSD_ENT   (2883584/PAGE_SIZE) /* sg entities */

Definition at line 95 of file ivtv-driver.h.

#define IVTV_ENC_STREAM_TYPE_MPG   0

Definition at line 84 of file ivtv-driver.h.

#define IVTV_ENC_STREAM_TYPE_PCM   3

Definition at line 87 of file ivtv-driver.h.

#define IVTV_ENC_STREAM_TYPE_RAD   4

Definition at line 88 of file ivtv-driver.h.

#define IVTV_ENC_STREAM_TYPE_VBI   2

Definition at line 86 of file ivtv-driver.h.

#define IVTV_ENC_STREAM_TYPE_YUV   1

Definition at line 85 of file ivtv-driver.h.

#define IVTV_ENCODER_OFFSET   0x00000000

Definition at line 73 of file ivtv-driver.h.

#define IVTV_ENCODER_SIZE   0x00800000 /* Total size is 0x01000000, but only first half is used */

Definition at line 74 of file ivtv-driver.h.

#define IVTV_ERR (   fmt,
  args... 
)    v4l2_err(&itv->v4l2_dev, fmt , ## args)

Definition at line 174 of file ivtv-driver.h.

#define IVTV_F_B_NEED_BUF_SWAP   (1 << 0) /* this buffer should be byte swapped */

Definition at line 222 of file ivtv-driver.h.

#define IVTV_F_I_DEC_PAUSED   20 /* the decoder is paused */

Definition at line 259 of file ivtv-driver.h.

#define IVTV_F_I_DEC_YUV   7 /* YUV instead of MPG is being decoded */

Definition at line 247 of file ivtv-driver.h.

#define IVTV_F_I_DECODING_YUV   12 /* this stream is YUV frame decoding */

Definition at line 251 of file ivtv-driver.h.

#define IVTV_F_I_DIG_RST   6 /* reset digitizer */

Definition at line 246 of file ivtv-driver.h.

#define IVTV_F_I_DMA   0 /* DMA in progress */

Definition at line 240 of file ivtv-driver.h.

#define IVTV_F_I_ENC_PAUSED   13 /* the encoder is paused */

Definition at line 252 of file ivtv-driver.h.

#define IVTV_F_I_EOS   4 /* end of encoder stream reached */

Definition at line 244 of file ivtv-driver.h.

#define IVTV_F_I_EV_DEC_STOPPED   28 /* decoder stopped event */

Definition at line 265 of file ivtv-driver.h.

#define IVTV_F_I_EV_VSYNC   29 /* VSYNC event */

Definition at line 266 of file ivtv-driver.h.

#define IVTV_F_I_EV_VSYNC_ENABLED   31 /* VSYNC event enabled */

Definition at line 268 of file ivtv-driver.h.

#define IVTV_F_I_EV_VSYNC_FIELD   30 /* VSYNC event field (0 = first, 1 = second field) */

Definition at line 267 of file ivtv-driver.h.

#define IVTV_F_I_FAILED   22 /* set if first open failed */

Definition at line 261 of file ivtv-driver.h.

#define IVTV_F_I_HAVE_WORK   15 /* used in the interrupt handler: there is work to be done */

Definition at line 254 of file ivtv-driver.h.

#define IVTV_F_I_INITED   21 /* set after first open */

Definition at line 260 of file ivtv-driver.h.

#define IVTV_F_I_PIO   19 /* PIO in progress */

Definition at line 258 of file ivtv-driver.h.

#define IVTV_F_I_RADIO_USER   5 /* the radio tuner is selected */

Definition at line 245 of file ivtv-driver.h.

#define IVTV_F_I_SPEED_CHANGE   3 /* a speed change is in progress */

Definition at line 243 of file ivtv-driver.h.

#define IVTV_F_I_UDMA   1 /* UDMA in progress */

Definition at line 241 of file ivtv-driver.h.

#define IVTV_F_I_UDMA_PENDING   2 /* UDMA pending */

Definition at line 242 of file ivtv-driver.h.

#define IVTV_F_I_UPDATE_CC   9 /* CC should be updated */

Definition at line 248 of file ivtv-driver.h.

#define IVTV_F_I_UPDATE_VPS   11 /* VPS should be updated */

Definition at line 250 of file ivtv-driver.h.

#define IVTV_F_I_UPDATE_WSS   10 /* WSS should be updated */

Definition at line 249 of file ivtv-driver.h.

#define IVTV_F_I_VALID_DEC_TIMINGS   14 /* last_dec_timing is valid */

Definition at line 253 of file ivtv-driver.h.

#define IVTV_F_I_WORK_HANDLER_PCM   23 /* there is work to be done for PCM */

Definition at line 262 of file ivtv-driver.h.

#define IVTV_F_I_WORK_HANDLER_PIO   18 /* there is work to be done for PIO */

Definition at line 257 of file ivtv-driver.h.

#define IVTV_F_I_WORK_HANDLER_VBI   16 /* there is work to be done for VBI */

Definition at line 255 of file ivtv-driver.h.

#define IVTV_F_I_WORK_HANDLER_YUV   17 /* there is work to be done for YUV */

Definition at line 256 of file ivtv-driver.h.

#define IVTV_F_S_APPL_IO   8 /* this stream is used read/written by an application */

Definition at line 234 of file ivtv-driver.h.

#define IVTV_F_S_CLAIMED   3 /* this stream is claimed */

Definition at line 229 of file ivtv-driver.h.

#define IVTV_F_S_DMA_HAS_VBI   1 /* the current DMA request also requests VBI data */

Definition at line 226 of file ivtv-driver.h.

#define IVTV_F_S_DMA_PENDING   0 /* this stream has pending DMA */

Definition at line 225 of file ivtv-driver.h.

#define IVTV_F_S_INTERNAL_USE   5 /* this stream is used internally (sliced VBI processing) */

Definition at line 231 of file ivtv-driver.h.

#define IVTV_F_S_NEEDS_DATA   2 /* this decoding stream needs more data */

Definition at line 227 of file ivtv-driver.h.

#define IVTV_F_S_PASSTHROUGH   6 /* this stream is in passthrough mode */

Definition at line 232 of file ivtv-driver.h.

#define IVTV_F_S_PIO_HAS_VBI   1 /* the current PIO request also requests VBI data */

Definition at line 237 of file ivtv-driver.h.

#define IVTV_F_S_PIO_PENDING   9 /* this stream has pending PIO */

Definition at line 236 of file ivtv-driver.h.

#define IVTV_F_S_STREAMING   4 /* the fw is decoding/encoding this stream */

Definition at line 230 of file ivtv-driver.h.

#define IVTV_F_S_STREAMOFF   7 /* signal end of stream EOS */

Definition at line 233 of file ivtv-driver.h.

#define IVTV_INFO (   fmt,
  args... 
)    v4l2_info(&itv->v4l2_dev, fmt , ## args)

Definition at line 176 of file ivtv-driver.h.

#define IVTV_MAX_CARDS   32

Definition at line 82 of file ivtv-driver.h.

#define IVTV_MAX_PGM_INDEX   (400)

Definition at line 185 of file ivtv-driver.h.

#define IVTV_MAX_STREAMS   9

Definition at line 93 of file ivtv-driver.h.

#define IVTV_REG_AO   (0x2D00)

Definition at line 112 of file ivtv-driver.h.

#define IVTV_REG_APU   (0xA064)

Definition at line 117 of file ivtv-driver.h.

#define IVTV_REG_BYTEFLUSH   (0x2D24)

Definition at line 113 of file ivtv-driver.h.

#define IVTV_REG_DEC_LINE_FIELD   (0x28C0)

Definition at line 120 of file ivtv-driver.h.

#define IVTV_REG_DEC_SDRAM_PRECHARGE   (0x08FC)

Definition at line 110 of file ivtv-driver.h.

#define IVTV_REG_DEC_SDRAM_REFRESH   (0x08F8)

Definition at line 109 of file ivtv-driver.h.

#define IVTV_REG_DECDMAADDR   (0x0008)

Definition at line 100 of file ivtv-driver.h.

#define IVTV_REG_DMACONTROL   (0x0010)

Definition at line 102 of file ivtv-driver.h.

#define IVTV_REG_DMASTATUS   (0x0004)

Definition at line 99 of file ivtv-driver.h.

#define IVTV_REG_DMAXFER   (0x0000)

Definition at line 98 of file ivtv-driver.h.

#define IVTV_REG_ENC_SDRAM_PRECHARGE   (0x07FC)

Definition at line 108 of file ivtv-driver.h.

#define IVTV_REG_ENC_SDRAM_REFRESH   (0x07F8)

Definition at line 107 of file ivtv-driver.h.

#define IVTV_REG_ENCDMAADDR   (0x000c)

Definition at line 101 of file ivtv-driver.h.

#define IVTV_REG_HW_BLOCKS   (0x9054)

Definition at line 115 of file ivtv-driver.h.

#define IVTV_REG_IRQMASK   (0x0048)

Definition at line 104 of file ivtv-driver.h.

#define IVTV_REG_IRQSTATUS   (0x0040)

Definition at line 103 of file ivtv-driver.h.

#define IVTV_REG_OFFSET   0x02000000

Definition at line 77 of file ivtv-driver.h.

#define IVTV_REG_SIZE   0x00010000

Definition at line 78 of file ivtv-driver.h.

#define IVTV_REG_SPU   (0x9050)

Definition at line 114 of file ivtv-driver.h.

#define IVTV_REG_VDM   (0x2800)

Definition at line 111 of file ivtv-driver.h.

#define IVTV_REG_VPU   (0x9058)

Definition at line 116 of file ivtv-driver.h.

#define IVTV_VBI_FRAMES   32

Definition at line 527 of file ivtv-driver.h.

#define IVTV_WARN (   fmt,
  args... 
)    v4l2_warn(&itv->v4l2_dev, fmt , ## args)

Definition at line 175 of file ivtv-driver.h.

#define IVTV_YUV_BUFFERS   8

Definition at line 429 of file ivtv-driver.h.

#define IVTV_YUV_MODE_AUTO   0x02

Definition at line 422 of file ivtv-driver.h.

#define IVTV_YUV_MODE_INTERLACED   0x00

Definition at line 420 of file ivtv-driver.h.

#define IVTV_YUV_MODE_MASK   0x03

Definition at line 423 of file ivtv-driver.h.

#define IVTV_YUV_MODE_PROGRESSIVE   0x01

Definition at line 421 of file ivtv-driver.h.

#define IVTV_YUV_SYNC_EVEN   0x00

Definition at line 425 of file ivtv-driver.h.

#define IVTV_YUV_SYNC_MASK   0x04

Definition at line 427 of file ivtv-driver.h.

#define IVTV_YUV_SYNC_ODD   0x04

Definition at line 426 of file ivtv-driver.h.

#define OUT_MPG   1

Definition at line 180 of file ivtv-driver.h.

#define OUT_NONE   0

Definition at line 179 of file ivtv-driver.h.

#define OUT_PASSTHROUGH   4

Definition at line 183 of file ivtv-driver.h.

#define OUT_UDMA_YUV   3

Definition at line 182 of file ivtv-driver.h.

#define OUT_YUV   2

Definition at line 181 of file ivtv-driver.h.

#define read_dec (   addr)    readl(itv->dec_mem + (u32)(addr))

Definition at line 822 of file ivtv-driver.h.

#define read_enc (   addr)    readl(itv->enc_mem + (u32)(addr))

Definition at line 817 of file ivtv-driver.h.

#define read_reg (   reg)    readl(itv->reg_mem + (reg))

Definition at line 812 of file ivtv-driver.h.

#define write_dec (   val,
  addr 
)    writel(val, itv->dec_mem + (u32)(addr))

Definition at line 823 of file ivtv-driver.h.

#define write_dec_sync (   val,
  addr 
)    do { write_dec(val, addr); read_dec(addr); } while (0)

Definition at line 824 of file ivtv-driver.h.

#define write_enc (   val,
  addr 
)    writel(val, itv->enc_mem + (u32)(addr))

Definition at line 818 of file ivtv-driver.h.

#define write_enc_sync (   val,
  addr 
)    do { write_enc(val, addr); read_enc(addr); } while (0)

Definition at line 819 of file ivtv-driver.h.

#define write_reg (   val,
  reg 
)    writel(val, itv->reg_mem + (reg))

Definition at line 813 of file ivtv-driver.h.

#define write_reg_sync (   val,
  reg 
)    do { write_reg(val, reg); read_reg(reg); } while (0)

Definition at line 814 of file ivtv-driver.h.

#define write_sync (   val,
  reg 
)    do { writel(val, reg); readl(reg); } while (0)

Definition at line 809 of file ivtv-driver.h.

Function Documentation

void ivtv_clear_irq_mask ( struct ivtv itv,
u32  mask 
)

Definition at line 314 of file ivtv-driver.c.

struct ivtv_stream* ivtv_get_output_stream ( struct ivtv itv)
read

Definition at line 338 of file ivtv-driver.c.

int ivtv_init_on_first_open ( struct ivtv itv)

Definition at line 1319 of file ivtv-driver.c.

int ivtv_msleep_timeout ( unsigned int  msecs,
int  intr 
)

Definition at line 361 of file ivtv-driver.c.

void ivtv_read_eeprom ( struct ivtv itv,
struct tveeprom tv 
)

Definition at line 406 of file ivtv-driver.c.

void ivtv_set_irq_mask ( struct ivtv itv,
u32  mask 
)

Definition at line 320 of file ivtv-driver.c.

int ivtv_set_output_mode ( struct ivtv itv,
int  mode 
)

Definition at line 326 of file ivtv-driver.c.

int ivtv_waitq ( wait_queue_head_t waitq)

Definition at line 350 of file ivtv-driver.c.

Variable Documentation

int ivtv_debug

Definition at line 137 of file ivtv-driver.c.

int(* ivtv_ext_init)(struct ivtv *)

Definition at line 72 of file ivtv-driver.c.

int ivtv_first_minor

Definition at line 69 of file ivtv-driver.c.