Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
ngene.h File Reference
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <asm/dma.h>
#include <linux/scatterlist.h>
#include <linux/dvb/frontend.h>
#include "dmxdev.h"
#include "dvbdev.h"
#include "dvb_demux.h"
#include "dvb_ca_en50221.h"
#include "dvb_frontend.h"
#include "dvb_ringbuffer.h"
#include "dvb_net.h"
#include "cxd2099.h"

Go to the source code of this file.

Data Structures

struct  SG_ADDR
 
struct  SHARED_MEMORY
 
struct  BUFFER_STREAM_RESULTS
 
struct  HW_SCATTER_GATHER_ELEMENT
 
struct  BUFFER_HEADER
 
struct  EVENT_BUFFER
 
struct  FW_HEADER
 
struct  FW_I2C_WRITE
 
struct  FW_I2C_CONTINUE_WRITE
 
struct  FW_I2C_READ
 
struct  FW_SPI_WRITE
 
struct  FW_SPI_READ
 
struct  FW_FWLOAD_PREPARE
 
struct  FW_FWLOAD_FINISH
 
struct  FW_STREAM_CONTROL
 
struct  FW_MEM_READ
 
struct  FW_MEM_WRITE
 
struct  FW_SFR_IRAM_READ
 
struct  FW_SFR_IRAM_WRITE
 
struct  FW_SET_GPIO_PIN
 
struct  FW_SET_GPIO_INT
 
struct  FW_SET_DEBUGMODE
 
struct  FW_CONFIGURE_BUFFERS
 
struct  FW_CONFIGURE_FREE_BUFFERS
 
struct  FW_CONFIGURE_UART
 
struct  FW_WRITE_UART
 
struct  ngene_command
 
struct  SBufferHeader
 
struct  SRingBufferDescriptor
 
struct  MICI_STREAMINFO
 
struct  mychip
 
struct  ngene_channel
 
struct  ngene_ci
 
struct  ngene
 
struct  ngene_info
 

Macros

#define DEVICE_NAME   "ngene"
 
#define NGENE_VID   0x18c3
 
#define NGENE_PID   0x0720
 
#define VIDEO_CAP_AVC   128
 
#define VIDEO_CAP_H264   128
 
#define VIDEO_CAP_VC1   256
 
#define VIDEO_CAP_WMV9   256
 
#define VIDEO_CAP_MPEG4   512
 
#define PROGRAM_ROM   0x0000
 
#define PROGRAM_SRAM   0x1000
 
#define PERIPHERALS0   0x8000
 
#define PERIPHERALS1   0x9000
 
#define SHARED_BUFFER   0xC000
 
#define HOST_TO_NGENE   (SHARED_BUFFER+0x0000)
 
#define NGENE_TO_HOST   (SHARED_BUFFER+0x0100)
 
#define NGENE_COMMAND   (SHARED_BUFFER+0x0200)
 
#define NGENE_COMMAND_HI   (SHARED_BUFFER+0x0204)
 
#define NGENE_STATUS   (SHARED_BUFFER+0x0208)
 
#define NGENE_STATUS_HI   (SHARED_BUFFER+0x020C)
 
#define NGENE_EVENT   (SHARED_BUFFER+0x0210)
 
#define NGENE_EVENT_HI   (SHARED_BUFFER+0x0214)
 
#define VARIABLES   (SHARED_BUFFER+0x0210)
 
#define NGENE_INT_COUNTS   (SHARED_BUFFER+0x0260)
 
#define NGENE_INT_ENABLE   (SHARED_BUFFER+0x0264)
 
#define NGENE_VBI_LINE_COUNT   (SHARED_BUFFER+0x0268)
 
#define BUFFER_GP_XMIT   (SHARED_BUFFER+0x0800)
 
#define BUFFER_GP_RECV   (SHARED_BUFFER+0x0900)
 
#define EEPROM_AREA   (SHARED_BUFFER+0x0A00)
 
#define SG_V_IN_1   (SHARED_BUFFER+0x0A80)
 
#define SG_VBI_1   (SHARED_BUFFER+0x0B00)
 
#define SG_A_IN_1   (SHARED_BUFFER+0x0B80)
 
#define SG_V_IN_2   (SHARED_BUFFER+0x0C00)
 
#define SG_VBI_2   (SHARED_BUFFER+0x0C80)
 
#define SG_A_IN_2   (SHARED_BUFFER+0x0D00)
 
#define SG_V_OUT   (SHARED_BUFFER+0x0D80)
 
#define SG_A_OUT2   (SHARED_BUFFER+0x0E00)
 
#define DATA_A_IN_1   (SHARED_BUFFER+0x0E80)
 
#define DATA_A_IN_2   (SHARED_BUFFER+0x0F00)
 
#define DATA_A_OUT   (SHARED_BUFFER+0x0F80)
 
#define DATA_V_IN_1   (SHARED_BUFFER+0x1000)
 
#define DATA_V_IN_2   (SHARED_BUFFER+0x2000)
 
#define DATA_V_OUT   (SHARED_BUFFER+0x3000)
 
