📄 ch7005c.h
字号:
#ifndef __CH7005C_H
#define __CH7005C_H
#include <linux/video_encoder.h>
/* Should go to video_encoder.h */
#define VIDEO_ENCODER_PAL_M 32 /* can encode PAL-M */
#define VIDEO_ENCODER_NTSC_J 64 /* can encode NTSC-J */
/* Description of the hardware environment */
struct ch7005c_config {
int clock_mode;
#define CH7005C_SLAVE_CLK_MODE 0
#define CH7005C_MASTER_CLK_MODE 1
int xcm, pcm;
#define CH7005C_CLK_1X 0
#define CH7005C_CLK_2X 1
#define CH7005C_CLK_3X 2
int mcp;
#define CH7005C_MCP_NEG_EDGE 0
#define CH7005C_MCP_POS_EDGE 1
int input_fmt;
#define CH7005C_16_RGB_16 0
#define CH7005C_16_YCRCB_24 1
#define CH7005C_16_RGB_MPX_24 2
#define CH7005C_15_RGB_15 3
#define CH7005C_12_RGB_MPX_C_24 4
#define CH7005C_12_RGB_MPX_I_24 5
#define CH7005C_8_RGB_MPX_24 6
#define CH7005C_8_RGB_MPX_16 7
#define CH7005C_8_RGB_MPX_15 8
#define CH7005C_8_YCRCB_MPX_24 9
int rgb_bypass;
#define CH7005C_RGBBP_DISABLE 0
#define CH7005C_RGBBP_ENABLE 1
int horiz_sync_pol, vert_sync_pol;
#define CH7005C_SYNC_ACT_LO 0
#define CH7005C_SYNC_ACT_HI 1
int sync_direction;
#define CH7005C_SYNC_INPUT 0
#define CH7005C_SYNC_OUTPUT 1
int des;
#define CH7005C_DES_ENABLE 1
#define CH7005C_DES_DISABLE 0
};
/* For setting the flicker filter. */
struct ch7005c_filter {
int text_enhancement;
int luma;
int chroma;
#define CH7005C_FILTER_MIN 0
#define CH7005C_FILTER_SLIGHT 1
#define CH7005C_FILTER_MAX 2
#define CH7005C_DOTCRAWL_RED 3
};
/* For setting the position of the displayed image. */
struct ch7005c_pos {
unsigned start_active_video;
unsigned horiz_pos;
unsigned vert_pos;
};
/*
* Encoder commands
*/
/*
* This command tells the necessary hardware layout information to the driver.
* It should be the first command to the driver.
* USE IT WITH CAUTION!
*/
#define ENCODER_SET_CONFIG _IOW('e', 6, struct ch7005c_config*)
/*
* Use this command to set the display mode. See the Chrontel docs for
* explanation.
* 0 <= mode <= 28
*/
#define ENCODER_SET_DISP_MODE _IOW('e', 7, int*)
/*
* Set various image enhancement filters.
*/
#define ENCODER_SET_FLICKER_FILTER _IOW('e', 8, struct ch7005c_filter*)
/*
* Set the position of the displayed image.
* 0 <= position values <= 511
*/
#define ENCODER_SET_POS _IOW('e', 9, struct ch7005c_pos*)
/*
* Contrast adjustment.
* 0 <= contrast <= 7
*/
#define ENCODER_SET_CONTRAST _IOW('e', 10, int*)
/*
* Use this call to detect the connected outputs.
* Returns: CH7005C_YT_VALID | CH7005C_CT_VALID | CH7005C_CVBST_VALID
*/
#define ENCODER_DETECT_CONNECTIONS _IOR('e', 11, int*)
#define CH7005C_YT_VALID 8 /* S-Video Y output is connected */
#define CH7005C_CT_VALID 4 /* S-Video C output is connected */
#define CH7005C_CVBST_VALID 2 /* Composite video output is connected */
#endif /* __CH7005C_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -