1 #ifndef VENDOR_CMD_H_
2 #define VENDOR_CMD_H_
3 
4 #define BULK_ALTERNATE_IFACE		(2)
5 #define ISO_3K_BULK_ALTERNATE_IFACE     (1)
6 #define REQ_SET_CMD			(0X00)
7 #define REQ_GET_CMD			(0X80)
8 
9 enum tlg__analog_audio_standard {
10 	TLG_TUNE_ASTD_NONE	= 0x00000000,
11 	TLG_TUNE_ASTD_A2	= 0x00000001,
12 	TLG_TUNE_ASTD_NICAM	= 0x00000002,
13 	TLG_TUNE_ASTD_EIAJ	= 0x00000004,
14 	TLG_TUNE_ASTD_BTSC	= 0x00000008,
15 	TLG_TUNE_ASTD_FM_US	= 0x00000010,
16 	TLG_TUNE_ASTD_FM_EUR	= 0x00000020,
17 	TLG_TUNE_ASTD_ALL	= 0x0000003f
18 };
19 
20 /*
21  * identifiers for Custom Parameter messages.
22  * @typedef cmd_custom_param_id_t
23  */
24 enum cmd_custom_param_id {
25 	CUST_PARM_ID_NONE		= 0x00,
26 	CUST_PARM_ID_BRIGHTNESS_CTRL	= 0x01,
27 	CUST_PARM_ID_CONTRAST_CTRL	= 0x02,
28 	CUST_PARM_ID_HUE_CTRL		= 0x03,
29 	CUST_PARM_ID_SATURATION_CTRL	  = 0x04,
30 	CUST_PARM_ID_AUDIO_SNR_THRESHOLD  = 0x10,
31 	CUST_PARM_ID_AUDIO_AGC_THRESHOLD  = 0x11,
32 	CUST_PARM_ID_MAX
33 };
34 
35 struct  tuner_custom_parameter_s {
36 	uint16_t	param_id;	 /*  Parameter identifier  */
37 	uint16_t	param_value;	 /*  Parameter value	   */
38 };
39 
40 struct  tuner_ber_rate_s {
41 	uint32_t	ber_rate;  /*  BER sample rate in seconds   */
42 };
43 
44 struct tuner_atv_sig_stat_s {
45 	uint32_t	sig_present;
46 	uint32_t	sig_locked;
47 	uint32_t	sig_lock_busy;
48 	uint32_t	sig_strength;	   /*  milliDb	  */
49 	uint32_t	tv_audio_chan;	  /*  mono/stereo/sap*/
50 	uint32_t 	mvision_stat;	   /*  macrovision status */
51 };
52 
53 struct tuner_dtv_sig_stat_s {
54 	uint32_t sig_present;   /*  Boolean*/
55 	uint32_t sig_locked;	/*  Boolean */
56 	uint32_t sig_lock_busy; /*  Boolean	(Can this time-out?) */
57 	uint32_t sig_strength;  /*  milliDb*/
58 };
59 
60 struct tuner_fm_sig_stat_s {
61 	uint32_t sig_present;	/* Boolean*/
62 	uint32_t sig_locked;	 /* Boolean */
63 	uint32_t sig_lock_busy;  /* Boolean */
64 	uint32_t sig_stereo_mono;/* TBD*/
65 	uint32_t sig_strength;   /* milliDb*/
66 };
67 
68 enum _tag_tlg_tune_srv_cmd {
69 	TLG_TUNE_PLAY_SVC_START = 1,
70 	TLG_TUNE_PLAY_SVC_STOP
71 };
72 
73 enum  _tag_tune_atv_audio_mode_caps {
74 	TLG_TUNE_TVAUDIO_MODE_MONO	= 0x00000001,
75 	TLG_TUNE_TVAUDIO_MODE_STEREO	= 0x00000002,
76 	TLG_TUNE_TVAUDIO_MODE_LANG_A	= 0x00000010,/* Primary language*/
77 	TLG_TUNE_TVAUDIO_MODE_LANG_B	= 0x00000020,/* 2nd avail language*/
78 	TLG_TUNE_TVAUDIO_MODE_LANG_C	= 0x00000040
79 };
80 
81 
82 enum   _tag_tuner_atv_audio_rates {
83 	ATV_AUDIO_RATE_NONE	= 0x00,/* Audio not supported*/
84 	ATV_AUDIO_RATE_32K	= 0x01,/* Audio rate = 32 KHz*/
85 	ATV_AUDIO_RATE_48K	= 0x02, /* Audio rate = 48 KHz*/
86 	ATV_AUDIO_RATE_31_25K	= 0x04 /* Audio rate = 31.25KHz */
87 };
88 
89 enum  _tag_tune_atv_vid_res_caps {
90 	TLG_TUNE_VID_RES_NONE	= 0x00000000,
91 	TLG_TUNE_VID_RES_720	= 0x00000001,
92 	TLG_TUNE_VID_RES_704	= 0x00000002,
93 	TLG_TUNE_VID_RES_360	= 0x00000004
94 };
95 
96 enum _tag_tuner_analog_video_format {
97 	TLG_TUNER_VID_FORMAT_YUV	= 0x00000001,
98 	TLG_TUNER_VID_FORMAT_YCRCB	= 0x00000002,
99 	TLG_TUNER_VID_FORMAT_RGB_565	= 0x00000004,
100 };
101 
102 enum  tlg_ext_audio_support {
103 	TLG_EXT_AUDIO_NONE 	= 0x00,/*  No external audio input supported */
104 	TLG_EXT_AUDIO_LR	= 0x01/*  LR external audio inputs supported*/
105 };
106 
107 enum {
108 	TLG_MODE_NONE			= 0x00, /* No Mode specified*/
109 	TLG_MODE_ANALOG_TV		= 0x01, /* Analog Television mode*/
110 	TLG_MODE_ANALOG_TV_UNCOMP	= 0x01, /* Analog Television mode*/
111 	TLG_MODE_ANALOG_TV_COMP  	= 0x02, /* Analog TV mode (compressed)*/
112 	TLG_MODE_FM_RADIO		= 0x04, /* FM Radio mode*/
113 	TLG_MODE_DVB_T			= 0x08, /* Digital TV (DVB-T)*/
114 };
115 
116 enum  tlg_signal_sources_t {
117 	TLG_SIG_SRC_NONE	= 0x00,/* Signal source not specified */
118 	TLG_SIG_SRC_ANTENNA	= 0x01,/* Signal src is: Antenna */
119 	TLG_SIG_SRC_CABLE	= 0x02,/* Signal src is: Coax Cable*/
120 	TLG_SIG_SRC_SVIDEO	= 0x04,/* Signal src is: S_VIDEO   */
121 	TLG_SIG_SRC_COMPOSITE   = 0x08 /* Signal src is: Composite Video */
122 };
123 
124 enum tuner_analog_video_standard {
125 	TLG_TUNE_VSTD_NONE	= 0x00000000,
126 	TLG_TUNE_VSTD_NTSC_M	= 0x00000001,
127 	TLG_TUNE_VSTD_NTSC_M_J	= 0x00000002,/* Japan   */
128 	TLG_TUNE_VSTD_PAL_B	= 0x00000010,
129 	TLG_TUNE_VSTD_PAL_D	= 0x00000020,
130 	TLG_TUNE_VSTD_PAL_G	= 0x00000040,
131 	TLG_TUNE_VSTD_PAL_H	= 0x00000080,
132 	TLG_TUNE_VSTD_PAL_I	= 0x00000100,
133 	TLG_TUNE_VSTD_PAL_M	= 0x00000200,
134 	TLG_TUNE_VSTD_PAL_N	= 0x00000400,
135 	TLG_TUNE_VSTD_SECAM_B	= 0x00001000,
136 	TLG_TUNE_VSTD_SECAM_D	= 0x00002000,
137 	TLG_TUNE_VSTD_SECAM_G	= 0x00004000,
138 	TLG_TUNE_VSTD_SECAM_H	= 0x00008000,
139 	TLG_TUNE_VSTD_SECAM_K	= 0x00010000,
140 	TLG_TUNE_VSTD_SECAM_K1	= 0x00020000,
141 	TLG_TUNE_VSTD_SECAM_L	= 0x00040000,
142 	TLG_TUNE_VSTD_SECAM_L1	= 0x00080000,
143 	TLG_TUNE_VSTD_PAL_N_COMBO = 0x00100000
144 };
145 
146 enum tlg_mode_caps {
147 	TLG_MODE_CAPS_NONE		= 0x00,  /*  No Mode specified	*/
148 	TLG_MODE_CAPS_ANALOG_TV_UNCOMP  = 0x01,  /*  Analog TV mode     */
149 	TLG_MODE_CAPS_ANALOG_TV_COMP	= 0x02,  /*  Analog TV (compressed)*/
150 	TLG_MODE_CAPS_FM_RADIO		= 0x04,  /*  FM Radio mode	*/
151 	TLG_MODE_CAPS_DVB_T		= 0x08,  /*  Digital TV (DVB-T)	*/
152 };
153 
154 enum poseidon_vendor_cmds {
155 	LAST_CMD_STAT		= 0x00,
156 	GET_CHIP_ID		= 0x01,
157 	GET_FW_ID		= 0x02,
158 	PRODUCT_CAPS		= 0x03,
159 
160 	TUNE_MODE_CAP_ATV	= 0x10,
161 	TUNE_MODE_CAP_ATVCOMP	= 0X10,
162 	TUNE_MODE_CAP_DVBT	= 0x10,
163 	TUNE_MODE_CAP_FM	= 0x10,
164 	TUNE_MODE_SELECT	= 0x11,
165 	TUNE_FREQ_SELECT	= 0x12,
166 	SGNL_SRC_SEL		= 0x13,
167 
168 	VIDEO_STD_SEL		= 0x14,
169 	VIDEO_STREAM_FMT_SEL	= 0x15,
170 	VIDEO_ROSOLU_AVAIL	= 0x16,
171 	VIDEO_ROSOLU_SEL	= 0x17,
172 	VIDEO_CONT_PROTECT	= 0x20,
173 
174 	VCR_TIMING_MODSEL	= 0x21,
175 	EXT_AUDIO_CAP		= 0x22,
176 	EXT_AUDIO_SEL		= 0x23,
177 	TEST_PATTERN_SEL	= 0x24,
178 	VBI_DATA_SEL		= 0x25,
179 	AUDIO_SAMPLE_RATE_CAP   = 0x28,
180 	AUDIO_SAMPLE_RATE_SEL   = 0x29,
181 	TUNER_AUD_MODE		= 0x2a,
182 	TUNER_AUD_MODE_AVAIL	= 0x2b,
183 	TUNER_AUD_ANA_STD	= 0x2c,
184 	TUNER_CUSTOM_PARAMETER	= 0x2f,
185 
186 	DVBT_TUNE_MODE_SEL	= 0x30,
187 	DVBT_BANDW_CAP		= 0x31,
188 	DVBT_BANDW_SEL		= 0x32,
189 	DVBT_GUARD_INTERV_CAP   = 0x33,
190 	DVBT_GUARD_INTERV_SEL   = 0x34,
191 	DVBT_MODULATION_CAP	= 0x35,
192 	DVBT_MODULATION_SEL	= 0x36,
193 	DVBT_INNER_FEC_RATE_CAP = 0x37,
194 	DVBT_INNER_FEC_RATE_SEL = 0x38,
195 	DVBT_TRANS_MODE_CAP	= 0x39,
196 	DVBT_TRANS_MODE_SEL	= 0x3a,
197 	DVBT_SEARCH_RANG	= 0x3c,
198 
199 	TUNER_SETUP_ANALOG	= 0x40,
200 	TUNER_SETUP_DIGITAL	= 0x41,
201 	TUNER_SETUP_FM_RADIO	= 0x42,
202 	TAKE_REQUEST		= 0x43, /* Take effect of the command */
203 	PLAY_SERVICE		= 0x44, /* Play start or Play stop */
204 	TUNER_STATUS		= 0x45,
205 	TUNE_PROP_DVBT		= 0x46,
206 	ERR_RATE_STATS		= 0x47,
207 	TUNER_BER_RATE		= 0x48,
208 
209 	SCAN_CAPS		= 0x50,
210 	SCAN_SETUP		= 0x51,
211 	SCAN_SERVICE		= 0x52,
212 	SCAN_STATS		= 0x53,
213 
214 	PID_SET			= 0x58,
215 	PID_UNSET		= 0x59,
216 	PID_LIST		= 0x5a,
217 
218 	IRD_CAP			= 0x60,
219 	IRD_MODE_SEL		= 0x61,
220 	IRD_SETUP		= 0x62,
221 
222 	PTM_MODE_CAP		= 0x70,
223 	PTM_MODE_SEL		= 0x71,
224 	PTM_SERVICE		= 0x72,
225 	TUNER_REG_SCRIPT	= 0x73,
226 	CMD_CHIP_RST		= 0x74,
227 };
228 
229 enum tlg_bw {
230 	TLG_BW_5 = 5,
231 	TLG_BW_6 = 6,
232 	TLG_BW_7 = 7,
233 	TLG_BW_8 = 8,
234 	TLG_BW_12 = 12,
235 	TLG_BW_15 = 15
236 };
237 
238 struct cmd_firmware_vers_s {
239 	uint8_t	 fw_rev_major;
240 	uint8_t	 fw_rev_minor;
241 	uint16_t fw_patch;
242 };
243 #endif /* VENDOR_CMD_H_ */
244