#define DATA_FIFO_AREA   (SHARED_BUFFER+0x1000)
 
#define TIMESTAMPS   0xA000
 
#define SCRATCHPAD   0xA080
 
#define FORCE_INT   0xA088
 
#define FORCE_NMI   0xA090
 
#define INT_STATUS   0xA0A0
 
#define DEV_VER   0x9004
 
#define FW_DEBUG_DEFAULT   (PROGRAM_SRAM+0x00FF)
 
#define AUDIO_BLOCK_SIZE   256
 
#define TS_BLOCK_SIZE   256
 
#define NGENE_INTERFACE_VERSION   0x103
 
#define MAX_VIDEO_BUFFER_SIZE   (417792) /* 288*1440 rounded up to next page */
 
#define MAX_AUDIO_BUFFER_SIZE   (8192) /* Gives room for about [email protected] */
 
#define MAX_VBI_BUFFER_SIZE   (28672) /* 1144*18 rounded up to next page */
 
#define MAX_TS_BUFFER_SIZE   (98304) /* 512*188 rounded up to next page */
 
#define MAX_HDTV_BUFFER_SIZE
 
#define OVERFLOW_BUFFER_SIZE   (8192)
 
#define RING_SIZE_VIDEO   4
 
#define RING_SIZE_AUDIO   8
 
#define RING_SIZE_TS   8
 
#define NUM_SCATTER_GATHER_ENTRIES   8
 
#define MAX_DMA_LENGTH
 
#define EVENT_QUEUE_SIZE   16
 
#define SIZEOF_SBufferHeader   ((sizeof(struct SBufferHeader) + 63) & ~63)
 
#define MIXER_ADDR_TVTUNER   0
 
#define MIXER_ADDR_LAST   0
 
#define UART_RBUF_LEN   4096
 
#define TS_FILLER   0x6f
 
#define TSOUT_BUF_SIZE   (512*188*8)
 
#define TSIN_BUF_SIZE   (512*188*8)
 
#define AIN_BUF_SIZE   (128*1024)
 
#define VIN_BUF_SIZE   (4*1920*1080)
 
#define NGENE_APP   0
 
#define NGENE_TERRATEC   1
 
#define NGENE_SIDEWINDER   2
 
#define NGENE_RACER   3
 
#define NGENE_VIPER   4
 
#define NGENE_PYTHON   5
 
#define NGENE_VBOX_V1   6
 
#define NGENE_VBOX_V2   7
 
#define NGENE_IO_NONE   0
 
#define NGENE_IO_TV   1
 
#define NGENE_IO_HDTV   2
 
#define NGENE_IO_TSIN   4
 
#define NGENE_IO_TSOUT   8
 
#define NGENE_IO_AIN   16
 

Typedefs

typedef void *( IBufferExchange )(void *, void *, u32, u32, u32)
 
typedef voidrx_cb_t )(struct ngene *, u32, u8)
 
typedef voidtx_cb_t )(struct ngene *, u32)
 

Enumerations

enum  STREAM {
  STREAM_VIDEOIN1 = 0, STREAM_VIDEOIN2, STREAM_AUDIOIN1, STREAM_AUDIOIN2,
  STREAM_AUDIOOUT, MAX_STREAM
}
 
enum  SMODE_BITS {
  SMODE_AUDIO_SPDIF = 0x20, SMODE_AVSYNC = 0x10, SMODE_TRANSPORT_STREAM = 0x08, SMODE_AUDIO_CAPTURE = 0x04,
  SMODE_VBI_CAPTURE = 0x02, SMODE_VIDEO_CAPTURE = 0x01
}
 
enum  STREAM_FLAG_BITS {
  SFLAG_CHROMA_FORMAT_2COMP = 0x01, SFLAG_CHROMA_FORMAT_OFFSET = 0x00, SFLAG_ORDER_LUMA_CHROMA = 0x02, SFLAG_ORDER_CHROMA_LUMA = 0x00,
  SFLAG_COLORBAR = 0x04
}
 
enum  OPCODES {
  CMD_NOP = 0, CMD_FWLOAD_PREPARE = 0x01, CMD_FWLOAD_FINISH = 0x02, CMD_I2C_READ = 0x03,
  CMD_I2C_WRITE = 0x04, CMD_I2C_WRITE_NOSTOP = 0x05, CMD_I2C_CONTINUE_WRITE = 0x06, CMD_I2C_CONTINUE_WRITE_NOSTOP = 0x07,
  CMD_DEBUG_OUTPUT = 0x09, CMD_CONTROL = 0x10, CMD_CONFIGURE_BUFFER = 0x11, CMD_CONFIGURE_FREE_BUFFER = 0x12,
  CMD_SPI_READ = 0x13, CMD_SPI_WRITE = 0x14, CMD_MEM_READ = 0x20, CMD_MEM_WRITE = 0x21,
  CMD_SFR_READ = 0x22, CMD_SFR_WRITE = 0x23, CMD_IRAM_READ = 0x24, CMD_IRAM_WRITE = 0x25,
  CMD_SET_GPIO_PIN = 0x26, CMD_SET_GPIO_INT = 0x27, CMD_CONFIGURE_UART = 0x28, CMD_WRITE_UART = 0x29,
  MAX_CMD
}
 
