1
/******************************************************************************
5
* Copyright (c) 2006 Analog Devices Inc. *
6
* All rights reserved. *
8
* This source code is intended for the recipient only under the guidelines of *
9
* the non-disclosure agreement with Analog Devices Inc. *
11
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
12
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
13
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
14
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
15
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *
16
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *
17
* DEALINGS IN THE SOFTWARE. *
20
* This software is intended for use with the AD9889A and derivative parts only*
22
******************************************************************************/
24
/******************************************************************************
26
* THIS IS A READ-ONLY SOURCE FILE. DO NOT EDIT IT DIRECTLY. *
27
* Author: Matthew McCarn (matthew.mccarn@analog.com) *
28
* Date: May 16, 2006 *
30
******************************************************************************/
32
#ifndef _RAPTOR_SETUP_H_
33
#define _RAPTOR_SETUP_H_
36
#include "ad9889_macros.h"
47
typedef enum mytiming Timing;
56
typedef enum mycolorspace Colorspace;
64
typedef enum myrange Range;
72
typedef enum myaspectratio AspectRatio;
74
enum mysamplingfrequency
85
typedef enum mysamplingfrequency SamplingFrequency;
95
typedef enum myaudioinputmode AudioInputMode;
99
DEPLINT active_format;
103
DEPLINT non_unif_pic_scaling;
104
DEPLINT active_fmt_asp_rat;
105
DEPLINT active_line_start;
106
DEPLINT active_line_end;
107
DEPLINT active_pixel_start;
108
DEPLINT active_pixel_end;
111
typedef struct aviinfoframe * AVIInfoframe;
113
struct audioinfoframe
115
DEPLINT down_mix_inh;
119
typedef struct audioinfoframe * AudioInfoframe;
123
BYTE *spd_byte_1to25;
126
typedef struct spdpacket * SPDPacket;
130
BYTE *mpeg_byte_0to3;
131
DEPLINT frame_repeat;
132
DEPLINT frame_indicator;
135
typedef struct mpegpacket * MPEGPacket;
143
typedef struct acppacket * ACPPacket;
147
DEPLINT isrc_continued;
154
typedef struct isrcpacket * ISRCPacket;
156
void initialize_raptor(void);
157
void set_spdif_audio(void);
158
void adi9889_early_setup(void);
159
void hdmi_or_dvi(void);
160
DEPLINT handle_edid_interrupt(void);
161
void handle_bksv_ready_interrupt(void);
162
void handle_hpd_interrupt(void);
163
void enable_hdcp(void);
164
void disable_hdcp(void);
165
BOOL get_hdcp_status(void);
166
void set_hdcp_status(BOOL);
167
BOOL get_hdcp_hdcp_requested(void);
168
void set_hdcp_hdcp_requested(BOOL);
169
BOOL get_hdcp_hdcp_enabled(void);
170
void set_hdcp_hdcp_enabled(BOOL);
171
BOOL get_hdmi_status(void);
172
void compare_bksvs(void);
174
//since a polling function is needed
176
void initialize_ad9889_i2c(DEPLINT (*)(DEPLINT, DEPLINT, BYTE *, DEPLINT), DEPLINT (*)(DEPLINT, DEPLINT, BYTE *, DEPLINT));
177
void initialize_error_callback(void (*error_function)(int));
179
extern void (*error_callback_function)(int);
180
extern DEPLINT (*i2c_write_bytes)(DEPLINT dev_addr_in, DEPLINT reg_addr_in, BYTE *data_in, DEPLINT count_in);
181
extern DEPLINT (*i2c_read_bytes)(DEPLINT dev_addr_in, DEPLINT reg_addr_in, BYTE *data_out, DEPLINT count_in);
183
BOOL is_repeater(void);
184
BOOL edid_reading_complete(void);
185
void set_EDID_ready(BOOL value);
186
void set_video_mode(Timing video_timing, Colorspace colorspace_in, Range colorspace_range, AspectRatio aspect_ratio);
187
void set_input_format(DEPLINT input_format, DEPLINT input_style, DEPLINT input_bit_width, DEPLINT clock_edge);
188
void set_audio_mode(SamplingFrequency sampling_frequency, DEPLINT bit_width, DEPLINT channel_count, DEPLINT channel_map);
189
void set_audio_format(AudioInputMode input_mode);
190
void force_hdmi(BOOL hdmi);
191
void clear_interrupts(void);
192
void set_MCLK_ratio(DEPLINT val);
193
void set_avi_if(AVIInfoframe info);
194
void set_audio_if(AudioInfoframe info);
195
void set_spd_packet(SPDPacket info);
196
void set_mpeg_packet(MPEGPacket info);
197
void set_acp_packet(ACPPacket info);
198
void set_isrc_packet(ISRCPacket info);
199
void set_sync_params(DEPLINT h_dur, DEPLINT h_fp, DEPLINT v_dur, DEPLINT v_fp,DEPLINT h_hpol,DEPLINT v_pol);
200
void set_clock_delay(DEPLINT setting);
201
void input_data_clock_2x(BOOL value);
202
DEPLINT get_version(void);
204
void av_mute_on(void);
205
void av_mute_off(void);
207
void AD9889_reset(void);
208
void AD9889_audio_mute(BOOL val);
209
void enable_sync_gen(BOOL val);
210
void enable_de_gen(BOOL val);
211
void set_de_params(DEPLINT h_delay, DEPLINT v_delay, DEPLINT int_offset,DEPLINT act_width,DEPLINT act_height);
213
BOOL check_Rx_sense(void);
214
BOOL query_vid(DEPLINT vid);
215
BOOL query_colorspace_in(Colorspace colorspace_in);
216
BOOL query_aspect_ratio(AspectRatio aspect_ratio);
217
BOOL query_sampling_frequency(SamplingFrequency sampling_frequency);
218
BOOL query_bit_width(DEPLINT bit_width);
219
BOOL query_channel_count(DEPLINT channel_count);
220
BOOL query_channel_map(DEPLINT channel_map);
222
#endif //_RAPTOR_SETUP_H_