From 79f215d41ed78e72e0cbe0b87ed426453b81f183 Mon Sep 17 00:00:00 2001 From: marqs Date: Tue, 27 Dec 2016 11:16:08 +0200 Subject: [PATCH] Minor fixes. --- rtl/scanconverter.v | 10 +++++----- software/sys_controller/ossc/avconfig.c | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/rtl/scanconverter.v b/rtl/scanconverter.v index 978189c..a1065ad 100644 --- a/rtl/scanconverter.v +++ b/rtl/scanconverter.v @@ -153,10 +153,10 @@ assign pclk_out_3x_h4x = pclk_3x_h4x; assign pclk_out_3x_h5x = pclk_3x_h5x; //Scanline generation -function [8:0] apply_scanlines; +function [7:0] apply_scanlines; input [1:0] mode; - input [8:0] data; - input [8:0] str; + input [7:0] data; + input [7:0] str; input [1:0] actid; input [1:0] lineid; input pixid; @@ -174,9 +174,9 @@ function [8:0] apply_scanlines; endfunction //Border masking -function [8:0] apply_mask; +function [7:0] apply_mask; input enable; - input [8:0] data; + input [7:0] data; input [11:0] hoffset; input [11:0] hstart; input [11:0] hend; diff --git a/software/sys_controller/ossc/avconfig.c b/software/sys_controller/ossc/avconfig.c index 5634cd7..9048fce 100644 --- a/software/sys_controller/ossc/avconfig.c +++ b/software/sys_controller/ossc/avconfig.c @@ -28,6 +28,7 @@ #define DEFAULT_PRE_COAST 1 #define DEFAULT_POST_COAST 0 #define DEFAULT_SAMPLER_PHASE 16 +#define DEFAULT_SYNC_LPF 3 #define DEFAULT_SYNC_VTH 11 #define DEFAULT_FINE_GAIN 26 #define DEFAULT_FINE_OFFSET 0x80 @@ -45,10 +46,12 @@ const avconfig_t tc_default = { .sync_vth = DEFAULT_SYNC_VTH, .linelen_tol = DEFAULT_LINELEN_TOL, .vsync_thold = DEFAULT_VSYNC_THOLD, + .sync_lpf = DEFAULT_SYNC_LPF, .pre_coast = DEFAULT_PRE_COAST, .post_coast = DEFAULT_POST_COAST, #ifdef DIY_AUDIO .audio_dw_sampl = DEFAULT_ON, + .tx_mode = TX_HDMI, #endif .col = { .r_f_gain = DEFAULT_FINE_GAIN, @@ -63,7 +66,9 @@ const avconfig_t tc_default = { int set_default_avconfig() { memcpy(&tc, &tc_default, sizeof(avconfig_t)); +#ifndef DIY_AUDIO tc.tx_mode = !!(IORD_ALTERA_AVALON_PIO_DATA(PIO_1_BASE) & HDMITX_MODE_MASK); +#endif memcpy(video_modes, video_modes_def, video_mode_cnt*sizeof(mode_data_t)); update_cur_vm = 1;