enum  RESPONSES { OK = 0, ERROR = 1 }
 
enum  FSC_MODE_BITS {
  SMODE_LOOPBACK = 0x80, SMODE_AVLOOP = 0x40, _SMODE_AUDIO_SPDIF = 0x20, _SMODE_AVSYNC = 0x10,
  _SMODE_TRANSPORT_STREAM = 0x08, _SMODE_AUDIO_CAPTURE = 0x04, _SMODE_VBI_CAPTURE = 0x02, _SMODE_VIDEO_CAPTURE = 0x01
}
 
enum  _BUFFER_CONFIGS { BUFFER_CONFIG_4422 = 0, BUFFER_CONFIG_3333 = 1, BUFFER_CONFIG_8022 = 2, BUFFER_CONFIG_FW17 = 255 }
 
enum  _UART_CONFIG {
  _UART_BAUDRATE_19200 = 0, _UART_BAUDRATE_9600 = 1, _UART_BAUDRATE_4800 = 2, _UART_BAUDRATE_2400 = 3,
  _UART_RX_ENABLE = 0x40, _UART_TX_ENABLE = 0x80
}
 
enum  HWSTATE { HWSTATE_STOP, HWSTATE_STARTUP, HWSTATE_RUN, HWSTATE_PAUSE }
 
enum  KSSTATE { KSSTATE_STOP, KSSTATE_ACQUIRE, KSSTATE_PAUSE, KSSTATE_RUN }
 
enum  STREAMMODEFLAGS {
  StreamMode_NONE = 0, StreamMode_ANALOG = 1, StreamMode_TSIN = 2, StreamMode_HDTV = 4,
  StreamMode_TSOUT = 8
}
 
enum  BufferExchangeFlags {
  BEF_EVEN_FIELD = 0x00000001, BEF_CONTINUATION = 0x00000002, BEF_MORE_DATA = 0x00000004, BEF_OVERFLOW = 0x00000008,
  DF_SWAP32 = 0x00010000
}
 

Functions

struct SG_ADDR __attribute__ ((__packed__))
 
int __devinit ngene_probe (struct pci_dev *pci_dev, const struct pci_device_id *id)
 
void __devexit ngene_remove (struct pci_dev *pdev)
 
void ngene_shutdown (struct pci_dev *pdev)
 
int ngene_command (struct ngene *dev, struct ngene_command *com)
 
int ngene_command_gpio_set (struct ngene *dev, u8 select, u8 level)
 
void set_transfer (struct ngene_channel *chan, int state)
 
void FillTSBuffer (void *Buffer, int Length, u32 Flags)
 
int ngene_i2c_init (struct ngene *dev, int dev_nr)
 
voidtsout_exchange (void *priv, void *buf, u32 len, u32 clock, u32 flags)
 
voidtsin_exchange (void *priv, void *buf, u32 len, u32 clock, u32 flags)
 
int ngene_start_feed (struct dvb_demux_feed *dvbdmxfeed)
 
int ngene_stop_feed (struct dvb_demux_feed *dvbdmxfeed)
 
int my_dvb_dmx_ts_card_init (struct dvb_demux *dvbdemux, char *id, int(*start_feed)(struct dvb_demux_feed *), int(*stop_feed)(struct dvb_demux_feed *), void *priv)
 
int my_dvb_dmxdev_ts_card_init (struct dmxdev *dmxdev, struct dvb_demux *dvbdemux, struct dmx_frontend *hw_frontend, struct dmx_frontend *mem_frontend, struct dvb_adapter *dvb_adapter)
 

Variables

u64 start
 
u64 curr
 
u16 curr_ptr
 
u16 elements
 
u32 pad [3]
 
u32 HostToNgene [64]
 
u32 NgeneToHost [64]
 
u64 NgeneCommand
 
u64 NgeneStatus
 
u64 NgeneEvent
 
u8 pad1 [0xc260-0xc218]
 
u32 IntCounts
 
u32 IntEnable
 
u8 pad2 [0xd000-0xc268]
 
u32 Clock
 
u16 RemainingLines
 
u8 FieldCount
 
u8 Flags
 
u16 BlockCount
 
u8 Reserved [2]
 
u32 DTOUpdate
 
u64 Address
 
u32 Length
 
u64 Next
 
struct BUFFER_STREAM_RESULTS SR
 
u32 Number_of_entries_1
 
u32 Reserved5
 
u64 Address_of_first_entry_1
 
u32 Number_of_entries_2
 
u32 Reserved7
 
u64 Address_of_first_entry_2
 
u32 TimeStamp
 
u8 GPIOStatus
 
u8 UARTStatus
 
u8 RXCharacter
 
u8 EventStatus
 
enum OPCODES __attribute__
 
u8 Opcode
 
struct FW_HEADER hdr
 
u8 Device
 
u8 Data [250]
 
u8 ModeSelect
 
