#ifndef _DEV_IC_BT8XX_H_
#define _DEV_IC_BT8XX_H_
#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
struct meteor_capframe {
short command;
short lowat;
short hiwat;
};
struct meteor_geomet {
u_short rows;
u_short columns;
u_short frames;
u_int oformat;
};
struct meteor_counts {
u_int fifo_errors;
u_int dma_errors;
u_int frames_captured;
u_int even_fields_captured;
u_int odd_fields_captured;
};
struct meteor_video {
u_int addr;
u_int width;
u_int banksize;
u_int ramsize;
};
#define METEORCAPTUR _IOW('x', 1, int)
#define METEORCAPFRM _IOW('x', 2, struct meteor_capframe)
#define METEORSETGEO _IOW('x', 3, struct meteor_geomet)
#define METEORGETGEO _IOR('x', 4, struct meteor_geomet)
#define METEORSTATUS _IOR('x', 5, unsigned short)
#define METEORSHUE _IOW('x', 6, signed char)
#define METEORGHUE _IOR('x', 6, signed char)
#define METEORSFMT _IOW('x', 7, unsigned int)
#define METEORGFMT _IOR('x', 7, unsigned int)
#define METEORSINPUT _IOW('x', 8, unsigned int)
#define METEORGINPUT _IOR('x', 8, unsigned int)
#define METEORSCHCV _IOW('x', 9, unsigned char)
#define METEORGCHCV _IOR('x', 9, unsigned char)
#define METEORSCOUNT _IOW('x',10, struct meteor_counts)
#define METEORGCOUNT _IOR('x',10, struct meteor_counts)
#define METEORSFPS _IOW('x',11, unsigned short)
#define METEORGFPS _IOR('x',11, unsigned short)
#define METEORSSIGNAL _IOW('x', 12, unsigned int)
#define METEORGSIGNAL _IOR('x', 12, unsigned int)
#define METEORSVIDEO _IOW('x', 13, struct meteor_video)
#define METEORGVIDEO _IOR('x', 13, struct meteor_video)
#define METEORSBRIG _IOW('x', 14, unsigned char)
#define METEORGBRIG _IOR('x', 14, unsigned char)
#define METEORSCSAT _IOW('x', 15, unsigned char)
#define METEORGCSAT _IOR('x', 15, unsigned char)
#define METEORSCONT _IOW('x', 16, unsigned char)
#define METEORGCONT _IOR('x', 16, unsigned char)
#define METEORSBT254 _IOW('x', 17, unsigned short)
#define METEORGBT254 _IOR('x', 17, unsigned short)
#define METEORSHWS _IOW('x', 18, unsigned char)
#define METEORGHWS _IOR('x', 18, unsigned char)
#define METEORSVWS _IOW('x', 19, unsigned char)
#define METEORGVWS _IOR('x', 19, unsigned char)
#define METEORSTS _IOW('x', 20, unsigned char)
#define METEORGTS _IOR('x', 20, unsigned char)
#define METEOR_STATUS_ID_MASK 0xf000
#define METEOR_STATUS_DIR 0x0800
#define METEOR_STATUS_OEF 0x0200
#define METEOR_STATUS_SVP 0x0100
#define METEOR_STATUS_STTC 0x0080
#define METEOR_STATUS_HCLK 0x0040
#define METEOR_STATUS_FIDT 0x0020
#define METEOR_STATUS_ALTD 0x0002
#define METEOR_STATUS_CODE 0x0001
#define METEOR_CAP_SINGLE 0x0001
#define METEOR_CAP_CONTINOUS 0x0002
#define METEOR_CAP_STOP_CONT 0x0004
#define METEOR_CAP_N_FRAMES 0x0001
#define METEOR_CAP_STOP_FRAMES 0x0002
#define METEOR_HALT_N_FRAMES 0x0003
#define METEOR_CONT_N_FRAMES 0x0004
#define METEOR_FMT_NTSC 0x00100
#define METEOR_FMT_PAL 0x00200
#define METEOR_FMT_SECAM 0x00400
#define METEOR_FMT_AUTOMODE 0x00800
#define METEOR_INPUT_DEV0 0x01000
#define METEOR_INPUT_DEV_RCA METEOR_INPUT_DEV0
#define METEOR_INPUT_DEV1 0x02000
#define METEOR_INPUT_DEV2 0x04000
#define METEOR_INPUT_DEV3 0x08000
#define METEOR_INPUT_DEV_RGB 0x0a000
#define METEOR_INPUT_DEV_SVIDEO 0x06000
#define METEOR_GEO_RGB16 0x0010000
#define METEOR_GEO_RGB24 0x0020000
#define METEOR_GEO_YUV_PACKED 0x0040000
#define METEOR_GEO_YUV_PLANAR 0x0080000
#define METEOR_GEO_YUV_PLANER METEOR_GEO_YUV_PLANAR
#define METEOR_GEO_UNSIGNED 0x0400000
#define METEOR_GEO_EVEN_ONLY 0x1000000
#define METEOR_GEO_ODD_ONLY 0x2000000
#define METEOR_GEO_FIELD_MASK 0x3000000
#define METEOR_GEO_YUV_422 0x4000000
#define METEOR_GEO_OUTPUT_MASK 0x40f0000
#define METEOR_GEO_YUV_12 0x10000000
#define METEOR_GEO_YUV_9 0x40000000
#define METEOR_FIELD_MODE 0x80000000
#define METEOR_SIG_MODE_MASK 0xffff0000
#define METEOR_SIG_FRAME 0x00000000
#define METEOR_SIG_FIELD 0x00010000
struct meteor_mem {
int frame_size;
unsigned num_bufs;
int lowat;
int hiwat;
unsigned active;
int num_active_bufs;
void * buf;
};
#define CHNLSET_NABCST 1
#define CHNLSET_CABLEIRC 2
#define CHNLSET_CABLEHRC 3
#define CHNLSET_WEUROPE 4
#define CHNLSET_JPNBCST 5
#define CHNLSET_JPNCABLE 6
#define CHNLSET_XUSSR 7
#define CHNLSET_AUSTRALIA 8
#define CHNLSET_FRANCE 9
#define CHNLSET_MIN CHNLSET_NABCST
#define CHNLSET_MAX CHNLSET_FRANCE
#define BT848_HUEMIN (-90)
#define BT848_HUEMAX 90
#define BT848_HUECENTER 0
#define BT848_HUERANGE 179.3
#define BT848_HUEREGMIN (-128)
#define BT848_HUEREGMAX 127
#define BT848_HUESTEPS 256
#define BT848_BRIGHTMIN (-50)
#define BT848_BRIGHTMAX 50
#define BT848_BRIGHTCENTER 0
#define BT848_BRIGHTRANGE 99.6
#define BT848_BRIGHTREGMIN (-128)
#define BT848_BRIGHTREGMAX 127
#define BT848_BRIGHTSTEPS 256
#define BT848_CONTRASTMIN 0
#define BT848_CONTRASTMAX 237
#define BT848_CONTRASTCENTER 100
#define BT848_CONTRASTRANGE 236.57
#define BT848_CONTRASTREGMIN 0
#define BT848_CONTRASTREGMAX 511
#define BT848_CONTRASTSTEPS 512
#define BT848_CHROMAMIN 0
#define BT848_CHROMAMAX 284
#define BT848_CHROMACENTER 100
#define BT848_CHROMARANGE 283.89
#define BT848_CHROMAREGMIN 0
#define BT848_CHROMAREGMAX 511
#define BT848_CHROMASTEPS 512
#define BT848_SATUMIN 0
#define BT848_SATUMAX 202
#define BT848_SATUCENTER 100
#define BT848_SATURANGE 201.18
#define BT848_SATUREGMIN 0
#define BT848_SATUREGMAX 511
#define BT848_SATUSTEPS 512
#define BT848_SATVMIN 0
#define BT848_SATVMAX 284
#define BT848_SATVCENTER 100
#define BT848_SATVRANGE 283.89
#define BT848_SATVREGMIN 0
#define BT848_SATVREGMAX 511
#define BT848_SATVSTEPS 512
#define AUDIO_TUNER 0x00
#define AUDIO_EXTERN 0x01
#define AUDIO_INTERN 0x02
#define AUDIO_MUTE 0x80
#define AUDIO_UNMUTE 0x81
struct eeProm {
short offset;
short count;
u_char bytes[256];
};
#define TVTUNER_SETCHNL _IOW('x', 32, unsigned int)
#define TVTUNER_GETCHNL _IOR('x', 32, unsigned int)
#define TVTUNER_SETTYPE _IOW('x', 33, unsigned int)
#define TVTUNER_GETTYPE _IOR('x', 33, unsigned int)
#define TVTUNER_GETSTATUS _IOR('x', 34, unsigned int)
#define TVTUNER_SETFREQ _IOW('x', 35, unsigned int)
#define TVTUNER_GETFREQ _IOR('x', 36, unsigned int)
#define BT848_SHUE _IOW('x', 37, int)
#define BT848_GHUE _IOR('x', 37, int)
#define BT848_SBRIG _IOW('x', 38, int)
#define BT848_GBRIG _IOR('x', 38, int)
#define BT848_SCSAT _IOW('x', 39, int)
#define BT848_GCSAT _IOR('x', 39, int)
#define BT848_SCONT _IOW('x', 40, int)
#define BT848_GCONT _IOR('x', 40, int)
#define BT848_SVSAT _IOW('x', 41, int)
#define BT848_GVSAT _IOR('x', 41, int)
#define BT848_SUSAT _IOW('x', 42, int)
#define BT848_GUSAT _IOR('x', 42, int)
#define BT848_SCBARS _IOR('x', 43, int)
#define BT848_CCBARS _IOR('x', 44, int)
#define BT848_SAUDIO _IOW('x', 46, int)
#define BT848_GAUDIO _IOR('x', 47, int)
#define BT848_SBTSC _IOW('x', 48, int)
#define BT848_GSTATUS _IOR('x', 49, unsigned int)
#define BT848_WEEPROM _IOWR('x', 50, struct eeProm)
#define BT848_REEPROM _IOWR('x', 51, struct eeProm)
#define BT848_SIGNATURE _IOWR('x', 52, struct eeProm)
#define TVTUNER_SETAFC _IOW('x', 53, int)
#define TVTUNER_GETAFC _IOR('x', 54, int)
#define BT848_SLNOTCH _IOW('x', 55, int)
#define BT848_GLNOTCH _IOR('x', 56, int)
#define BT848_I2CWR _IOWR('x', 57, u_int)
struct bktr_msp_control {
unsigned char function;
unsigned int address;
unsigned int data;
};
#define BT848_MSP_RESET _IO('x', 76)
#define BT848_MSP_READ _IOWR('x', 77, struct bktr_msp_control)
#define BT848_MSP_WRITE _IOWR('x', 78, struct bktr_msp_control)
#define RADIO_SETMODE _IOW('x', 58, unsigned int)
#define RADIO_GETMODE _IOR('x', 58, unsigned char)
#define RADIO_AFC 0x01
#define RADIO_MONO 0x02
#define RADIO_MUTE 0x08
#define RADIO_SETFREQ _IOW('x', 59, unsigned int)
#define RADIO_GETFREQ _IOR('x', 59, unsigned int)
#define METEOR_DEV0 0x00001000
#define METEOR_DEV1 0x00002000
#define METEOR_DEV2 0x00004000
#define METEOR_DEV3 0x00008000
#define METEOR_DEV_SVIDEO 0x00006000
typedef enum { METEOR_PIXTYPE_RGB, METEOR_PIXTYPE_YUV,
METEOR_PIXTYPE_YUV_PACKED,
METEOR_PIXTYPE_YUV_12 } METEOR_PIXTYPE;
struct meteor_pixfmt {
u_int index;
METEOR_PIXTYPE type;
u_int Bpp;
u_int masks[3];
unsigned swap_bytes :1;
unsigned swap_shorts:1;
};
struct bktr_clip {
int x_min;
int x_max;
int y_min;
int y_max;
};
#define BT848_MAX_CLIP_NODE 100
struct _bktr_clip {
struct bktr_clip x[BT848_MAX_CLIP_NODE];
};
#define METEORSACTPIXFMT _IOW('x', 64, int)
#define METEORGACTPIXFMT _IOR('x', 64, int)
#define METEORGSUPPIXFMT _IOWR('x', 65, struct meteor_pixfmt)
#define BT848SCLIP _IOW('x', 66, struct _bktr_clip)
#define BT848GCLIP _IOR('x', 66, struct _bktr_clip)
#define BT848SFMT _IOW('x', 67, unsigned int)
#define BT848GFMT _IOR('x', 67, unsigned int)
#define BT848SCBUF _IOW('x', 68, int)
#define BT848GCBUF _IOR('x', 68, int)
struct bktr_capture_area {
int x_offset;
int y_offset;
int x_size;
int y_size;
};
#define BT848_SCAPAREA _IOW('x', 69, struct bktr_capture_area)
#define BT848_GCAPAREA _IOR('x', 69, struct bktr_capture_area)
#define BT848_MAX_CHNLSET_NAME_LEN 16
struct bktr_chnlset {
short index;
short max_channel;
char name[BT848_MAX_CHNLSET_NAME_LEN];
};
#define TVTUNER_GETCHNLSET _IOWR('x', 70, struct bktr_chnlset)
struct bktr_remote {
unsigned char data[3];
};
#define REMOTE_GETKEY _IOR('x', 71, struct bktr_remote)
#define BT848_GPIO_SET_EN _IOW('x', 72, int)
#define BT848_GPIO_GET_EN _IOR('x', 73, int)
#define BT848_GPIO_SET_DATA _IOW('x', 74, int)
#define BT848_GPIO_GET_DATA _IOR('x', 75, int)
#define BT848_IFORM_FORMAT (0x7<<0)
# define BT848_IFORM_F_RSVD (0x7)
# define BT848_IFORM_F_SECAM (0x6)
# define BT848_IFORM_F_PALN (0x5)
# define BT848_IFORM_F_PALM (0x4)
# define BT848_IFORM_F_PALBDGHI (0x3)
# define BT848_IFORM_F_NTSCJ (0x2)
# define BT848_IFORM_F_NTSCM (0x1)
# define BT848_IFORM_F_AUTO (0x0)
#endif