static void adv7520_hdcp_enable(struct work_struct *work) { DEV_INFO("HDCP: Start reg[0xaf]=%02x (mute audio)\n", reg[0xaf]); adv7520_comm_power(1, 1); /* Mute Audio */ adv7520_write_reg(hclient, 0x0C, (u8)0xC3); msleep(200); /* Wait for BKSV ready interrupt */ /* Read BKSV's keys from HDTV */ reg[0xBF] = adv7520_read_reg(hclient, 0xBF); reg[0xC0] = adv7520_read_reg(hclient, 0xC0); reg[0xC1] = adv7520_read_reg(hclient, 0xC1); reg[0xC2] = adv7520_read_reg(hclient, 0xC2); reg[0xc3] = adv7520_read_reg(hclient, 0xC3); DEV_DBG("HDCP: BKSV={%02x,%02x,%02x,%02x,%02x}\n", reg[0xbf], reg[0xc0], reg[0xc1], reg[0xc2], reg[0xc3]); /* Is SINK repeater */ reg[0xBE] = adv7520_read_reg(hclient, 0xBE); if (~(reg[0xBE] & 0x40)) { ; /* compare with revocation list */ /* Check 20 1's and 20 zero's */ } else { /* Don't implement HDCP if sink as a repeater */ adv7520_write_reg(hclient, 0x0C, (u8)0x84); mutex_lock(&hdcp_state_mutex); hdcp_activating = FALSE; mutex_unlock(&hdcp_state_mutex); DEV_WARN("HDCP: Sink Repeater (%02x), (unmute audio)\n", reg[0xbe]); adv7520_comm_power(0, 1); return; } msleep(200); reg[0xB8] = adv7520_read_reg(hclient, 0xB8); DEV_INFO("HDCP: Status reg[0xB8] is %02x\n", reg[0xb8]); if (reg[0xb8] & 0x40) { /* UnMute Audio */ adv7520_write_reg(hclient, 0x0C, (u8)0x84); DEV_INFO("HDCP: A/V content Encrypted (unmute audio)\n"); external_common_state->hdcp_active = TRUE; } adv7520_comm_power(0, 1); mutex_lock(&hdcp_state_mutex); hdcp_activating = FALSE; mutex_unlock(&hdcp_state_mutex); }
static void adv7520_hdcp_enable(struct work_struct *work) { DEV_INFO("HDCP: Start reg[0xaf]=%02x (mute audio)\n", reg[0xaf]); adv7520_comm_power(1, 1); adv7520_write_reg(hclient, 0x0C, (u8)0xC3); msleep(200); reg[0xBF] = adv7520_read_reg(hclient, 0xBF); reg[0xC0] = adv7520_read_reg(hclient, 0xC0); reg[0xC1] = adv7520_read_reg(hclient, 0xC1); reg[0xC2] = adv7520_read_reg(hclient, 0xC2); reg[0xc3] = adv7520_read_reg(hclient, 0xC3); DEV_DBG("HDCP: BKSV={%02x,%02x,%02x,%02x,%02x}\n", reg[0xbf], reg[0xc0], reg[0xc1], reg[0xc2], reg[0xc3]); reg[0xBE] = adv7520_read_reg(hclient, 0xBE); if (~(reg[0xBE] & 0x40)) { ; } else { adv7520_write_reg(hclient, 0x0C, (u8)0x84); mutex_lock(&hdcp_state_mutex); hdcp_activating = FALSE; mutex_unlock(&hdcp_state_mutex); DEV_WARN("HDCP: Sink Repeater (%02x), (unmute audio)\n", reg[0xbe]); adv7520_comm_power(0, 1); return; } msleep(200); reg[0xB8] = adv7520_read_reg(hclient, 0xB8); DEV_INFO("HDCP: Status reg[0xB8] is %02x\n", reg[0xb8]); if (reg[0xb8] & 0x40) { adv7520_write_reg(hclient, 0x0C, (u8)0x84); DEV_INFO("HDCP: A/V content Encrypted (unmute audio)\n"); external_common_state->hdcp_active = TRUE; } adv7520_comm_power(0, 1); mutex_lock(&hdcp_state_mutex); hdcp_activating = FALSE; mutex_unlock(&hdcp_state_mutex); }