u8 Stream
 
u8 Control
 
u8 Mode
 
u8 SetupDataLen
 
u16 CaptureBlockCount
 
u64 Buffer_Address
 
u16 BytesPerVideoLine
 
u16 MaxLinesPerField
 
u16 MinLinesPerField
 
u16 Reserved_1
 
u16 BytesPerVBILine
 
u16 MaxVBILinesPerField
 
u16 MinVBILinesPerField
 
u16 SetupDataAddr
 
u8 SetupData [32]
 
u16 address
 
u8 data
 
u8 select
 
u8 debug_flags
 
u8 config
 
u8 UVI1_BufferLength
 
u8 UVI2_BufferLength
 
u8 TVO_BufferLength
 
u8 AUD1_BufferLength
 
u8 AUD2_BufferLength
 
u8 TVA_BufferLength
 
u8 UartControl
 
u32 in_len
 
u32 out_len
 
union {
   u32   raw [64]
 
   u8   raw8 [256]
 
   struct FW_HEADER   hdr
 
   struct FW_I2C_WRITE   I2CWrite
 
   struct FW_I2C_CONTINUE_WRITE   I2CContinueWrite
 
   struct FW_I2C_READ   I2CRead
 
   struct FW_STREAM_CONTROL   StreamControl
 
   struct FW_FWLOAD_PREPARE   FWLoadPrepare
 
   struct FW_FWLOAD_FINISH   FWLoadFinish
 
   struct FW_MEM_READ   MemoryRead
 
   struct FW_MEM_WRITE   MemoryWrite
 
   struct FW_SFR_IRAM_READ   SfrIramRead
 
   struct FW_SFR_IRAM_WRITE   SfrIramWrite
 
   struct FW_SPI_WRITE   SPIWrite
 
   struct FW_SPI_READ   SPIRead
 
   struct FW_SET_GPIO_PIN   SetGpioPin
 
   struct FW_SET_GPIO_INT   SetGpioInt
 
   struct FW_SET_DEBUGMODE   SetDebugMode
 
   struct FW_CONFIGURE_BUFFERS   ConfigureBuffers
 
   struct FW_CONFIGURE_FREE_BUFFERS   ConfigureFreeBuffers
 
   struct FW_CONFIGURE_UART   ConfigureUart
 
   struct FW_WRITE_UART   WriteUart
 
cmd
 
struct dvb_device ngene_dvbdev_ci
 

Macro Definition Documentation

#define AIN_BUF_SIZE   (128*1024)

Definition at line 802 of file ngene.h.

#define AUDIO_BLOCK_SIZE   256

Definition at line 353 of file ngene.h.

#define BUFFER_GP_RECV   (SHARED_BUFFER+0x0900)

Definition at line 105 of file ngene.h.

#define BUFFER_GP_XMIT   (SHARED_BUFFER+0x0800)

Definition at line 104 of file ngene.h.

#define DATA_A_IN_1   (SHARED_BUFFER+0x0E80)

Definition at line 117 of file ngene.h.

#define DATA_A_IN_2   (SHARED_BUFFER+0x0F00)

Definition at line 118 of file ngene.h.

#define DATA_A_OUT   (SHARED_BUFFER+0x0F80)

Definition at line 119 of file ngene.h.

#define DATA_FIFO_AREA   (SHARED_BUFFER+0x1000)

Definition at line 124 of file ngene.h.

#define DATA_V_IN_1   (SHARED_BUFFER+0x1000)

Definition at line 120 of file ngene.h.

#define DATA_V_IN_2   (SHARED_BUFFER+0x2000)

Definition at line 121 of file ngene.h.

#define DATA_V_OUT   (SHARED_BUFFER+0x3000)

Definition at line 122 of file ngene.h.

#define DEV_VER   0x9004

Definition at line 132 of file ngene.h.

#define DEVICE_NAME   "ngene"

Definition at line 45 of file ngene.h.

#define EEPROM_AREA   (SHARED_BUFFER+0x0A00)

Definition at line 106 of file ngene.h.

#define EVENT_QUEUE_SIZE   16

Definition at line 491 of file ngene.h.

#define FORCE_INT   0xA088

Definition at line 128 of file ngene.h.

#define FORCE_NMI   0xA090

Definition at line 129 of file ngene.h.

#define FW_DEBUG_DEFAULT   (PROGRAM_SRAM+0x00FF)

Definition at line 134 of file ngene.h.

#define HOST_TO_NGENE   (SHARED_BUFFER+0x0000)

Definition at line 90 of file ngene.h.

#define INT_STATUS   0xA0A0

Definition at line 130 of file ngene.h.

#define MAX_AUDIO_BUFFER_SIZE   (8192) /* Gives room for about [email protected] */

Definition at line 469 of file ngene.h.

#define MAX_DMA_LENGTH
Value:
RING_SIZE_VIDEO * 2) + \
(RING_SIZE_TS * PAGE_SIZE * 4) + \
8 * PAGE_SIZE + OVERFLOW_BUFFER_SIZE + PAGE_SIZE)

Definition at line 482 of file ngene.h.

