Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
cx88-blackbird.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/firmware.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
#include <media/cx2341x.h>
#include "cx88.h"

Go to the source code of this file.

Macros

#define dprintk(level, fmt, arg...)
 
#define BLACKBIRD_FIRM_IMAGE_SIZE   376836
 
#define IVTV_CMD_HW_BLOCKS_RST   0xFFFFFFFF
 
#define IVTV_API_STD_TIMEOUT   500
 
#define IVTV_REG_ENC_SDRAM_REFRESH   (0x07F8 /*| IVTV_REG_OFFSET*/)
 
#define IVTV_REG_ENC_SDRAM_PRECHARGE   (0x07FC /*| IVTV_REG_OFFSET*/)
 
#define IVTV_REG_SPU   (0x9050 /*| IVTV_REG_OFFSET*/)
 
#define IVTV_REG_HW_BLOCKS   (0x9054 /*| IVTV_REG_OFFSET*/)
 
#define IVTV_REG_VPU   (0x9058 /*| IVTV_REG_OFFSET*/)
 
#define IVTV_REG_APU   (0xA064 /*| IVTV_REG_OFFSET*/)
 
#define P1_MDATA0   0x390000
 
#define P1_MDATA1   0x390001
 
#define P1_MDATA2   0x390002
 
#define P1_MDATA3   0x390003
 
#define P1_MADDR2   0x390004
 
#define P1_MADDR1   0x390005
 
#define P1_MADDR0   0x390006
 
#define P1_RDATA0   0x390008
 
#define P1_RDATA1   0x390009
 
#define P1_RDATA2   0x39000A
 
#define P1_RDATA3   0x39000B
 
#define P1_RADDR0   0x39000C
 
#define P1_RADDR1   0x39000D
 
#define P1_RRDWR   0x39000E
 

Enumerations

enum  blackbird_capture_type { BLACKBIRD_MPEG_CAPTURE, BLACKBIRD_RAW_CAPTURE, BLACKBIRD_RAW_PASSTHRU_CAPTURE }
 
enum  blackbird_capture_bits {
  BLACKBIRD_RAW_BITS_NONE = 0x00, BLACKBIRD_RAW_BITS_YUV_CAPTURE = 0x01, BLACKBIRD_RAW_BITS_PCM_CAPTURE = 0x02, BLACKBIRD_RAW_BITS_VBI_CAPTURE = 0x04,
  BLACKBIRD_RAW_BITS_PASSTHRU_CAPTURE = 0x08, BLACKBIRD_RAW_BITS_TO_HOST_CAPTURE = 0x10
}
 
enum  blackbird_capture_end { BLACKBIRD_END_AT_GOP, BLACKBIRD_END_NOW }
 
enum  blackbird_framerate { BLACKBIRD_FRAMERATE_NTSC_30, BLACKBIRD_FRAMERATE_PAL_25 }
 
enum  blackbird_stream_port { BLACKBIRD_OUTPUT_PORT_MEMORY, BLACKBIRD_OUTPUT_PORT_STREAMING, BLACKBIRD_OUTPUT_PORT_SERIAL }
 
enum  blackbird_data_xfer_status { BLACKBIRD_MORE_BUFFERS_FOLLOW, BLACKBIRD_LAST_BUFFER }
 
enum  blackbird_picture_mask { BLACKBIRD_PICTURE_MASK_NONE, BLACKBIRD_PICTURE_MASK_I_FRAMES, BLACKBIRD_PICTURE_MASK_I_P_FRAMES = 0x3, BLACKBIRD_PICTURE_MASK_ALL_FRAMES = 0x7 }
 
enum  blackbird_vbi_mode_bits { BLACKBIRD_VBI_BITS_SLICED, BLACKBIRD_VBI_BITS_RAW }
 
