#include "hdmi_rx_hw.h"
static unsigned char edid_temp[EDID_SIZE];
-static char edid_buf[MAX_EDID_BUF_SIZE] = {0x0};
+static char edid_buf[MAX_EDID_BUF_SIZE];
static int edid_size;
struct edid_data_s tmp_edid_data;
int arc_port_id;
MODULE_PARM_DESC(new_hdr_lum, "\n new_hdr_lum\n");
module_param(new_hdr_lum, bool, 0664);
-/*
- * 1:reset hpd after atmos edid update
- * 0:not reset hpd after atmos edid update
- */
-bool atmos_edid_update_hpd_en = 1;
-
-
/* hdmi1.4 edid */
static unsigned char edid_14[] = {
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
unsigned char rx_get_edid_index(void)
{
- /* if ((edid_mode == 0) && */
- /* edid_size > 4 && */
- /* edid_buf[0] == 'E' && */
- /* edid_buf[1] == 'D' && */
- /* edid_buf[2] == 'I' && */
- /* edid_buf[3] == 'D') { */
- /* rx_pr("edid: use Top edid\n"); */
- /* return EDID_LIST_BUFF; */
- /* } else { */
- /* if (edid_mode == 0) */
- /* return EDID_LIST_14; */
- /* else if (edid_mode < EDID_LIST_NUM) */
- /* return edid_mode; */
- /* else */
- /* return EDID_LIST_14; */
- /* } */
- if ((edid_mode < EDID_LIST_NUM) &&
- (edid_mode > EDID_LIST_BUFF))
- return edid_mode;
- else {
- if ((edid_mode == 0) &&
- edid_size > 4 &&
- edid_buf[0] == 'E' &&
- edid_buf[1] == 'D' &&
- edid_buf[2] == 'I' &&
- edid_buf[3] == 'D')
+ if (edid_mode == 0) {
+ if ((edid_buf[0] == 'E') &&
+ (edid_buf[1] == 'D') &&
+ (edid_buf[2] == 'I') &&
+ (edid_buf[3] == 'D')) {
rx_pr("edid: use Top edid\n");
- return EDID_LIST_BUFF;
- }
+ return EDID_LIST_BUFF;
+ } else
+ return EDID_LIST_14;
+ } else if (edid_mode < EDID_LIST_NUM)
+ return edid_mode;
+ else
+ return EDID_LIST_14;
}
unsigned char *rx_get_edid_buffer(unsigned char index)
((aud_data & 0xff) == 1)) {
if (!need_support_atmos_bit) {
need_support_atmos_bit = true;
- hdmi_rx_top_edid_update();
if (rx.open_fg) {
- if (atmos_edid_update_hpd_en)
- rx_send_hpd_pulse();
+ hdmi_rx_top_edid_update();
+ rx_send_hpd_pulse();
rx_pr("*update edid-atmos*\n");
} else
pre_port = 0xff;
} else {
if (need_support_atmos_bit) {
need_support_atmos_bit = false;
- hdmi_rx_top_edid_update();
if (rx.open_fg) {
- if (atmos_edid_update_hpd_en)
- rx_send_hpd_pulse();
+ hdmi_rx_top_edid_update();
+ rx_send_hpd_pulse();
rx_pr("*update edid-no atmos*\n");
} else
pre_port = 0xff;
return 0;
}
-/*
- * audio parse the atmos info and inform hdmirx via a flag
- */
-void rx_set_atmos_flag(bool en)
-{
- if (need_support_atmos_bit != en) {
- need_support_atmos_bit = en;
- hdmi_rx_top_edid_update();
- if (rx.open_fg) {
- if (atmos_edid_update_hpd_en)
- rx_send_hpd_pulse();
- rx_pr("*update edid-atmos*\n");
- } else
- pre_port = 0xff;
- }
-}
-EXPORT_SYMBOL(rx_set_atmos_flag);
-
-bool rx_get_atmos_flag(void)
-{
- return need_support_atmos_bit;
-}
-EXPORT_SYMBOL(rx_get_atmos_flag);
-
unsigned char get_atmos_offset(unsigned char *p_edid)
{
unsigned char max_offset = 0;
if (offset == 0)
rx_pr("can not find atmos info\n");
else {
- if (need_support_atmos_bit)
- p_edid[offset] = 1;
- else
- p_edid[offset] = 0;
+ p_edid[offset] = 1;
rx_pr("offset = %d\n", offset);
}
return 0;
rx_get_edid_size(edid_index));
}
- /* if (need_support_atmos_bit) */
- rx_edid_update_atmos(pedid_data);
+ if (need_support_atmos_bit)
+ rx_edid_update_atmos(pedid_data);
/* caculate physical address and checksum */
sts = rx_edid_cal_phy_addr(brepeat,
if (set_pr_var(tmpbuf, sig_unstable_reset_hpd_max, value, &index, ret))
return pr_var(sig_unstable_reset_hpd_max, index);
#endif
- if (set_pr_var(tmpbuf, atmos_edid_update_hpd_en, value, &index, ret))
- return pr_var(atmos_edid_update_hpd_en, index);
if (set_pr_var(tmpbuf, suspend_pddq_sel, value, &index, ret))
return pr_var(suspend_pddq_sel, index);
if (set_pr_var(tmpbuf, aud_ch_map, value, &index, ret))
pr_var(enable_hpd_reset, i++);
pr_var(sig_unstable_reset_hpd_max, i++);
#endif
- pr_var(atmos_edid_update_hpd_en, i++);
pr_var(suspend_pddq_sel, i++);
pr_var(aud_ch_map, i++);
}