#define MAX_HDTV_BUFFER_SIZE
Value:
(2080768) /* 541*1920*2 rounded up to next page
Max: (1920x1080i60) */

Definition at line 472 of file ngene.h.

#define MAX_TS_BUFFER_SIZE   (98304) /* 512*188 rounded up to next page */

Definition at line 471 of file ngene.h.

#define MAX_VBI_BUFFER_SIZE   (28672) /* 1144*18 rounded up to next page */

Definition at line 470 of file ngene.h.

#define MAX_VIDEO_BUFFER_SIZE   (417792) /* 288*1440 rounded up to next page */

Definition at line 468 of file ngene.h.

#define MIXER_ADDR_LAST   0

Definition at line 576 of file ngene.h.

#define MIXER_ADDR_TVTUNER   0

Definition at line 575 of file ngene.h.

#define NGENE_APP   0

Definition at line 818 of file ngene.h.

#define NGENE_COMMAND   (SHARED_BUFFER+0x0200)

Definition at line 92 of file ngene.h.

#define NGENE_COMMAND_HI   (SHARED_BUFFER+0x0204)

Definition at line 93 of file ngene.h.

#define NGENE_EVENT   (SHARED_BUFFER+0x0210)

Definition at line 96 of file ngene.h.

#define NGENE_EVENT_HI   (SHARED_BUFFER+0x0214)

Definition at line 97 of file ngene.h.

#define NGENE_INT_COUNTS   (SHARED_BUFFER+0x0260)

Definition at line 100 of file ngene.h.

#define NGENE_INT_ENABLE   (SHARED_BUFFER+0x0264)

Definition at line 101 of file ngene.h.

#define NGENE_INTERFACE_VERSION   0x103

Definition at line 467 of file ngene.h.

#define NGENE_IO_AIN   16

Definition at line 837 of file ngene.h.

#define NGENE_IO_HDTV   2

Definition at line 834 of file ngene.h.

#define NGENE_IO_NONE   0

Definition at line 832 of file ngene.h.

#define NGENE_IO_TSIN   4

Definition at line 835 of file ngene.h.

#define NGENE_IO_TSOUT   8

Definition at line 836 of file ngene.h.

#define NGENE_IO_TV   1

Definition at line 833 of file ngene.h.

#define NGENE_PID   0x0720

Definition at line 48 of file ngene.h.

#define NGENE_PYTHON   5

Definition at line 823 of file ngene.h.

#define NGENE_RACER   3

Definition at line 821 of file ngene.h.

#define NGENE_SIDEWINDER   2

Definition at line 820 of file ngene.h.

#define NGENE_STATUS   (SHARED_BUFFER+0x0208)

Definition at line 94 of file ngene.h.

#define NGENE_STATUS_HI   (SHARED_BUFFER+0x020C)

Definition at line 95 of file ngene.h.

#define NGENE_TERRATEC   1

Definition at line 819 of file ngene.h.

#define NGENE_TO_HOST   (SHARED_BUFFER+0x0100)

Definition at line 91 of file ngene.h.

#define NGENE_VBI_LINE_COUNT   (SHARED_BUFFER+0x0268)

Definition at line 102 of file ngene.h.

#define NGENE_VBOX_V1   6

Definition at line 824 of file ngene.h.

#define NGENE_VBOX_V2   7

Definition at line 825 of file ngene.h.

#define NGENE_VID   0x18c3

Definition at line 47 of file ngene.h.

#define NGENE_VIPER   4

Definition at line 822 of file ngene.h.

#define NUM_SCATTER_GATHER_ENTRIES   8

Definition at line 480 of file ngene.h.

#define OVERFLOW_BUFFER_SIZE   (8192)

Definition at line 474 of file ngene.h.

#define PERIPHERALS0   0x8000

Definition at line 86 of file ngene.h.

#define PERIPHERALS1   0x9000

Definition at line 87 of file ngene.h.

#define PROGRAM_ROM   0x0000

Definition at line 84 of file ngene.h.

#define PROGRAM_SRAM   0x1000

Definition at line 85 of file ngene.h.

#define RING_SIZE_AUDIO   8

Definition at line 477 of file ngene.h.

#define RING_SIZE_TS   8

Definition at line 478 of file ngene.h.

#define RING_SIZE_VIDEO   4

Definition at line 476 of file ngene.h.

#define SCRATCHPAD   0xA080

Definition at line 127 of file ngene.h.

#define SG_A_IN_1   (SHARED_BUFFER+0x0B80)

Definition at line 110 of file ngene.h.

#define SG_A_IN_2   (SHARED_BUFFER+0x0D00)

Definition at line 113 of file ngene.h.

#define SG_A_OUT2   (SHARED_BUFFER+0x0E00)

Definition at line 115 of file ngene.h.

#define SG_V_IN_1   (SHARED_BUFFER+0x0A80)

Definition at line 108 of file ngene.h.

#define SG_V_IN_2   (SHARED_BUFFER+0x0C00)

Definition at line 111 of file ngene.h.

