| From 90f48e9d90f4e36546d1056e1b84bdba3d67cb29 Mon Sep 17 00:00:00 2001 |
| From: "hongyu.chen" <hongyu.chen@amlogic.com> |
| Date: Thu, 10 Nov 2022 14:39:06 +0800 |
| Subject: [PATCH 04/11] demux: remove the modification to the uapi/linux/dvb |
| header file. [1/3] |
| |
| PD#SWPL-98901 |
| |
| Problem: |
| cant not modify uapi/linux/dvb header file. |
| |
| Solution: |
| move the modification of uapi/linux/dvb to the new header file. |
| |
| Verify: |
| no verify. |
| |
| Signed-off-by: hongyu.chen <hongyu.chen@amlogic.com> |
| Change-Id: I392437e009fa19e6faff0eb389bf0c3c127fbc69 |
| --- |
| drivers/media/dvb-core/dmxdev.c | 4 + |
| include/media/demux.h | 16 +- |
| include/uapi/linux/dvb/aml_ca_ext.h | 188 +++++++++++++++++++++++ |
| include/uapi/linux/dvb/aml_dmx_ext.h | 213 +++++++++++++++++++++++++++ |
| include/uapi/linux/dvb/ca.h | 172 +-------------------- |
| include/uapi/linux/dvb/dmx.h | 194 ------------------------ |
| 6 files changed, 414 insertions(+), 373 deletions(-) |
| create mode 100644 include/uapi/linux/dvb/aml_ca_ext.h |
| create mode 100644 include/uapi/linux/dvb/aml_dmx_ext.h |
| |
| diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c |
| index 61436f4a18c8..9dcbb9a828db 100644 |
| --- a/drivers/media/dvb-core/dmxdev.c |
| +++ b/drivers/media/dvb-core/dmxdev.c |
| @@ -20,6 +20,10 @@ |
| #include <media/dmxdev.h> |
| #include <media/dvb_vb2.h> |
| |
| +#ifdef CONFIG_AMLOGIC_DVB_COMPAT |
| +#include <uapi/linux/dvb/aml_dmx_ext.h> |
| +#endif |
| + |
| static int debug; |
| |
| module_param(debug, int, 0644); |
| diff --git a/include/media/demux.h b/include/media/demux.h |
| index 149ce6270729..c6d6dbe3a497 100644 |
| --- a/include/media/demux.h |
| +++ b/include/media/demux.h |
| @@ -599,23 +599,23 @@ struct dmx_demux { |
| #ifdef CONFIG_AMLOGIC_DVB_COMPAT |
| int (*set_input)(struct dmx_demux *demux, int source); |
| int (*get_ts_mem_info)(struct dmx_demux *demux, |
| - struct dmx_ts_feed *feed, |
| - struct dmx_mem_info *info); |
| + void *feed, |
| + void *info); |
| int (*get_sec_mem_info)(struct dmx_demux *demux, |
| - struct dmx_section_feed *feed, |
| - struct dmx_mem_info *info); |
| + void *feed, |
| + void *info); |
| int (*set_hw_source)(struct dmx_demux *demux, int hw_source); |
| int (*get_hw_source)(struct dmx_demux *demux, int *hw_source); |
| int (*get_dmx_mem_info)(struct dmx_demux *demux, |
| - struct dmx_filter_mem_info *info); |
| + void *info); |
| int (*set_sec_mem)(struct dmx_demux *demux, |
| - struct dmx_sec_mem *sec_mem); |
| + void *sec_mem); |
| int (*get_dvr_mem)(struct dmx_demux *demux, |
| - struct dvr_mem_info *info); |
| + void *info); |
| int (*remap_pid)(struct dmx_demux *demux, |
| u16 pids[2]); |
| int (*decode_info)(struct dmx_demux *demux, |
| - struct decoder_mem_info *info); |
| + void *info); |
| #endif |
| }; |
| |
| diff --git a/include/uapi/linux/dvb/aml_ca_ext.h b/include/uapi/linux/dvb/aml_ca_ext.h |
| new file mode 100644 |
| index 000000000000..b3155f46fb68 |
| --- /dev/null |
| +++ b/include/uapi/linux/dvb/aml_ca_ext.h |
| @@ -0,0 +1,188 @@ |
| +/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */ |
| + |
| +/* |
| + * Copyright (c) 2019 Amlogic, Inc. All rights reserved. |
| + */ |
| + |
| +#ifndef _AML_CA_EXIT_H_ |
| +#define _AML_CA_EXIT_H_ |
| + |
| +#ifdef __KERNEL__ |
| +#include <linux/dvb/ca.h> |
| +#else |
| +#include "ca.h" |
| +#endif |
| + |
| +/* amlogic define */ |
| +/* CW type. */ |
| +enum ca_cw_type { |
| + CA_CW_DVB_CSA_EVEN, |
| + CA_CW_DVB_CSA_ODD, |
| + CA_CW_AES_EVEN, |
| + CA_CW_AES_ODD, |
| + CA_CW_AES_EVEN_IV, |
| + CA_CW_AES_ODD_IV, |
| + CA_CW_DES_EVEN, |
| + CA_CW_DES_ODD, |
| + CA_CW_SM4_EVEN, |
| + CA_CW_SM4_ODD, |
| + CA_CW_SM4_EVEN_IV, |
| + CA_CW_SM4_ODD_IV, |
| + CA_CW_TYPE_MAX |
| +}; |
| + |
| +enum ca_dsc_mode { |
| + CA_DSC_CBC = 1, |
| + CA_DSC_ECB, |
| + CA_DSC_IDSA |
| +}; |
| + |
| +struct ca_descr_ex { |
| + unsigned int index; |
| + enum ca_cw_type type; |
| + enum ca_dsc_mode mode; |
| + int flags; |
| +#define CA_CW_FROM_KL 1 |
| + unsigned char cw[16]; |
| +}; |
| + |
| +/* add for support sc2 ca*/ |
| +enum ca_sc2_cmd_type { |
| + CA_ALLOC, |
| + CA_FREE, |
| + CA_KEY, |
| + CA_GET_STATUS, |
| + CA_SET_SCB, |
| + CA_SET_ALGO |
| +}; |
| + |
| +enum ca_sc2_algo_type { |
| + CA_ALGO_AES_ECB_CLR_END, |
| + CA_ALGO_AES_ECB_CLR_FRONT, |
| + CA_ALGO_AES_CBC_CLR_END, |
| + CA_ALGO_AES_CBC_IDSA, |
| + CA_ALGO_CSA2, |
| + CA_ALGO_DES_SCTE41, |
| + CA_ALGO_DES_SCTE52, |
| + CA_ALGO_TDES_ECB_CLR_END, |
| + CA_ALGO_CPCM_LSA_MDI_CBC, |
| + CA_ALGO_CPCM_LSA_MDD_CBC, |
| + CA_ALGO_CSA3, |
| + CA_ALGO_ASA, |
| + CA_ALGO_ASA_LIGHT, |
| + CA_ALGO_S17_ECB_CLR_END, |
| + CA_ALGO_S17_ECB_CTS, |
| + CA_ALGO_UNKNOWN |
| +}; |
| + |
| +enum ca_sc2_dsc_type { |
| + CA_DSC_COMMON_TYPE, |
| + CA_DSC_TSD_TYPE, /*just support AES descramble.*/ |
| + CA_DSC_TSE_TYPE /*just support AES enscramble.*/ |
| +}; |
| + |
| +/** |
| + * struct ca_alloc - malloc ca slot index by params |
| + * |
| + * @pid: slot use pid. |
| + * @algo: use the algorithm |
| + * @dsc_type: CA_DSC_COMMON_TYPE:support all ca_algo_type |
| + * CA_DSC_TSD_TYPE & CA_DSC_TSE_TYPE just support AES |
| + * @ca_index: return slot index. |
| + * @loop: 0: just descramble once. |
| + * 1: descramble twice. |
| + */ |
| +struct ca_sc2_alloc { |
| + unsigned int pid; |
| + enum ca_sc2_algo_type algo; |
| + enum ca_sc2_dsc_type dsc_type; |
| + unsigned int ca_index; |
| + unsigned char loop; |
| +}; |
| + |
| +/** |
| + * struct ca_sc2_free - free slot index |
| + * |
| + * @ca_index: need free slot index. |
| + */ |
| +struct ca_sc2_free { |
| + unsigned int ca_index; |
| +}; |
| + |
| +enum ca_sc2_key_type { |
| + CA_KEY_EVEN_TYPE, |
| + CA_KEY_EVEN_IV_TYPE, |
| + CA_KEY_ODD_TYPE, |
| + CA_KEY_ODD_IV_TYPE, |
| + CA_KEY_00_TYPE, |
| + CA_KEY_00_IV_TYPE |
| +}; |
| + |
| +/** |
| + * struct ca_sc2_key - set key slot index |
| + * |
| + * @ca_index: use slot index. |
| + * @parity: key type (odd/even/key00) |
| + * @key_index: key store index. |
| + */ |
| +struct ca_sc2_key { |
| + unsigned int ca_index; |
| + enum ca_sc2_key_type parity; |
| + unsigned int key_index; |
| +}; |
| + |
| +/** |
| + * struct ca_sc2_scb - set scb |
| + * |
| + * @ca_index: use slot index. |
| + * @ca_scb: ca_scb (2bit) |
| + * @ca_scb_as_is:if 1, scb use original |
| + * if 0, use ca_scb |
| + */ |
| +struct ca_sc2_scb { |
| + unsigned int ca_index; |
| + unsigned char ca_scb; |
| + unsigned char ca_scb_as_is; |
| +}; |
| + |
| +/** |
| + * struct ca_sc2_algo - set algo |
| + * |
| + * @ca_index: use slot index. |
| + * @algo: algo |
| + */ |
| +struct ca_sc2_algo { |
| + unsigned int ca_index; |
| + enum ca_sc2_algo_type algo; |
| +}; |
| + |
| +/** |
| + * struct ca_sc2_descr_ex - ca extend descriptor |
| + * |
| + * @params: command resource params |
| + */ |
| +struct ca_sc2_descr_ex { |
| + enum ca_sc2_cmd_type cmd; |
| + union { |
| + struct ca_sc2_alloc alloc_params; |
| + struct ca_sc2_free free_params; |
| + struct ca_sc2_key key_params; |
| + struct ca_sc2_scb scb_params; |
| + struct ca_sc2_algo algo_params; |
| + } params; |
| +}; |
| + |
| +struct ca_pid { |
| + unsigned int pid; |
| + int index; /* -1 == disable*/ |
| +}; |
| + |
| +/* amlogic define end */ |
| + |
| +/* amlogic define */ |
| +#define CA_SET_PID _IOW('o', 135, struct ca_pid) |
| +#define CA_SET_DESCR_EX _IOW('o', 200, struct ca_descr_ex) |
| +#define CA_SC2_SET_DESCR_EX _IOWR('o', 201, struct ca_sc2_descr_ex) |
| +/* amlogic define end */ |
| + |
| +#endif |
| diff --git a/include/uapi/linux/dvb/aml_dmx_ext.h b/include/uapi/linux/dvb/aml_dmx_ext.h |
| new file mode 100644 |
| index 000000000000..e4690685d044 |
| --- /dev/null |
| +++ b/include/uapi/linux/dvb/aml_dmx_ext.h |
| @@ -0,0 +1,213 @@ |
| +/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */ |
| +/* |
| + * Copyright (c) 2019 Amlogic, Inc. All rights reserved. |
| + */ |
| + |
| +#ifndef _UAPI_AML_DVBDMX_EXT_H_ |
| +#define _UAPI_AML_DVBDMX_EXT_H_ |
| + |
| +#ifdef __KERNEL__ |
| +#include <linux/dvb/dmx.h> |
| +#else |
| +#include "dmx.h" |
| +#endif |
| + |
| +/* amlogic define */ |
| +#define DMX_USE_SWFILTER 0x100 |
| + |
| +/*bit 8~15 for mem sec_level*/ |
| +#define DMX_MEM_SEC_LEVEL1 (1 << 10) |
| +#define DMX_MEM_SEC_LEVEL2 (2 << 10) |
| +#define DMX_MEM_SEC_LEVEL3 (3 << 10) |
| +#define DMX_MEM_SEC_LEVEL4 (4 << 10) |
| +#define DMX_MEM_SEC_LEVEL5 (5 << 10) |
| +#define DMX_MEM_SEC_LEVEL6 (6 << 10) |
| +#define DMX_MEM_SEC_LEVEL7 (7 << 10) |
| +/* amlogic define end */ |
| + |
| +/*amlogic define*/ |
| +enum dmx_input_source { |
| + INPUT_DEMOD, |
| + INPUT_LOCAL, |
| + INPUT_LOCAL_SEC |
| +}; |
| + |
| +/** |
| + * struct dmx_non_sec_es_header - non-sec Elementary Stream (ES) Header |
| + * |
| + * @pts_dts_flag:[1:0], 01:pts valid, 10:dts valid |
| + * @pts: pts value |
| + * @dts: dts value |
| + * @len: data len |
| + */ |
| +struct dmx_non_sec_es_header { |
| + __u8 pts_dts_flag; |
| + __u64 pts; |
| + __u64 dts; |
| + __u32 len; |
| +}; |
| + |
| +/** |
| + * struct dmx_sec_es_data - sec Elementary Stream (ES) |
| + * |
| + * @pts_dts_flag:[1:0], 01:pts valid, 10:dts valid |
| + * @pts: pts value |
| + * @dts: dts value |
| + * @buf_start: buf start addr |
| + * @buf_end: buf end addr |
| + * @data_start: data start addr |
| + * @data_end: data end addr |
| + */ |
| +struct dmx_sec_es_data { |
| + __u8 pts_dts_flag; |
| + __u64 pts; |
| + __u64 dts; |
| + __u32 buf_start; |
| + __u32 buf_end; |
| + __u32 data_start; |
| + __u32 data_end; |
| +}; |
| + |
| +struct dmx_sec_ts_data { |
| + __u32 buf_start; |
| + __u32 buf_end; |
| + __u32 data_start; |
| + __u32 data_end; |
| +}; |
| + |
| +struct dmx_temi_data { |
| + __u8 pts_dts_flag; |
| + __u64 pts; |
| + __u64 dts; |
| + __u8 temi[188]; |
| +}; |
| + |
| +enum dmx_audio_format { |
| + AUDIO_UNKNOWN = 0, /* unknown media */ |
| + AUDIO_MPX = 1, /* mpeg audio MP2/MP3 */ |
| + AUDIO_AC3 = 2, /* Dolby AC3/EAC3 */ |
| + AUDIO_AAC_ADTS = 3, /* AAC-ADTS */ |
| + AUDIO_AAC_LOAS = 4, /* AAC-LOAS */ |
| + AUDIO_DTS = 5, /* DTS */ |
| + AUDIO_MAX |
| +}; |
| + |
| +struct dmx_mem_info { |
| + __u32 dmx_total_size; |
| + __u32 dmx_buf_phy_start; |
| + __u32 dmx_free_size; |
| + __u32 dvb_core_total_size; |
| + __u32 dvb_core_free_size; |
| + __u32 wp_offset; |
| + __u64 newest_pts; |
| +}; |
| + |
| +struct dmx_sec_mem { |
| + __u32 buff; |
| + __u32 size; |
| +}; |
| + |
| +/* amlogic define end */ |
| + |
| +/*amlogic define*/ |
| +/*bit 8~15 for mem sec_level*/ |
| +#define DMX_MEM_SEC_LEVEL1 (1 << 10) |
| +#define DMX_MEM_SEC_LEVEL2 (2 << 10) |
| +#define DMX_MEM_SEC_LEVEL3 (3 << 10) |
| +#define DMX_MEM_SEC_LEVEL4 (4 << 10) |
| +#define DMX_MEM_SEC_LEVEL5 (5 << 10) |
| +#define DMX_MEM_SEC_LEVEL6 (6 << 10) |
| +#define DMX_MEM_SEC_LEVEL7 (7 << 10) |
| + |
| +/*bit 16~23 for output */ |
| +#define DMX_ES_OUTPUT (1 << 16) |
| +/*set raw mode, it will send the struct dmx_sec_es_data, not es data*/ |
| +#define DMX_OUTPUT_RAW_MODE (1 << 17) |
| + |
| +#define DMX_TEMI_FLAGS (1 << 18) |
| + |
| +/*24~31 one byte for audio type, dmx_audio_format_t*/ |
| +#define DMX_AUDIO_FORMAT_BIT 24 |
| + |
| +/* amlogic define end */ |
| + |
| +/* amlogic define */ |
| +enum { |
| + DMA_0 = 0, |
| + DMA_1, |
| + DMA_2, |
| + DMA_3, |
| + DMA_4, |
| + DMA_5, |
| + DMA_6, |
| + DMA_7, |
| + FRONTEND_TS0 = 32, |
| + FRONTEND_TS1, |
| + FRONTEND_TS2, |
| + FRONTEND_TS3, |
| + FRONTEND_TS4, |
| + FRONTEND_TS5, |
| + FRONTEND_TS6, |
| + FRONTEND_TS7, |
| + DMA_0_1 = 64, |
| + DMA_1_1, |
| + DMA_2_1, |
| + DMA_3_1, |
| + DMA_4_1, |
| + DMA_5_1, |
| + DMA_6_1, |
| + DMA_7_1, |
| + FRONTEND_TS0_1 = 96, |
| + FRONTEND_TS1_1, |
| + FRONTEND_TS2_1, |
| + FRONTEND_TS3_1, |
| + FRONTEND_TS4_1, |
| + FRONTEND_TS5_1, |
| + FRONTEND_TS6_1, |
| + FRONTEND_TS7_1, |
| +}; |
| + |
| +/*define filter mem_info type*/ |
| +enum { |
| + DMX_VIDEO_TYPE = 0, |
| + DMX_AUDIO_TYPE, |
| + DMX_SUBTITLE_TYPE, |
| + DMX_TELETEXT_TYPE, |
| + DMX_SECTION_TYPE, |
| +}; |
| + |
| +struct filter_mem_info { |
| + __u32 type; |
| + __u32 pid; |
| + struct dmx_mem_info filter_info; |
| +}; |
| + |
| +struct dmx_filter_mem_info { |
| + __u32 filter_num; |
| + struct filter_mem_info info[40]; |
| +}; |
| + |
| +struct dvr_mem_info { |
| + __u32 wp_offset; |
| +}; |
| + |
| +struct decoder_mem_info { |
| + __u32 rp_phy; |
| +}; |
| + |
| +/* amlogic define end */ |
| + |
| +/* amlogic define */ |
| +#define DMX_SET_INPUT _IO('o', 80) |
| +#define DMX_GET_MEM_INFO _IOR('o', 81, struct dmx_mem_info) |
| +#define DMX_SET_HW_SOURCE _IO('o', 82) |
| +#define DMX_GET_HW_SOURCE _IOR('o', 83, int) |
| +#define DMX_GET_FILTER_MEM_INFO _IOR('o', 84, struct dmx_filter_mem_info) |
| +/*just for dvr sec mem, please call before DMX_SET_PES_FILTER*/ |
| +#define DMX_SET_SEC_MEM _IOW('o', 85, struct dmx_sec_mem) |
| +#define DMX_GET_DVR_MEM _IOR('o', 86, struct dvr_mem_info) |
| +#define DMX_REMAP_PID _IOR('o', 87, __u16[2]) |
| +#define DMX_SET_DECODE_INFO _IOW('o', 88, struct decoder_mem_info) |
| +/* amlogic define end */ |
| + |
| +#endif |
| diff --git a/include/uapi/linux/dvb/ca.h b/include/uapi/linux/dvb/ca.h |
| index f575fd5cde4b..b2f4d0a3215c 100644 |
| --- a/include/uapi/linux/dvb/ca.h |
| +++ b/include/uapi/linux/dvb/ca.h |
| @@ -117,172 +117,6 @@ struct ca_descr { |
| unsigned char cw[8]; |
| }; |
| |
| -/* amlogic define */ |
| -/* CW type. */ |
| -enum ca_cw_type { |
| - CA_CW_DVB_CSA_EVEN, |
| - CA_CW_DVB_CSA_ODD, |
| - CA_CW_AES_EVEN, |
| - CA_CW_AES_ODD, |
| - CA_CW_AES_EVEN_IV, |
| - CA_CW_AES_ODD_IV, |
| - CA_CW_DES_EVEN, |
| - CA_CW_DES_ODD, |
| - CA_CW_SM4_EVEN, |
| - CA_CW_SM4_ODD, |
| - CA_CW_SM4_EVEN_IV, |
| - CA_CW_SM4_ODD_IV, |
| - CA_CW_TYPE_MAX |
| -}; |
| - |
| -enum ca_dsc_mode { |
| - CA_DSC_CBC = 1, |
| - CA_DSC_ECB, |
| - CA_DSC_IDSA |
| -}; |
| - |
| -struct ca_descr_ex { |
| - unsigned int index; |
| - enum ca_cw_type type; |
| - enum ca_dsc_mode mode; |
| - int flags; |
| -#define CA_CW_FROM_KL 1 |
| - unsigned char cw[16]; |
| -}; |
| - |
| -/* add for support sc2 ca*/ |
| -enum ca_sc2_cmd_type { |
| - CA_ALLOC, |
| - CA_FREE, |
| - CA_KEY, |
| - CA_GET_STATUS, |
| - CA_SET_SCB, |
| - CA_SET_ALGO |
| -}; |
| - |
| -enum ca_sc2_algo_type { |
| - CA_ALGO_AES_ECB_CLR_END, |
| - CA_ALGO_AES_ECB_CLR_FRONT, |
| - CA_ALGO_AES_CBC_CLR_END, |
| - CA_ALGO_AES_CBC_IDSA, |
| - CA_ALGO_CSA2, |
| - CA_ALGO_DES_SCTE41, |
| - CA_ALGO_DES_SCTE52, |
| - CA_ALGO_TDES_ECB_CLR_END, |
| - CA_ALGO_CPCM_LSA_MDI_CBC, |
| - CA_ALGO_CPCM_LSA_MDD_CBC, |
| - CA_ALGO_CSA3, |
| - CA_ALGO_ASA, |
| - CA_ALGO_ASA_LIGHT, |
| - CA_ALGO_S17_ECB_CLR_END, |
| - CA_ALGO_S17_ECB_CTS, |
| - CA_ALGO_UNKNOWN |
| -}; |
| - |
| -enum ca_sc2_dsc_type { |
| - CA_DSC_COMMON_TYPE, |
| - CA_DSC_TSD_TYPE, /*just support AES descramble.*/ |
| - CA_DSC_TSE_TYPE /*just support AES enscramble.*/ |
| -}; |
| - |
| -/** |
| - * struct ca_alloc - malloc ca slot index by params |
| - * |
| - * @pid: slot use pid. |
| - * @algo: use the algorithm |
| - * @dsc_type: CA_DSC_COMMON_TYPE:support all ca_algo_type |
| - * CA_DSC_TSD_TYPE & CA_DSC_TSE_TYPE just support AES |
| - * @ca_index: return slot index. |
| - * @loop: 0: just descramble once. |
| - * 1: descramble twice. |
| - */ |
| -struct ca_sc2_alloc { |
| - unsigned int pid; |
| - enum ca_sc2_algo_type algo; |
| - enum ca_sc2_dsc_type dsc_type; |
| - unsigned int ca_index; |
| - unsigned char loop; |
| -}; |
| - |
| -/** |
| - * struct ca_sc2_free - free slot index |
| - * |
| - * @ca_index: need free slot index. |
| - */ |
| -struct ca_sc2_free { |
| - unsigned int ca_index; |
| -}; |
| - |
| -enum ca_sc2_key_type { |
| - CA_KEY_EVEN_TYPE, |
| - CA_KEY_EVEN_IV_TYPE, |
| - CA_KEY_ODD_TYPE, |
| - CA_KEY_ODD_IV_TYPE, |
| - CA_KEY_00_TYPE, |
| - CA_KEY_00_IV_TYPE |
| -}; |
| - |
| -/** |
| - * struct ca_sc2_key - set key slot index |
| - * |
| - * @ca_index: use slot index. |
| - * @parity: key type (odd/even/key00) |
| - * @key_index: key store index. |
| - */ |
| -struct ca_sc2_key { |
| - unsigned int ca_index; |
| - enum ca_sc2_key_type parity; |
| - unsigned int key_index; |
| -}; |
| - |
| -/** |
| - * struct ca_sc2_scb - set scb |
| - * |
| - * @ca_index: use slot index. |
| - * @ca_scb: ca_scb (2bit) |
| - * @ca_scb_as_is:if 1, scb use original |
| - * if 0, use ca_scb |
| - */ |
| -struct ca_sc2_scb { |
| - unsigned int ca_index; |
| - unsigned char ca_scb; |
| - unsigned char ca_scb_as_is; |
| -}; |
| - |
| -/** |
| - * struct ca_sc2_algo - set algo |
| - * |
| - * @ca_index: use slot index. |
| - * @algo: algo |
| - */ |
| -struct ca_sc2_algo { |
| - unsigned int ca_index; |
| - enum ca_sc2_algo_type algo; |
| -}; |
| - |
| -/** |
| - * struct ca_sc2_descr_ex - ca externd descriptor |
| - * |
| - * @params: command resource params |
| - */ |
| -struct ca_sc2_descr_ex { |
| - enum ca_sc2_cmd_type cmd; |
| - union { |
| - struct ca_sc2_alloc alloc_params; |
| - struct ca_sc2_free free_params; |
| - struct ca_sc2_key key_params; |
| - struct ca_sc2_scb scb_params; |
| - struct ca_sc2_algo algo_params; |
| - } params; |
| -}; |
| - |
| -struct ca_pid { |
| - unsigned int pid; |
| - int index; /* -1 == disable*/ |
| -}; |
| - |
| -/* amlogic define end */ |
| - |
| #define CA_RESET _IO('o', 128) |
| #define CA_GET_CAP _IOR('o', 129, struct ca_caps) |
| #define CA_GET_SLOT_INFO _IOR('o', 130, struct ca_slot_info) |
| @@ -290,11 +124,7 @@ struct ca_pid { |
| #define CA_GET_MSG _IOR('o', 132, struct ca_msg) |
| #define CA_SEND_MSG _IOW('o', 133, struct ca_msg) |
| #define CA_SET_DESCR _IOW('o', 134, struct ca_descr) |
| -/* amlogic define */ |
| -#define CA_SET_PID _IOW('o', 135, struct ca_pid) |
| -#define CA_SET_DESCR_EX _IOW('o', 200, struct ca_descr_ex) |
| -#define CA_SC2_SET_DESCR_EX _IOWR('o', 201, struct ca_sc2_descr_ex) |
| -/* amlogic define end */ |
| + |
| #if !defined(__KERNEL__) |
| |
| /* This is needed for legacy userspace support */ |
| diff --git a/include/uapi/linux/dvb/dmx.h b/include/uapi/linux/dvb/dmx.h |
| index c38306f08cbe..a8c40496ff04 100644 |
| --- a/include/uapi/linux/dvb/dmx.h |
| +++ b/include/uapi/linux/dvb/dmx.h |
| @@ -162,104 +162,8 @@ struct dmx_sct_filter_params { |
| #define DMX_CHECK_CRC 1 |
| #define DMX_ONESHOT 2 |
| #define DMX_IMMEDIATE_START 4 |
| -/* amlogic define */ |
| -#define DMX_USE_SWFILTER 0x100 |
| - |
| -/*bit 8~15 for mem sec_level*/ |
| -#define DMX_MEM_SEC_LEVEL1 (1 << 10) |
| -#define DMX_MEM_SEC_LEVEL2 (2 << 10) |
| -#define DMX_MEM_SEC_LEVEL3 (3 << 10) |
| -#define DMX_MEM_SEC_LEVEL4 (4 << 10) |
| -#define DMX_MEM_SEC_LEVEL5 (5 << 10) |
| -#define DMX_MEM_SEC_LEVEL6 (6 << 10) |
| -#define DMX_MEM_SEC_LEVEL7 (7 << 10) |
| -/* amlogic define end */ |
| -}; |
| - |
| -/*amlogic define*/ |
| -enum dmx_input_source { |
| - INPUT_DEMOD, |
| - INPUT_LOCAL, |
| - INPUT_LOCAL_SEC |
| -}; |
| - |
| -/** |
| - * struct dmx_non_sec_es_header - non-sec Elementary Stream (ES) Header |
| - * |
| - * @pts_dts_flag:[1:0], 01:pts valid, 10:dts valid |
| - * @pts: pts value |
| - * @dts: dts value |
| - * @len: data len |
| - */ |
| -struct dmx_non_sec_es_header { |
| - __u8 pts_dts_flag; |
| - __u64 pts; |
| - __u64 dts; |
| - __u32 len; |
| -}; |
| - |
| -/** |
| - * struct dmx_sec_es_data - sec Elementary Stream (ES) |
| - * |
| - * @pts_dts_flag:[1:0], 01:pts valid, 10:dts valid |
| - * @pts: pts value |
| - * @dts: dts value |
| - * @buf_start: buf start addr |
| - * @buf_end: buf end addr |
| - * @data_start: data start addr |
| - * @data_end: data end addr |
| - */ |
| -struct dmx_sec_es_data { |
| - __u8 pts_dts_flag; |
| - __u64 pts; |
| - __u64 dts; |
| - __u32 buf_start; |
| - __u32 buf_end; |
| - __u32 data_start; |
| - __u32 data_end; |
| -}; |
| - |
| -struct dmx_sec_ts_data { |
| - __u32 buf_start; |
| - __u32 buf_end; |
| - __u32 data_start; |
| - __u32 data_end; |
| -}; |
| - |
| -struct dmx_temi_data { |
| - __u8 pts_dts_flag; |
| - __u64 pts; |
| - __u64 dts; |
| - __u8 temi[188]; |
| -}; |
| - |
| -enum dmx_audio_format { |
| - AUDIO_UNKNOWN = 0, /* unknown media */ |
| - AUDIO_MPX = 1, /* mpeg audio MP2/MP3 */ |
| - AUDIO_AC3 = 2, /* Dolby AC3/EAC3 */ |
| - AUDIO_AAC_ADTS = 3, /* AAC-ADTS */ |
| - AUDIO_AAC_LOAS = 4, /* AAC-LOAS */ |
| - AUDIO_DTS = 5, /* DTS */ |
| - AUDIO_MAX |
| -}; |
| - |
| -struct dmx_mem_info { |
| - __u32 dmx_total_size; |
| - __u32 dmx_buf_phy_start; |
| - __u32 dmx_free_size; |
| - __u32 dvb_core_total_size; |
| - __u32 dvb_core_free_size; |
| - __u32 wp_offset; |
| - __u64 newest_pts; |
| -}; |
| - |
| -struct dmx_sec_mem { |
| - __u32 buff; |
| - __u32 size; |
| }; |
| |
| -/* amlogic define end */ |
| - |
| /** |
| * struct dmx_pes_filter_params - Specifies Packetized Elementary Stream (PES) |
| * filter parameters. |
| @@ -276,26 +180,6 @@ struct dmx_pes_filter_params { |
| enum dmx_output output; |
| enum dmx_ts_pes pes_type; |
| __u32 flags; |
| - /*amlogic define*/ |
| -/*bit 8~15 for mem sec_level*/ |
| -#define DMX_MEM_SEC_LEVEL1 (1 << 10) |
| -#define DMX_MEM_SEC_LEVEL2 (2 << 10) |
| -#define DMX_MEM_SEC_LEVEL3 (3 << 10) |
| -#define DMX_MEM_SEC_LEVEL4 (4 << 10) |
| -#define DMX_MEM_SEC_LEVEL5 (5 << 10) |
| -#define DMX_MEM_SEC_LEVEL6 (6 << 10) |
| -#define DMX_MEM_SEC_LEVEL7 (7 << 10) |
| - |
| -/*bit 16~23 for output */ |
| -#define DMX_ES_OUTPUT (1 << 16) |
| -/*set raw mode, it will send the struct dmx_sec_es_data, not es data*/ |
| -#define DMX_OUTPUT_RAW_MODE (1 << 17) |
| -#define DMX_TEMI_FLAGS (1 << 18) |
| - |
| -/*24~31 one byte for audio type, dmx_audio_format_t*/ |
| -#define DMX_AUDIO_FORMAT_BIT 24 |
| - |
| -/* amlogic define end */ |
| }; |
| |
| /** |
| @@ -401,72 +285,6 @@ struct dmx_exportbuffer { |
| __s32 fd; |
| }; |
| |
| -/* amlogic define */ |
| -enum { |
| - DMA_0 = 0, |
| - DMA_1, |
| - DMA_2, |
| - DMA_3, |
| - DMA_4, |
| - DMA_5, |
| - DMA_6, |
| - DMA_7, |
| - FRONTEND_TS0 = 32, |
| - FRONTEND_TS1, |
| - FRONTEND_TS2, |
| - FRONTEND_TS3, |
| - FRONTEND_TS4, |
| - FRONTEND_TS5, |
| - FRONTEND_TS6, |
| - FRONTEND_TS7, |
| - DMA_0_1 = 64, |
| - DMA_1_1, |
| - DMA_2_1, |
| - DMA_3_1, |
| - DMA_4_1, |
| - DMA_5_1, |
| - DMA_6_1, |
| - DMA_7_1, |
| - FRONTEND_TS0_1 = 96, |
| - FRONTEND_TS1_1, |
| - FRONTEND_TS2_1, |
| - FRONTEND_TS3_1, |
| - FRONTEND_TS4_1, |
| - FRONTEND_TS5_1, |
| - FRONTEND_TS6_1, |
| - FRONTEND_TS7_1, |
| -}; |
| - |
| -/*define filter mem_info type*/ |
| -enum { |
| - DMX_VIDEO_TYPE = 0, |
| - DMX_AUDIO_TYPE, |
| - DMX_SUBTITLE_TYPE, |
| - DMX_TELETEXT_TYPE, |
| - DMX_SECTION_TYPE, |
| -}; |
| - |
| -struct filter_mem_info { |
| - __u32 type; |
| - __u32 pid; |
| - struct dmx_mem_info filter_info; |
| -}; |
| - |
| -struct dmx_filter_mem_info { |
| - __u32 filter_num; |
| - struct filter_mem_info info[40]; |
| -}; |
| - |
| -struct dvr_mem_info { |
| - __u32 wp_offset; |
| -}; |
| - |
| -struct decoder_mem_info { |
| - __u32 rp_phy; |
| -}; |
| - |
| -/* amlogic define end */ |
| - |
| #define DMX_START _IO('o', 41) |
| #define DMX_STOP _IO('o', 42) |
| #define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params) |
| @@ -492,16 +310,4 @@ typedef struct dmx_filter dmx_filter_t; |
| #define DMX_QBUF _IOWR('o', 63, struct dmx_buffer) |
| #define DMX_DQBUF _IOWR('o', 64, struct dmx_buffer) |
| |
| -/* amlogic define */ |
| -#define DMX_SET_INPUT _IO('o', 80) |
| -#define DMX_GET_MEM_INFO _IOR('o', 81, struct dmx_mem_info) |
| -#define DMX_SET_HW_SOURCE _IO('o', 82) |
| -#define DMX_GET_HW_SOURCE _IOR('o', 83, int) |
| -#define DMX_GET_FILTER_MEM_INFO _IOR('o', 84, struct dmx_filter_mem_info) |
| -/*just for dvr sec mem, please call before DMX_SET_PES_FILTER*/ |
| -#define DMX_SET_SEC_MEM _IOW('o', 85, struct dmx_sec_mem) |
| -#define DMX_GET_DVR_MEM _IOR('o', 86, struct dvr_mem_info) |
| -#define DMX_REMAP_PID _IOR('o', 87, __u16[2]) |
| -#define DMX_SET_DECODE_INFO _IOW('o', 88, struct decoder_mem_info) |
| -/* amlogic define end */ |
| #endif /* _DVBDMX_H_ */ |
| -- |
| 2.41.0 |
| |