summaryrefslogtreecommitdiff
path: root/tvapi/libtv/tvsetting/TvKeyData.h (plain)
blob: aa7e5144183c5ce9330af535477600a0dc014437
1#ifndef __TV_KEY_DATA_H__
2#define __TV_KEY_DATA_H__
3
4#include <pthread.h>
5#include <stdint.h>
6
7#include "../tv/CTvLog.h"
8#define LOG_TAG "TvKeyData"
9
10#define SSM_CR_RGBOGO_LEN (256)
11#define SSM_CR_RGBOGO_CHKSUM_LEN (2)
12#define SSM_HDMI_PORT_MAX (3)
13#define SSM_HDMI_EDID_SIZE (256)
14
15#define CS_KEY_DATA_NAME_DEV_PATH "/sys/class/aml_keys/aml_keys/key_name"
16#define CS_KEY_DATA_READ_DEV_PATH "/sys/class/aml_keys/aml_keys/key_read"
17#define CS_KEY_DATA_WRITE_DEV_PATH "/sys/class/aml_keys/aml_keys/key_write"
18
19#define CS_MAC_KEY_NAME "mac"
20#define CS_BARCODE_KEY_NAME "usid"
21#define CS_RX_HDCP_KEY_NAME "rxhdcp20"
22#define CS_PROJECT_ID_KEY_NAME "projid"
23
24int ReadKeyData(const char *key_name, unsigned char data_buf[]);
25int WriteKeyData(const char *key_name, int wr_size, char data_buf[]);
26
27int KeyData_SaveProjectID(int rw_val);
28int KeyData_ReadProjectID();
29
30int KeyData_GetMacAddressDataLen();
31int KeyData_ReadMacAddress(unsigned char data_buf[]);
32int KeyData_SaveMacAddress(unsigned char data_buf[]);
33
34int KeyData_GetBarCodeDataLen();
35int KeyData_ReadBarCode(unsigned char data_buf[]);
36int KeyData_SaveBarCode(unsigned char data_buf[]);
37
38int SSMReadHDCPKey(unsigned char hdcp_key_buf[]);
39int SSMSaveHDCPKey(unsigned char hdcp_key_buf[]);
40int SSMSetHDCPKey();
41int SSMGetHDCPKeyDataLen();
42int SSMRefreshHDCPKey();
43
44
45int SSMReadHDMIEdid(int port, unsigned char hdmi_edid_buf[]);
46int SSMSetHDMIEdid(int port);
47
48int SSMSaveRGBOGOValue(int offset, int size, unsigned char data_buf[]);
49int SSMReadRGBOGOValue(int offset, int size, unsigned char data_buf[]);
50
51int SSMReadAudioNoLinePoints(int offset, int size, unsigned char tmp_buf[]);
52int SSMSaveAudioNoLinePoints(int offset, int size, unsigned char tmp_buf[]);
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif //__TV_KEY_DATA_H__
63