#define SG_V_OUT   (SHARED_BUFFER+0x0D80)

Definition at line 114 of file ngene.h.

#define SG_VBI_1   (SHARED_BUFFER+0x0B00)

Definition at line 109 of file ngene.h.

#define SG_VBI_2   (SHARED_BUFFER+0x0C80)

Definition at line 112 of file ngene.h.

#define SHARED_BUFFER   0xC000

Definition at line 88 of file ngene.h.

#define SIZEOF_SBufferHeader   ((sizeof(struct SBufferHeader) + 63) & ~63)

Definition at line 505 of file ngene.h.

#define TIMESTAMPS   0xA000

Definition at line 126 of file ngene.h.

#define TS_BLOCK_SIZE   256

Definition at line 354 of file ngene.h.

#define TS_FILLER   0x6f

Definition at line 791 of file ngene.h.

#define TSIN_BUF_SIZE   (512*188*8)

Definition at line 798 of file ngene.h.

#define TSOUT_BUF_SIZE   (512*188*8)

Definition at line 794 of file ngene.h.

#define UART_RBUF_LEN   4096

Definition at line 787 of file ngene.h.

#define VARIABLES   (SHARED_BUFFER+0x0210)

Definition at line 98 of file ngene.h.

#define VIDEO_CAP_AVC   128

Definition at line 51 of file ngene.h.

#define VIDEO_CAP_H264   128

Definition at line 52 of file ngene.h.

#define VIDEO_CAP_MPEG4   512

Definition at line 55 of file ngene.h.

#define VIDEO_CAP_VC1   256

Definition at line 53 of file ngene.h.

#define VIDEO_CAP_WMV9   256

Definition at line 54 of file ngene.h.

#define VIN_BUF_SIZE   (4*1920*1080)

Definition at line 807 of file ngene.h.

Typedef Documentation

typedef void*( IBufferExchange)(void *, void *, u32, u32, u32)

Definition at line 554 of file ngene.h.

typedef void( rx_cb_t)(struct ngene *, u32, u8)

Definition at line 733 of file ngene.h.

typedef void( tx_cb_t)(struct ngene *, u32)

Definition at line 734 of file ngene.h.

Enumeration Type Documentation

Enumerator:
BUFFER_CONFIG_4422 
BUFFER_CONFIG_3333 
BUFFER_CONFIG_8022 
BUFFER_CONFIG_FW17 

Definition at line 398 of file ngene.h.

Enumerator:
_UART_BAUDRATE_19200 
_UART_BAUDRATE_9600 
_UART_BAUDRATE_4800 
_UART_BAUDRATE_2400 
_UART_RX_ENABLE 
_UART_TX_ENABLE 

Definition at line 423 of file ngene.h.

Enumerator:
BEF_EVEN_FIELD 
BEF_CONTINUATION 
BEF_MORE_DATA 
BEF_OVERFLOW 
DF_SWAP32 

Definition at line 546 of file ngene.h.

Enumerator:
SMODE_LOOPBACK 
SMODE_AVLOOP 
_SMODE_AUDIO_SPDIF 
_SMODE_AVSYNC 
_SMODE_TRANSPORT_STREAM 
_SMODE_AUDIO_CAPTURE 
_SMODE_VBI_CAPTURE 
_SMODE_VIDEO_CAPTURE 

Definition at line 314 of file ngene.h.

enum HWSTATE
Enumerator:
HWSTATE_STOP 
HWSTATE_STARTUP 
HWSTATE_RUN 
HWSTATE_PAUSE 

Definition at line 507 of file ngene.h.

enum KSSTATE
Enumerator:
KSSTATE_STOP 
KSSTATE_ACQUIRE 
KSSTATE_PAUSE 
KSSTATE_RUN 

Definition at line 514 of file ngene.h.

enum OPCODES
Enumerator:
CMD_NOP 
CMD_FWLOAD_PREPARE 
CMD_FWLOAD_FINISH 
CMD_I2C_READ 
CMD_I2C_WRITE 
CMD_I2C_WRITE_NOSTOP 
CMD_I2C_CONTINUE_WRITE 
CMD_I2C_CONTINUE_WRITE_NOSTOP 
CMD_DEBUG_OUTPUT 
CMD_CONTROL 
CMD_CONFIGURE_BUFFER 
CMD_CONFIGURE_FREE_BUFFER 
CMD_SPI_READ 
CMD_SPI_WRITE 
CMD_MEM_READ 
CMD_MEM_WRITE 
CMD_SFR_READ 
CMD_SFR_WRITE 
CMD_IRAM_READ 
CMD_IRAM_WRITE 
CMD_SET_GPIO_PIN 
CMD_SET_GPIO_INT 
CMD_CONFIGURE_UART 
CMD_WRITE_UART 
MAX_CMD 

Definition at line 210 of file ngene.h.

enum RESPONSES
Enumerator:
OK 
ERROR 

Definition at line 243 of file ngene.h.

enum SMODE_BITS
Enumerator:
SMODE_AUDIO_SPDIF 
SMODE_AVSYNC 
SMODE_TRANSPORT_STREAM 
SMODE_AUDIO_CAPTURE 
SMODE_VBI_CAPTURE 
SMODE_VIDEO_CAPTURE 

