| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2008, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: $ |
|---|
| 11 | * $brcm_Revision: $ |
|---|
| 12 | * $brcm_Date: $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: $ |
|---|
| 19 | * |
|---|
| 20 | ***************************************************************************/ |
|---|
| 21 | #ifndef BAPP_AMOL_H__ |
|---|
| 22 | #define BAPP_AMOL_H__ |
|---|
| 23 | |
|---|
| 24 | #include "bos.h" |
|---|
| 25 | #include "scte_127.h" |
|---|
| 26 | |
|---|
| 27 | //#define AMOL_SOM_48 0xAC /* 7 bits as 1010110, the first bity of AMOL 41 data should |
|---|
| 28 | #define AMOL_SOM_48 0x35 /* reverse 7 bits as 1010110, the first bity of AMOL 41 data should |
|---|
| 29 | be added to LSB of AMOL SOM to form 8 bit data, and |
|---|
| 30 | shift the rest 40 bits for next 5 bytes */ |
|---|
| 31 | //#define AMOL_SOM_96 0xf2 /* 8 bits as 11110010 */ |
|---|
| 32 | #define AMOL_SOM_96 0x4f /* reverse 8 bits as 11110010 */ |
|---|
| 33 | |
|---|
| 34 | #define AMOL_LOWER_LINE 10 /* lower VBI line to check */ |
|---|
| 35 | #define AMOL_UPPER_LINE 22 /* upper VBI line to check */ |
|---|
| 36 | |
|---|
| 37 | typedef enum AMOL_TYPE__ { |
|---|
| 38 | AMOL_TYPE_NONE, |
|---|
| 39 | AMOL_TYPE_I, |
|---|
| 40 | AMOL_TYPE_II_1M, |
|---|
| 41 | AMOL_TYPE_II_2M |
|---|
| 42 | } AMOL_TYPE; |
|---|
| 43 | |
|---|
| 44 | /* mapping to BAVC_Polarity */ |
|---|
| 45 | typedef enum AMOL_FIELD__ { |
|---|
| 46 | AMOL_FIELD_TOP, |
|---|
| 47 | AMOL_FIELD_BOT |
|---|
| 48 | } AMOL_FIELD; |
|---|
| 49 | |
|---|
| 50 | typedef struct bapp_amol *bapp_amol_t; |
|---|
| 51 | |
|---|
| 52 | bapp_amol_t bapp_amol_open(void* p_opaque_app); |
|---|
| 53 | bool bapp_amol_init(bapp_amol_t p_amol); |
|---|
| 54 | void bapp_amol_enable(bapp_amol_t p_amol, bool enable); |
|---|
| 55 | void bapp_amol_close(bapp_amol_t p_amol); |
|---|
| 56 | void bapp_amol_cb(unsigned char* data, int data_len); |
|---|
| 57 | uint32_t bapp_amol_set(bapp_amol_t p_amol, AMOL_TYPE type, AMOL_FIELD field, uint8_t *pAMOLData); |
|---|
| 58 | void bapp_amol_status(bapp_amol_t p_amol); |
|---|
| 59 | |
|---|
| 60 | bool bapp_amol_maks_line(bapp_amol_t p_amol, unsigned char field, unsigned char line1, unsigned char line2); |
|---|
| 61 | |
|---|
| 62 | uint32_t bapp_amol_set_scte_127(bapp_amol_t p_amol, scte_127_data *line_data); |
|---|
| 63 | uint32_t bapp_amol_set_scte_127_ex(bapp_amol_t p_amol, scte_127_data *line_data1, scte_127_data *line_data2); |
|---|
| 64 | |
|---|
| 65 | #endif /* BAPP_AMOL_H__ */ |
|---|