blob: 5df7b1c48995694bdb6c471566824f83d79c8045
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 | |
21 | /***************************************************************** |
22 | ** |
23 | ** Copyright (C) 2010 Amlogic,Inc. |
24 | ** All rights reserved |
25 | ** Filename : amlfrontend.h |
26 | ** |
27 | ** comment: |
28 | ** Driver for aml demodulator |
29 | ** |
30 | **************************************************************** |
31 | */ |
32 | |
33 | #ifndef _AMLFRONTEND_H |
34 | #define _AMLFRONTEND_H |
35 | |
36 | struct amlfe_config { |
37 | int fe_mode; |
38 | int i2c_id; |
39 | int tuner_type; |
40 | int tuner_addr; |
41 | }; |
42 | enum Gxtv_Demod_Tuner_If { |
43 | Si2176_5M_If = 5, |
44 | Si2176_6M_If = 6 |
45 | }; |
46 | /* 0 -DVBC, 1-DVBT, ISDBT, 2-ATSC */ |
47 | enum Gxtv_Demod_Dvb_Mode { |
48 | Gxtv_Dvbc = 0, |
49 | Gxtv_Dvbt_Isdbt = 1, |
50 | Gxtv_Atsc = 2, |
51 | Gxtv_Dtmb = 3, |
52 | }; |
53 | #define Adc_Clk_35M 35714 /* adc clk dvbc */ |
54 | #define Demod_Clk_71M 71428 /* demod clk */ |
55 | |
56 | #define Adc_Clk_24M 24000 |
57 | #define Demod_Clk_72M 72000 |
58 | #define Demod_Clk_60M 60000 |
59 | |
60 | #define Adc_Clk_28M 28571 /* dvbt,isdbt */ |
61 | #define Demod_Clk_66M 66666 |
62 | |
63 | #define Adc_Clk_26M 26000 /* atsc air */ |
64 | #define Demod_Clk_78M 78000 /* */ |
65 | |
66 | #define Adc_Clk_25_2M 25200 /* atsc cable */ |
67 | #define Demod_Clk_75M 75600 /* */ |
68 | |
69 | #define Adc_Clk_25M 25000 /* dtmb */ |
70 | #define Demod_Clk_100M 100000 /* */ |
71 | #define Demod_Clk_180M 180000 /* */ |
72 | #define Demod_Clk_200M 200000 /* */ |
73 | #define Demod_Clk_225M 225000 |
74 | |
75 | #define Adc_Clk_27M 27777 /* atsc */ |
76 | #define Demod_Clk_83M 83333 /* */ |
77 | |
78 | enum M6_Demod_Pll_Mode { |
79 | Cry_mode = 0, |
80 | Adc_mode = 1 |
81 | }; |
82 | |
83 | int M6_Demod_Dtmb_Init(struct aml_fe_dev *dev); |
84 | int convert_snr(int in_snr); |
85 | |
86 | #endif |
87 |