Definition at line 67 of file ngene.h.

enum STREAM
Enumerator:
STREAM_VIDEOIN1 
STREAM_VIDEOIN2 
STREAM_AUDIOIN1 
STREAM_AUDIOIN2 
STREAM_AUDIOOUT 
MAX_STREAM 

Definition at line 58 of file ngene.h.

Enumerator:
SFLAG_CHROMA_FORMAT_2COMP 
SFLAG_CHROMA_FORMAT_OFFSET 
SFLAG_ORDER_LUMA_CHROMA 
SFLAG_ORDER_CHROMA_LUMA 
SFLAG_COLORBAR 

Definition at line 76 of file ngene.h.

Enumerator:
StreamMode_NONE 
StreamMode_ANALOG 
StreamMode_TSIN 
StreamMode_HDTV 
StreamMode_TSOUT 

Definition at line 536 of file ngene.h.

Function Documentation

struct SG_ADDR __attribute__ ( (__packed__)  )
read

Definition at line 85 of file mpc512x_dma.c.

void FillTSBuffer ( void Buffer,
int  Length,
u32  Flags 
)

Definition at line 500 of file ngene-core.c.

int my_dvb_dmx_ts_card_init ( struct dvb_demux dvbdemux,
char id,
int(*)(struct dvb_demux_feed *)  start_feed,
int(*)(struct dvb_demux_feed *)  stop_feed,
void priv 
)

Definition at line 223 of file ngene-dvb.c.

int my_dvb_dmxdev_ts_card_init ( struct dmxdev dmxdev,
struct dvb_demux dvbdemux,
struct dmx_frontend hw_frontend,
struct dmx_frontend mem_frontend,
struct dvb_adapter dvb_adapter 
)

Definition at line 241 of file ngene-dvb.c.

Definition at line 341 of file ngene-core.c.

int ngene_command_gpio_set ( struct ngene dev,
u8  select,
u8  level 
)

Definition at line 417 of file ngene-core.c.

int ngene_i2c_init ( struct ngene dev,
int  dev_nr 
)

Definition at line 162 of file ngene-i2c.c.

int __devinit ngene_probe ( struct pci_dev pci_dev,
const struct pci_device_id id 
)

Definition at line 1655 of file ngene-core.c.

void __devexit ngene_remove ( struct pci_dev pdev)

Definition at line 1639 of file ngene-core.c.

void ngene_shutdown ( struct pci_dev pdev)

Definition at line 1623 of file ngene-core.c.

int ngene_start_feed ( struct dvb_demux_feed dvbdmxfeed)

Definition at line 196 of file ngene-dvb.c.

int ngene_stop_feed ( struct dvb_demux_feed dvbdmxfeed)

Definition at line 209 of file ngene-dvb.c.

void set_transfer ( struct ngene_channel chan,
int  state 
)

Definition at line 709 of file ngene-core.c.

void* tsin_exchange ( void priv,
void buf,
u32  len,
u32  clock,
u32  flags 
)

Definition at line 131 of file ngene-dvb.c.

void* tsout_exchange ( void priv,
void buf,
u32  len,
u32  clock,
u32  flags 
)

Definition at line 174 of file ngene-dvb.c.

Variable Documentation

u16 Address

Definition at line 185 of file ngene.h.

Definition at line 361 of file ngene.h.

u64 Address_of_first_entry_1

Definition at line 203 of file ngene.h.

u64 Address_of_first_entry_2

Definition at line 207 of file ngene.h.

u8 AUD1_BufferLength

Definition at line 421 of file ngene.h.

u8 AUD2_BufferLength

Definition at line 422 of file ngene.h.

u16 BlockCount

Definition at line 185 of file ngene.h.

u64 Buffer_Address

Definition at line 360 of file ngene.h.

u16 BytesPerVBILine

Definition at line 365 of file ngene.h.

u16 BytesPerVideoLine

Definition at line 361 of file ngene.h.

u16 CaptureBlockCount

Definition at line 358 of file ngene.h.

u32 Clock

Definition at line 179 of file ngene.h.

union { ... } cmd

Definition at line 398 of file ngene.h.

struct FW_CONFIGURE_BUFFERS ConfigureBuffers

Definition at line 487 of file ngene.h.

struct FW_CONFIGURE_FREE_BUFFERS ConfigureFreeBuffers

Definition at line 488 of file ngene.h.

struct FW_CONFIGURE_UART ConfigureUart

Definition at line 489 of file ngene.h.

u8 Control

Definition at line 354 of file ngene.h.

u64 curr

Definition at line 144 of file ngene.h.

u16 curr_ptr

Definition at line 145 of file ngene.h.

u8 Data[252]

Definition at line 260 of file ngene.h.

Definition at line 368 of file ngene.h.

u8 debug_flags

Definition at line 393 of file ngene.h.

u8 Device

Definition at line 259 of file ngene.h.

u32 DTOUpdate

