-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnvp6114.h
220 lines (182 loc) · 5.11 KB
/
nvp6114.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#ifndef _NVP6114_H_
#define _NVP6114_H_
#include <linux/ioctl.h>
//#define ONLY_720H
#define NVP6114 0x60
#define NVP6114_R0_ID 0x83
//FIXME HI3520 Register
#define VIU_CH_CTRL 0x08
#define VIU_ANC0_START 0x9c
#define VIU_ANC0_SIZE 0xa0
#define VIU_ANC1_START 0xa4
#define VIU_ANC1_SIZE 0xa8
#define VIU_BLANK_DATA_ADDR 0xac
#define VDEC_NTSC 0
#define VDEC_PAL 1
#define VDEC_AUTO 3
#define VDEC_INVALID_MODE 4
#define NVP1114A_IOC_MAGIC 't'
#define NVP1114ACMD_READ_REG 0x01
#define NVP1114ACMD_WRITE_REG 0x02
#define NVP1114A_GET_VIDEO_LOSS 0x04
#define NVP1114A_SET_IMAGE_ADJUST 0x05
#define NVP1114A_GET_IMAGE_ADJUST 0x06
#define NVP1114A_SET_VIDEO_NORM 0x07
#define NVP1114A_GET_VIDEO_NORM 0x08
#define NVP1114A_SET_WORK_MODE 0x09
#define NVP1114A_SET_SAMPLE_RATE 0x0a
#define NVP1114A_SET_AUDIO_PLAYBACK 0x0b
#define NVP1114A_SET_AUDIO_DA_MUTE 0x0c
#define NVP1114A_SET_AUDIO_DA_VOLUME 0x0d
#define NVP1114A_SET_BRIGHTNESS 0x0e
#define NVP1114A_SET_CONTRAST 0x0f
#define NVP1114A_SET_HUE 0x10
#define NVP1114A_SET_SATURATION 0x11
#define NVP1114A_SET_SHARPNESS 0x12
#define NVP1114A_SET_AUDIO_MUTE 0x13
#define IOC_AUDIO_SET_OUT_VOL 0x09
#define IOC_AUDIO_SET_LIVE_CH 0x14
#define IOC_AUDIO_SET_PB_CH 0x15
#define NVP1108_GET_MOTION 0x16
#define NVP1108_SET_MOTION 0x17
#define NVP1108_SET_MOTION_SENS 0x18
#define NVP1108_SET_MOTION_EN 0x19
#define NVP1108_SET_MOTION_TRACE 0x1A
//Hwarang
#define IOC_VDEC_SET_VIDEO_FORMAT 0x06
#define IOC_VDEC_SET_VIDEO_MODE 0x07
#define IOC_VDEC_GET_VIDEO_LOSS 0x08
#define IOC_VDEC_SET_BRIGHTNESS 0x0e
#define IOC_VDEC_SET_CONTRAST 0x0f
#define IOC_VDEC_SET_HUE 0x10
#define IOC_VDEC_SET_SATURATION 0x11
#define IOC_VDEC_SET_SHARPNESS 0x12
#define IOC_VDEC_PTZ_CHANNEL_SEL 0x20
#define IOC_VDEC_PTZ_PELCO_INIT 0x21
#define IOC_VDEC_PTZ_PELCO_RESET 0x22
#define IOC_VDEC_PTZ_PELCO_SET 0x23
#define IOC_VDEC_PTZ_PELCO_UP 0x24
#define IOC_VDEC_PTZ_PELCO_DOWN 0x25
#define IOC_VDEC_PTZ_PELCO_LEFT 0x26
#define IOC_VDEC_PTZ_PELCO_RIGHT 0x27
#define IOC_VDEC_PTZ_PELCO_OSD 0x28
#define IOC_VDEC_PTZ_PELCO_IRIS_OPEN 0x29
#define IOC_VDEC_PTZ_PELCO_IRIS_CLOSE 0x2a
#define IOC_VDEC_PTZ_PELCO_FOCUS_NEAR 0x2b
#define IOC_VDEC_PTZ_PELCO_FOCUS_FAR 0x2c
#define IOC_VDEC_PTZ_PELCO_ZOOM_WIDE 0x2d
#define IOC_VDEC_PTZ_PELCO_ZOOM_TELE 0x2e
#define IOC_VDEC_SET_VIDEO_OUTMODE 0x2f
#define IOC_AUDIO_SET_IN_VOL 0x30
#define IOC_VDEC_INIT_MOTION 0x40
#define IOC_VDEC_ENABLE_MOTION 0x41
#define IOC_VDEC_DISABLE_MOTION 0x42
#define IOC_VDEC_SET_MOTION_AREA 0x43
#define IOC_VDEC_GET_MOTION_INFO 0x44
#define IOC_VDEC_SET_MOTION_DISPLAY 0x45
#define IOC_VDEC_SET_MOTION_SENS 0x46
#define IOC_VDEC_ENABLE_LOW_RES 0x50
#define IOC_VDEC_DISABLE_LOW_RES 0x51
#define IOC_VDEC_ENABLE_BW 0x60
#define IOC_VDEC_DISABLE_BW 0x61
#define IOC_VDEC_READ_BALCK_COUNT 0x62
#define IOC_VDEC_READ_WHITE_COUNT 0x63
#define IOC_VDEC_4CH_VIDEO_SEQUENCE 0x64
#define MAX_CHN_CNT 16
typedef struct _vdec_video_mode
{
unsigned int chip;
unsigned int mode;
}vdec_video_mode;
typedef struct _vdec_video_loss
{
unsigned int chip;
unsigned int ch;
unsigned int is_lost;
}vdec_video_loss;
typedef struct _vdec_video_adjust
{
unsigned int ch;
unsigned int value;
}vdec_video_adjust;
typedef struct _NVP1114A_audio_output
{
unsigned char PlaybackOrLoop; /*0:playback; 1:loop*/
unsigned char channel; /*[0, 15]*/
unsigned char reserve[6];
} nvp1114a_audio_output;
typedef struct _vdec_clock_mode
{
unsigned int chip;
unsigned int mode;
}vdec_clock_mode;
typedef struct _vdec_motion_area
{
unsigned char ch;
int m_info[12];
}vdec_motion_area;
typedef struct _vdec_audio_playback
{
unsigned int chip;
unsigned int ch;
}vdec_audio_playback;
typedef struct _vdec_audio_da_mute
{
unsigned int chip;
}vdec_audio_da_mute;
typedef struct _vdec_audio_da_volume
{
unsigned int chip;
unsigned int volume;
}vdec_audio_da_volume;
typedef struct __NVP1918_Audio_Init_Val
{
unsigned char chn_cnt;
unsigned char sample;
unsigned char bits;
}NVP1918_Audio_Init_Val;
typedef struct _vdec_input_videofmt
{
int chn[16];
int getvideofmt[16];
}vdec_input_videofmt;
typedef enum __video_typ_mode__
{
VIDEO_TYPE_720P60 = 0x00,
VIDEO_TYPE_720P50 = 0x01,
VIDEO_TYPE_1080P30 = 0x02,
VIDEO_TYPE_1080P25 = 0x03,
VIDEO_TYPE_720P30 = 0x04,
VIDEO_TYPE_720P25 = 0x05,
VIDEO_TYPE_960H30 = 0x06,
VIDEO_TYPE_960H25 = 0x07,
VIDEO_TYPE_D1N = 0x08,
VIDEO_TYPE_D1P = 0x09
}VIDEO_TPYE;
typedef struct
{
unsigned int chn_chg_flag;
unsigned int chn_lock_flag;
VIDEO_TPYE video_type;
VIDEO_TPYE video_type_old;
VIDEO_TPYE video_type_config;
} nvp6114chn_t;
enum{
NVC1700_OUTMODE_2D1_8CIF = 0,
NVC1700_OUTMODE_1D1_16CIF,
NVC1700_OUTMODE_4D1_16CIF,
NVC1700_OUTMODE_BUTT
};
enum{
NVC1700_VM_NTSC = 0,
NVC1700_VM_PAL,
NVC1700_VM_BUTT
};
enum{
NVP6114_OUT_2X960_2X720P = 0,
NVP6114_OUT_2X720P_2X960H,
NVP6114_OUT_ALL_960H,
NVP6114_OUT_ALL_720P,
NVP6114_OUT_BUTT
};
#endif