enum  blackbird_vbi_insertion_bits {
  BLACKBIRD_VBI_BITS_INSERT_IN_XTENSION_USR_DATA, BLACKBIRD_VBI_BITS_INSERT_IN_PRIVATE_PACKETS = 0x1 << 1, BLACKBIRD_VBI_BITS_SEPARATE_STREAM = 0x2 << 1, BLACKBIRD_VBI_BITS_SEPARATE_STREAM_USR_DATA = 0x4 << 1,
  BLACKBIRD_VBI_BITS_SEPARATE_STREAM_PRV_DATA = 0x5 << 1
}
 
enum  blackbird_dma_unit { BLACKBIRD_DMA_BYTES, BLACKBIRD_DMA_FRAMES }
 
enum  blackbird_dma_transfer_status_bits { BLACKBIRD_DMA_TRANSFER_BITS_DONE = 0x01, BLACKBIRD_DMA_TRANSFER_BITS_ERROR = 0x04, BLACKBIRD_DMA_TRANSFER_BITS_LL_ERROR = 0x10 }
 
enum  blackbird_pause { BLACKBIRD_PAUSE_ENCODING, BLACKBIRD_RESUME_ENCODING }
 
enum  blackbird_copyright { BLACKBIRD_COPYRIGHT_OFF, BLACKBIRD_COPYRIGHT_ON }
 
enum  blackbird_notification_type { BLACKBIRD_NOTIFICATION_REFRESH }
 
enum  blackbird_notification_status { BLACKBIRD_NOTIFICATION_OFF, BLACKBIRD_NOTIFICATION_ON }
 
enum  blackbird_notification_mailbox { BLACKBIRD_NOTIFICATION_NO_MAILBOX = -1 }
 
enum  blackbird_field1_lines { BLACKBIRD_FIELD1_SAA7114 = 0x00EF, BLACKBIRD_FIELD1_SAA7115 = 0x00F0, BLACKBIRD_FIELD1_MICRONAS = 0x0105 }
 
enum  blackbird_field2_lines { BLACKBIRD_FIELD2_SAA7114 = 0x00EF, BLACKBIRD_FIELD2_SAA7115 = 0x00F0, BLACKBIRD_FIELD2_MICRONAS = 0x0106 }
 
enum  blackbird_custom_data_type { BLACKBIRD_CUSTOM_EXTENSION_USR_DATA, BLACKBIRD_CUSTOM_PRIVATE_PACKET }
 
enum  blackbird_mute { BLACKBIRD_UNMUTE, BLACKBIRD_MUTE }
 
enum  blackbird_mute_video_mask { BLACKBIRD_MUTE_VIDEO_V_MASK = 0x0000FF00, BLACKBIRD_MUTE_VIDEO_U_MASK = 0x00FF0000, BLACKBIRD_MUTE_VIDEO_Y_MASK = 0xFF000000 }
 
enum  blackbird_mute_video_shift { BLACKBIRD_MUTE_VIDEO_V_SHIFT = 8, BLACKBIRD_MUTE_VIDEO_U_SHIFT = 16, BLACKBIRD_MUTE_VIDEO_Y_SHIFT = 24 }
 

Functions

 MODULE_DESCRIPTION ("driver for cx2388x/cx23416 based mpeg encoder cards")
 
 MODULE_AUTHOR ("Jelle Foks <[email protected]>, Gerd Knorr <[email protected]> [SuSE Labs]")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (CX88_VERSION)
 
 module_param (mpegbufs, int, 0644)
 
 MODULE_PARM_DESC (mpegbufs,"number of mpeg buffers, range 2-32")
 
 module_param (debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"enable debug messages [blackbird]")
 
 module_init (blackbird_init)
 
 module_exit (blackbird_fini)
 
 module_param_named (video_debug, cx8802_mpeg_template.debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"enable debug messages [video]")
 

Macro Definition Documentation

#define BLACKBIRD_FIRM_IMAGE_SIZE   376836

Definition at line 62 of file cx88-blackbird.c.