Definition at line 187 of file ngene.h.

u16 elements

Definition at line 146 of file ngene.h.

u8 EventStatus

Definition at line 211 of file ngene.h.

u8 FieldCount

Definition at line 182 of file ngene.h.

__le16 Flags

Definition at line 183 of file ngene.h.

struct FW_FWLOAD_FINISH FWLoadFinish

Definition at line 477 of file ngene.h.

struct FW_FWLOAD_PREPARE FWLoadPrepare

Definition at line 476 of file ngene.h.

u8 GPIOStatus

Definition at line 208 of file ngene.h.

Definition at line 258 of file ngene.h.

u32 HostToNgene[64]

Definition at line 168 of file ngene.h.

struct FW_I2C_CONTINUE_WRITE I2CContinueWrite

Definition at line 473 of file ngene.h.

Definition at line 474 of file ngene.h.

struct FW_I2C_WRITE I2CWrite

Definition at line 472 of file ngene.h.

u32 in_len

Definition at line 466 of file ngene.h.

u32 IntCounts

Definition at line 182 of file ngene.h.

u32 IntEnable

Definition at line 183 of file ngene.h.

__le16 Length

Definition at line 186 of file ngene.h.

u16 MaxLinesPerField

Definition at line 362 of file ngene.h.

u16 MaxVBILinesPerField

Definition at line 366 of file ngene.h.

struct FW_MEM_READ MemoryRead

Definition at line 478 of file ngene.h.

struct FW_MEM_WRITE MemoryWrite

Definition at line 479 of file ngene.h.

u16 MinLinesPerField

Definition at line 363 of file ngene.h.

u16 MinVBILinesPerField

Definition at line 367 of file ngene.h.

Definition at line 355 of file ngene.h.

u8 ModeSelect

Definition at line 276 of file ngene.h.

u64 Next

Definition at line 198 of file ngene.h.

struct dvb_device ngene_dvbdev_ci

Definition at line 99 of file ngene-dvb.c.

u64 NgeneCommand

Definition at line 174 of file ngene.h.

u64 NgeneEvent

Definition at line 176 of file ngene.h.

u64 NgeneStatus

Definition at line 175 of file ngene.h.

u32 NgeneToHost[64]

Definition at line 171 of file ngene.h.

u32 Number_of_entries_1

Definition at line 201 of file ngene.h.

u32 Number_of_entries_2

Definition at line 205 of file ngene.h.

u8 Opcode

Definition at line 252 of file ngene.h.

u32 out_len

Definition at line 467 of file ngene.h.

u32 pad[3]

Definition at line 147 of file ngene.h.

u8 pad1[0xc260-0xc218]

Definition at line 179 of file ngene.h.

u8 pad2[0xd000-0xc268]

Definition at line 186 of file ngene.h.

u32 raw[64]

Definition at line 469 of file ngene.h.

u8 raw8[256]

Definition at line 470 of file ngene.h.

u16 RemainingLines

Definition at line 180 of file ngene.h.

u32 Reserved[2]

Definition at line 186 of file ngene.h.

u32 Reserved5

Definition at line 202 of file ngene.h.

u32 Reserved7

Definition at line 206 of file ngene.h.

u16 Reserved_1

Definition at line 364 of file ngene.h.

u8 RXCharacter

Definition at line 210 of file ngene.h.

u8 select

Definition at line 383 of file ngene.h.

struct FW_SET_DEBUGMODE SetDebugMode

Definition at line 486 of file ngene.h.

struct FW_SET_GPIO_INT SetGpioInt

Definition at line 485 of file ngene.h.

struct FW_SET_GPIO_PIN SetGpioPin

Definition at line 484 of file ngene.h.

u8 SetupData[32]

Definition at line 369 of file ngene.h.

u16 SetupDataAddr

Definition at line 368 of file ngene.h.

u8 SetupDataLen

Definition at line 356 of file ngene.h.

struct FW_SFR_IRAM_READ SfrIramRead

Definition at line 480 of file ngene.h.

struct FW_SFR_IRAM_WRITE SfrIramWrite

Definition at line 481 of file ngene.h.

Definition at line 483 of file ngene.h.

struct FW_SPI_WRITE SPIWrite

Definition at line 482 of file ngene.h.

Definition at line 199 of file ngene.h.

u64 start

Definition at line 143 of file ngene.h.

u8 Stream

Definition at line 353 of file ngene.h.

struct FW_STREAM_CONTROL StreamControl

Definition at line 475 of file ngene.h.

u32 TimeStamp

Definition at line 207 of file ngene.h.

u8 TVA_BufferLength

Definition at line 423 of file ngene.h.

u8 TVO_BufferLength

Definition at line 420 of file ngene.h.

u8 UartControl

Definition at line 423 of file ngene.h.

u8 UARTStatus

Definition at line 209 of file ngene.h.

u8 UVI1_BufferLength

Definition at line 418 of file ngene.h.

u8 UVI2_BufferLength

Definition at line 419 of file ngene.h.

struct FW_WRITE_UART WriteUart

Definition at line 490 of file ngene.h.