blob: 539025d5856f7518432f1dd74d2fc93f55994fb6
1 | /* |
2 | * Copyright (C) 2017 Amlogic, Inc. All rights reserved. |
3 | * |
4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. |
8 | * |
9 | * This program is distributed in the hope that it will be useful, but WITHOUT |
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
12 | * more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License along |
15 | * with this program; if not, write to the Free Software Foundation, Inc., |
16 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
17 | * |
18 | * Description: |
19 | */ |
20 | #ifndef _AML_DVB_H_ |
21 | #define _AML_DVB_H_ |
22 | |
23 | #include "aml_dmx.h" |
24 | #include "aml_dsc.h" |
25 | #include "hw_demux/hwdemux.h" |
26 | #include "hw_demux/demod_gt.h" |
27 | |
28 | #define CHAIN_PATH_COUNT 5 |
29 | #define DMX_DEV_COUNT 5 |
30 | #define DSC_DEV_COUNT 2 |
31 | #define FE_DEV_COUNT 2 |
32 | |
33 | |
34 | struct aml_dvb { |
35 | struct dvb_device dvb_dev; |
36 | struct dvb_adapter dvb_adapter; |
37 | |
38 | struct device *dev; |
39 | struct platform_device *pdev; |
40 | |
41 | HWDMX_Demux *hwdmx[CHAIN_PATH_COUNT]; |
42 | SWDMX_TsParser *tsp[CHAIN_PATH_COUNT]; |
43 | SWDMX_Descrambler *swdsc[CHAIN_PATH_COUNT]; |
44 | SWDMX_Demux *swdmx[CHAIN_PATH_COUNT]; |
45 | |
46 | struct aml_dmx dmx[DMX_DEV_COUNT]; |
47 | struct aml_dsc dsc[DSC_DEV_COUNT]; |
48 | |
49 | struct mutex mutex; |
50 | spinlock_t slock; |
51 | |
52 | int ts_out_invert; |
53 | |
54 | unsigned int tuner_num; |
55 | unsigned int tuner_cur; |
56 | struct aml_tuner *tuners; |
57 | bool tuner_attached; |
58 | }; |
59 | |
60 | struct aml_dvb *aml_get_dvb_device(void); |
61 | |
62 | #endif |
63 |