#define dprintk (   level,
  fmt,
  arg... 
)
Value:
if (debug >= level) \
printk(KERN_DEBUG "%s/2-bb: " fmt, dev->core->name , ## arg)

Definition at line 56 of file cx88-blackbird.c.

#define IVTV_API_STD_TIMEOUT   500

Definition at line 69 of file cx88-blackbird.c.

#define IVTV_CMD_HW_BLOCKS_RST   0xFFFFFFFF

Definition at line 66 of file cx88-blackbird.c.

#define IVTV_REG_APU   (0xA064 /*| IVTV_REG_OFFSET*/)

Definition at line 180 of file cx88-blackbird.c.

#define IVTV_REG_ENC_SDRAM_PRECHARGE   (0x07FC /*| IVTV_REG_OFFSET*/)

Definition at line 176 of file cx88-blackbird.c.

#define IVTV_REG_ENC_SDRAM_REFRESH   (0x07F8 /*| IVTV_REG_OFFSET*/)

Definition at line 175 of file cx88-blackbird.c.

#define IVTV_REG_HW_BLOCKS   (0x9054 /*| IVTV_REG_OFFSET*/)

Definition at line 178 of file cx88-blackbird.c.

#define IVTV_REG_SPU   (0x9050 /*| IVTV_REG_OFFSET*/)

Definition at line 177 of file cx88-blackbird.c.

#define IVTV_REG_VPU   (0x9058 /*| IVTV_REG_OFFSET*/)

Definition at line 179 of file cx88-blackbird.c.

#define P1_MADDR0   0x390006

Definition at line 209 of file cx88-blackbird.c.

#define P1_MADDR1   0x390005

Definition at line 208 of file cx88-blackbird.c.

#define P1_MADDR2   0x390004

Definition at line 207 of file cx88-blackbird.c.

#define P1_MDATA0   0x390000

Definition at line 203 of file cx88-blackbird.c.

#define P1_MDATA1   0x390001

Definition at line 204 of file cx88-blackbird.c.

#define P1_MDATA2   0x390002

Definition at line 205 of file cx88-blackbird.c.

#define P1_MDATA3   0x390003

Definition at line 206 of file cx88-blackbird.c.

#define P1_RADDR0   0x39000C

Definition at line 214 of file cx88-blackbird.c.

#define P1_RADDR1   0x39000D

Definition at line 215 of file cx88-blackbird.c.

#define P1_RDATA0   0x390008

Definition at line 210 of file cx88-blackbird.c.

#define P1_RDATA1   0x390009

Definition at line 211 of file cx88-blackbird.c.

#define P1_RDATA2   0x39000A

Definition at line 212 of file cx88-blackbird.c.

#define P1_RDATA3   0x39000B

Definition at line 213 of file cx88-blackbird.c.

#define P1_RRDWR   0x39000E

Definition at line 216 of file cx88-blackbird.c.

Enumeration Type Documentation

Enumerator:
BLACKBIRD_RAW_BITS_NONE 
BLACKBIRD_RAW_BITS_YUV_CAPTURE 
BLACKBIRD_RAW_BITS_PCM_CAPTURE 
BLACKBIRD_RAW_BITS_VBI_CAPTURE 
BLACKBIRD_RAW_BITS_PASSTHRU_CAPTURE 
BLACKBIRD_RAW_BITS_TO_HOST_CAPTURE 

Definition at line 76 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_END_AT_GOP 
BLACKBIRD_END_NOW 

Definition at line 84 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_MPEG_CAPTURE 
BLACKBIRD_RAW_CAPTURE 
BLACKBIRD_RAW_PASSTHRU_CAPTURE 

Definition at line 71 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_COPYRIGHT_OFF 
BLACKBIRD_COPYRIGHT_ON 

Definition at line 131 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_CUSTOM_EXTENSION_USR_DATA 
BLACKBIRD_CUSTOM_PRIVATE_PACKET 

Definition at line 155 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_MORE_BUFFERS_FOLLOW 
BLACKBIRD_LAST_BUFFER 

Definition at line 97 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_DMA_TRANSFER_BITS_DONE 
BLACKBIRD_DMA_TRANSFER_BITS_ERROR 
BLACKBIRD_DMA_TRANSFER_BITS_LL_ERROR 

Definition at line 122 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_DMA_BYTES 
BLACKBIRD_DMA_FRAMES 

Definition at line 118 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_FIELD1_SAA7114 
BLACKBIRD_FIELD1_SAA7115 
BLACKBIRD_FIELD1_MICRONAS 

Definition at line 145 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_FIELD2_SAA7114 
BLACKBIRD_FIELD2_SAA7115 
BLACKBIRD_FIELD2_MICRONAS 

Definition at line 150 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_FRAMERATE_NTSC_30 
BLACKBIRD_FRAMERATE_PAL_25 

Definition at line 88 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_UNMUTE 
BLACKBIRD_MUTE 

Definition at line 159 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_MUTE_VIDEO_V_MASK 
BLACKBIRD_MUTE_VIDEO_U_MASK 
BLACKBIRD_MUTE_VIDEO_Y_MASK 

Definition at line 163 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_MUTE_VIDEO_V_SHIFT 
BLACKBIRD_MUTE_VIDEO_U_SHIFT 
BLACKBIRD_MUTE_VIDEO_Y_SHIFT 

Definition at line 168 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_NOTIFICATION_NO_MAILBOX 

Definition at line 142 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_NOTIFICATION_OFF 
BLACKBIRD_NOTIFICATION_ON 

Definition at line 138 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_NOTIFICATION_REFRESH 

Definition at line 135 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_PAUSE_ENCODING 
BLACKBIRD_RESUME_ENCODING 

Definition at line 127 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_PICTURE_MASK_NONE 
BLACKBIRD_PICTURE_MASK_I_FRAMES 
BLACKBIRD_PICTURE_MASK_I_P_FRAMES 
BLACKBIRD_PICTURE_MASK_ALL_FRAMES 

Definition at line 101 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_OUTPUT_PORT_MEMORY 
BLACKBIRD_OUTPUT_PORT_STREAMING 
BLACKBIRD_OUTPUT_PORT_SERIAL 

Definition at line 92 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_VBI_BITS_INSERT_IN_XTENSION_USR_DATA 
BLACKBIRD_VBI_BITS_INSERT_IN_PRIVATE_PACKETS 
BLACKBIRD_VBI_BITS_SEPARATE_STREAM 
BLACKBIRD_VBI_BITS_SEPARATE_STREAM_USR_DATA 
BLACKBIRD_VBI_BITS_SEPARATE_STREAM_PRV_DATA 

Definition at line 111 of file cx88-blackbird.c.

Enumerator:
BLACKBIRD_VBI_BITS_SLICED 
BLACKBIRD_VBI_BITS_RAW 

Definition at line 107 of file cx88-blackbird.c.

Function Documentation

MODULE_AUTHOR ( "Jelle Foks <[email protected] ,
Gerd Knorr< kraxel @bytesex.org >"  [SuSE Labs] 
)
MODULE_DESCRIPTION ( "driver for cx2388x/cx23416 based mpeg encoder cards )
module_exit ( blackbird_fini  )
module_init ( blackbird_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( mpegbufs  ,
int  ,
0644   
)
module_param ( debug  ,
int  ,
0644   
)
module_param_named ( video_debug  ,
cx8802_mpeg_template.  debug,
int  ,
0644   
)
MODULE_PARM_DESC ( mpegbufs  ,
"number of mpeg  buffers,
range 2-32"   
)
MODULE_PARM_DESC ( debug  ,
"enable debug messages "  [blackbird] 
)
MODULE_PARM_DESC ( debug  ,
"enable debug messages "  [video] 
)
MODULE_VERSION ( CX88_VERSION  )