Mercurial > pt1
annotate driver/pt1_tuner.h @ 145:75423932bfaa
follow BS premium's transponder migration
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 07 May 2018 23:50:52 +0900 |
parents | 1e7718cc2556 |
children |
rev | line source |
---|---|
0 | 1 #ifndef __PT1_TUNER_H__ |
2 #define __PT1_TUNER_H__ | |
3 /***************************************************************************/ | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
4 /* チューナ状態定義 */ |
0 | 5 /***************************************************************************/ |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
6 // SLEEPモード設定 |
0 | 7 enum { |
8 TYPE_SLEEP, | |
9 TYPE_WAKEUP | |
10 }; | |
11 | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
12 // チューナパワーモード設定 |
0 | 13 enum { |
14 BIT_TUNER, | |
15 BIT_LNB_UP, | |
16 BIT_LNB_DOWN, | |
64
98a92ce5382e
added fake support code for PT2. the PT2 part is not expected to work. be careful!
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
9
diff
changeset
|
17 BIT_RESET, |
69
272a8fba970b
added very rough support for PT2.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
64
diff
changeset
|
18 BIT_33A1, |
272a8fba970b
added very rough support for PT2.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
64
diff
changeset
|
19 BIT_33A2, |
272a8fba970b
added very rough support for PT2.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
64
diff
changeset
|
20 BIT_5A_, |
272a8fba970b
added very rough support for PT2.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
64
diff
changeset
|
21 BIT_5A1, |
272a8fba970b
added very rough support for PT2.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
64
diff
changeset
|
22 BIT_5A2 |
0 | 23 }; |
24 | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
25 // LNBパワー設定 |
0 | 26 enum{ |
27 LNB_OFF, // LNB OFF | |
28 LNB_11V, // +11 V | |
29 LNB_15V // +15 V | |
64
98a92ce5382e
added fake support code for PT2. the PT2 part is not expected to work. be careful!
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
9
diff
changeset
|
30 }; |
0 | 31 |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
32 enum{ // 電源/ハードウェアリセット |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
33 TUNER_POWER_OFF, // オフ/イネーブル |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
34 TUNER_POWER_ON_RESET_ENABLE, // オン/イネーブル |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
35 TUNER_POWER_ON_RESET_DISABLE // オン/ディセーブル |
0 | 36 }; |
64
98a92ce5382e
added fake support code for PT2. the PT2 part is not expected to work. be careful!
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
9
diff
changeset
|
37 |
98a92ce5382e
added fake support code for PT2. the PT2 part is not expected to work. be careful!
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
9
diff
changeset
|
38 enum { |
98a92ce5382e
added fake support code for PT2. the PT2 part is not expected to work. be careful!
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
9
diff
changeset
|
39 PT1 = 0, |
98a92ce5382e
added fake support code for PT2. the PT2 part is not expected to work. be careful!
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
9
diff
changeset
|
40 PT2, |
98a92ce5382e
added fake support code for PT2. the PT2 part is not expected to work. be careful!
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
9
diff
changeset
|
41 }; |
98a92ce5382e
added fake support code for PT2. the PT2 part is not expected to work. be careful!
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
9
diff
changeset
|
42 |
0 | 43 /***************************************************************************/ |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
44 /* チューナ状態定義 */ |
0 | 45 /***************************************************************************/ |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
46 #define MAX_BS_TS_ID 8 // TS-ID取得最大値 |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
47 #define MAX_ISDB_T_INFO 3 // 地デジ階層情報数 |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
48 #define MAX_ISDB_T_INFO_LEN 2 // 地デジ階層情報数 |
0 | 49 /***************************************************************************/ |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
50 /* ISDB-S状態定義 */ |
0 | 51 /***************************************************************************/ |
52 typedef struct _ISDB_S_CH_TABLE{ | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
53 int channel ; // 入力チャンネル番号 |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
54 int real_chno ; // 実際のテーブル番号 |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
55 int slotno ; // スロット番号 |
0 | 56 }ISDB_S_CH_TABLE ; |
57 | |
58 /***************************************************************************/ | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
59 /* ISDB-S状態定義 */ |
0 | 60 /***************************************************************************/ |
61 typedef struct _ISDB_S_TS_ID{ | |
62 __u16 ts_id ; // TS-ID | |
63 __u16 dmy ; // PAD | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
64 __u8 low_mode ; // 低階層 モード |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
65 __u8 low_slot ; // 低階層 スロット数 |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
66 __u8 high_mode ; // 高階層 モード |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
67 __u8 high_slot ; // 高階層 スロット数 |
0 | 68 }ISDB_S_TS_ID; |
69 typedef struct _ISDB_S_TMCC{ | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
70 ISDB_S_TS_ID ts_id[MAX_BS_TS_ID]; // 相対TS番号nに対するTS ID情報 |
0 | 71 #if 0 |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
72 __u32 indicator; // 変更指示 (5ビット) |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
73 __u32 emergency; // 起動制御信号 (1ビット) |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
74 __u32 uplink; // アップリンク制御情報 (4ビット) |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
75 __u32 ext; // 拡張フラグ (1ビット) |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
76 __u32 extdata[2]; // 拡張領域 (61ビット) |
0 | 77 #endif |
78 __u32 agc ; // AGC | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
79 __u32 clockmargin ; // クロック周波数誤差 |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
80 __u32 carriermargin ; // キャリア周波数誤差 |
0 | 81 }ISDB_S_TMCC; |
82 | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
83 // 階層情報 |
0 | 84 typedef struct _ISDB_T_INFO{ |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
85 __u32 mode; // キャリア変調方式 (3ビット) |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
86 __u32 rate; // 畳込み符号化率 (3ビット) |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
87 __u32 interleave; // インターリーブ長 (3ビット) |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
88 __u32 segment; // セグメント数 (4ビット) |
0 | 89 }ISDB_T_INFO; |
90 | |
91 typedef struct _ISDB_T_TMCC { | |
92 #if 0 | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
93 __u32 sysid; // システム識別 (2ビット) |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
94 __u32 indicator; // 伝送パラメータ切り替え指標 (4ビット) |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
95 __u32 emergency; // 緊急警報放送用起動フラグ (1ビット) |
0 | 96 #endif |
97 ISDB_T_INFO info[MAX_ISDB_T_INFO]; | |
98 #if 0 | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
99 // カレント情報 |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
100 __u32 partial; // 部分受信フラグ (1ビット) |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
101 __u32 Phase; // 連結送信位相補正量 (3ビット) |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
102 __u32 Reserved; // リザーブ (12ビット) |
0 | 103 #endif |
104 __u32 cn[2] ; // CN | |
105 __u32 agc ; // AGC | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
106 __u32 clockmargin ; // クロック周波数誤差 |
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
107 __u32 carriermargin ; // キャリア周波数誤差 |
0 | 108 }ISDB_T_TMCC; |
109 /***************************************************************************/ | |
142
1e7718cc2556
use utf-8 instead of euc-jp
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
69
diff
changeset
|
110 /* チューナ状態定義 */ |
0 | 111 /***************************************************************************/ |
64
98a92ce5382e
added fake support code for PT2. the PT2 part is not expected to work. be careful!
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
9
diff
changeset
|
112 extern void settuner_reset(void __iomem *, int, __u32, __u32); |
69
272a8fba970b
added very rough support for PT2.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
64
diff
changeset
|
113 extern int tuner_init(void __iomem *, int, struct mutex *, int); |
0 | 114 extern void set_sleepmode(void __iomem *, struct mutex *, int, int, int); |
115 | |
116 extern int bs_tune(void __iomem *, struct mutex *, int, int, ISDB_S_TMCC *); | |
117 extern int ts_lock(void __iomem *, struct mutex *, int, __u16); | |
118 | |
119 extern int isdb_t_tune(void __iomem *, struct mutex *, int, int, ISDB_T_TMCC *); | |
120 extern int isdb_t_frequency(void __iomem *, struct mutex *, int, int, int); | |
9
07b2fc07ff48
updated to current driver to support signal strength.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
0
diff
changeset
|
121 extern int isdb_s_read_signal_strength(void __iomem *, struct mutex *, int); |
07b2fc07ff48
updated to current driver to support signal strength.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
0
diff
changeset
|
122 extern int isdb_t_read_signal_strength(void __iomem *, struct mutex *, int); |
07b2fc07ff48
updated to current driver to support signal strength.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
0
diff
changeset
|
123 |
0 | 124 #endif |