Mercurial > pt1
changeset 71:28f25ec7f962
correct number of initialization data.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 31 Oct 2009 04:15:22 +0900 |
parents | babd84ff70ff |
children | c9b41c438a93 |
files | driver/pt1_tuner.c driver/pt1_tuner_data.c driver/pt1_tuner_data.h |
diffstat | 3 files changed, 30 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/driver/pt1_tuner.c Wed Oct 28 21:04:53 2009 +0900 +++ b/driver/pt1_tuner.c Sat Oct 31 04:15:22 2009 +0900 @@ -110,13 +110,20 @@ printk(KERN_INFO "PT1:ISDB-S Read(%x)\n", val); return -EIO ; } - for(lp = 0 ; lp < MAX_ISDB_S_INIT ; lp++){ - if(cardtype == PT1) + + if(cardtype == PT1) { + for(lp = 0 ; lp < MAX_ISDB_S_INIT ; lp++){ memcpy(&wk, isdb_s_initial_pt1[lp], sizeof(WBLOCK)); - if(cardtype == PT2) + wk.addr = addr; + i2c_write(regs, lock, &wk); + } + } + else if(cardtype == PT2) { + for(lp = 0 ; lp < MAX_ISDB_S_INIT2 ; lp++){ memcpy(&wk, isdb_s_initial_pt2[lp], sizeof(WBLOCK)); - wk.addr = addr; - i2c_write(regs, lock, &wk); + wk.addr = addr; + i2c_write(regs, lock, &wk); + } } return 0 ; @@ -127,17 +134,22 @@ WBLOCK wk; // ISDB-S/T初期化 - for(lp = 0 ; lp < MAX_ISDB_T_INIT ; lp++){ - if(cardtype == PT1) + if(cardtype == PT1) { + for(lp = 0 ; lp < MAX_ISDB_T_INIT ; lp++){ memcpy(&wk, isdb_t_initial_pt1[lp], sizeof(WBLOCK)); - if(cardtype == PT2) + wk.addr = addr; + i2c_write(regs, lock, &wk); + } + } + else if(cardtype == PT2) { + for(lp = 0 ; lp < MAX_ISDB_T_INIT2 ; lp++){ memcpy(&wk, isdb_t_initial_pt2[lp], sizeof(WBLOCK)); - wk.addr = addr; - i2c_write(regs, lock, &wk); + wk.addr = addr; + i2c_write(regs, lock, &wk); + } } - +} -} int tuner_init(void __iomem *regs, int cardtype, struct mutex *lock, int tuner_no) {
--- a/driver/pt1_tuner_data.c Wed Oct 28 21:04:53 2009 +0900 +++ b/driver/pt1_tuner_data.c Sat Oct 31 04:15:22 2009 +0900 @@ -319,7 +319,7 @@ &isdb_s_init14, &isdb_s_init15, &isdb_s_init16, &isdb_s_init17, &isdb_s_init18, &isdb_s_init19, &isdb_s_init20 }; -WBLOCK *isdb_s_initial_pt2[MAX_ISDB_S_INIT] = +WBLOCK *isdb_s_initial_pt2[MAX_ISDB_S_INIT2] = { &isdb_s_init2, &isdb_s_init4, &isdb_s_init5, &isdb_s_init6, &isdb_s_init7, &isdb_s_init8, &isdb_s_init9, @@ -337,7 +337,7 @@ &isdb_t_init9, &isdb_t_init10, &isdb_t_init11, &isdb_t_init12, &isdb_t_init13, &isdb_t_init14, &isdb_t_init15, &isdb_t_init16 }; -WBLOCK *isdb_t_initial_pt2[MAX_ISDB_T_INIT] = +WBLOCK *isdb_t_initial_pt2[MAX_ISDB_T_INIT2] = { &isdb_t_init1, &isdb_t_init3, &isdb_t_init4, &isdb_t_init5, &isdb_t_init6,
--- a/driver/pt1_tuner_data.h Wed Oct 28 21:04:53 2009 +0900 +++ b/driver/pt1_tuner_data.h Sat Oct 31 04:15:22 2009 +0900 @@ -5,6 +5,8 @@ /***************************************************************************/ #define MAX_ISDB_S_INIT 19 // ISDB-S 初期化データ数 #define MAX_ISDB_T_INIT 16 // ISDB-S 初期化データ数 +#define MAX_ISDB_S_INIT2 18 // ISDB-S 初期化データ数 +#define MAX_ISDB_T_INIT2 12 // ISDB-S 初期化データ数 #define MAX_BS_CHANNEL 36 // 周波数テーブル数 #define MAX_ISDB_T_CHANNEL 113 // 周波数テーブル数(地デジタル) #define MAX_BS_CHANNEL_PLL_COMMAND 3 // PLLロックするためのコマンド数 @@ -28,9 +30,9 @@ extern WBLOCK isdb_t_init17; //ISDB-T最終 extern WBLOCK bs_pll_lock; //ISDB-S PLLロック確認 extern WBLOCK *isdb_s_initial_pt1[MAX_ISDB_S_INIT]; -extern WBLOCK *isdb_s_initial_pt2[MAX_ISDB_S_INIT]; +extern WBLOCK *isdb_s_initial_pt2[MAX_ISDB_S_INIT2]; extern WBLOCK *isdb_t_initial_pt1[MAX_ISDB_T_INIT]; -extern WBLOCK *isdb_t_initial_pt2[MAX_ISDB_T_INIT]; +extern WBLOCK *isdb_t_initial_pt2[MAX_ISDB_T_INIT2]; /***************************************************************************/ /* BS用データ定義 */ /***************************************************************************/