source: svn/newcon3bcm2_21bu/dta/src/app/bapp_freq_table.c @ 74

Last change on this file since 74 was 74, checked in by phkim, 10 years ago
  1. phkim
  2. zasc
  3. 변경 내용
    • CT_ChMapUpdatePMTAC3AudioDescriptor 메모리 leak 버그 수정
  • Property svn:executable set to *
File size: 10.9 KB
Line 
1/******************************************************************************
2 *    (c)2008-2009 Broadcom Corporation
3 *
4 * This program is the proprietary software of Broadcom Corporation and/or its licensors,
5 * and may only be used, duplicated, modified or distributed pursuant to the terms and
6 * conditions of a separate, written license agreement executed between you and Broadcom
7 * (an "Authorized License").  Except as set forth in an Authorized License, Broadcom grants
8 * no license (express or implied), right to use, or waiver of any kind with respect to the
9 * Software, and Broadcom expressly reserves all rights in and to the Software and all
10 * intellectual property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU
11 * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY
12 * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
13 *
14 * Except as expressly set forth in the Authorized License,
15 *
16 * 1.     This program, including its structure, sequence and organization, constitutes the valuable trade
17 * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof,
18 * and to use this information only in connection with your use of Broadcom integrated circuit products.
19 *
20 * 2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
21 * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
22 * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
23 * THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES
24 * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE,
25 * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION
26 * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF
27 * USE OR PERFORMANCE OF THE SOFTWARE.
28 *
29 * 3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS
30 * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR
31 * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR
32 * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF
33 * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT
34 * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
35 * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF
36 * ANY LIMITED REMEDY.
37 *
38 * $brcm_Workfile:  $
39 * $brcm_Revision:  $
40 * $brcm_Date:  $
41 *
42 * Module Description:
43 *
44 * Return the requency table to use for channel scanning.
45 *
46 * Revision History:
47 *
48 * Created: 09/28/2009 by Jeff Fisher
49 *              Modified to add ISDB frequency table by Liqun Ruan (1/16/2013)
50 *
51 * $brcm_Log:  $
52 *
53 *
54 *****************************************************************************/
55
56#include "bapp_freq_table.h"
57
58
59/* frequencies for US Cable */
60const unsigned int s_ch_to_freq_cable[] =
61{
62        57000,  63000,  69000,  79000,             
63        85000, 177000, 183000, 189000,             
64        195000, 201000, 207000, 213000,                 
65        123000, 129000, 135000, 141000,
66        147000, 153000, 159000, 165000,
67
68        171000, 219000, 225000, 231000,
69        237000, 243000, 249000, 255000,
70        261000, 267000, 273000, 279000,
71        285000, 291000, 297000, 303000,
72        309000, 315000, 321000, 327000,
73
74        333000, 339000, 345000, 351000,
75        357000, 363000, 369000, 375000,
76        381000, 387000, 393000, 399000,
77        405000, 411000, 417000, 423000,
78        429000, 435000, 441000, 447000,
79
80        453000, 459000, 465000, 471000,
81        477000, 483000, 489000, 495000,
82        501000, 507000, 513000, 519000,
83        525000, 531000, 537000, 543000, 
84        549000, 555000, 561000, 567000, 
85
86        573000, 579000, 585000, 591000, 
87        597000, 603000, 609000, 615000, 
88        621000, 627000, 633000, 639000, 
89        645000, 93000,  99000,  105000, 
90        111000, 117000, 651000, 657000,
91
92        663000, 669000, 675000, 681000,
93        687000, 693000, 699000, 705000,
94        711000, 717000, 723000, 729000,
95        735000, 741000, 747000, 753000,
96        759000, 765000, 771000, 777000,
97
98        783000, 789000, 795000, 801000,
99        807000, 813000, 819000, 825000, 
100        831000, 837000, 843000, 849000, 
101        855000, 861000,
102
103        /* 867 and up */
104        867000, 873000, 879000, 885000, 891000, 
105        897000, 903000, 909000, 915000, 921000, 
106        927000, 933000, 939000, 945000, 951000, 
107        957000, 963000, 969000, 975000, 981000, 
108        987000, 993000, 999000
109};
110const unsigned int s_ch_to_freq_cable_num = (sizeof(s_ch_to_freq_cable)/sizeof(s_ch_to_freq_cable[0]));
111
112/* debug frequencies for US Cable */
113const unsigned int s_ch_to_freq_cable_debug[] =
114{
115        765000,777000, 567000, 357000, 561000, 549000
116};
117const unsigned int s_ch_to_freq_cable_debug_num = (sizeof(s_ch_to_freq_cable_debug)/sizeof(s_ch_to_freq_cable_debug[0]));
118
119/* frequencies from the channel number  i.e. 2 - 69 in MHz*/
120const unsigned int s_ch_to_freq_atsc[] =
121{
122        57000,  63000,  69000,  79000,             /* 2 - 5 VHF-L 2 - 6 */
123        85000, 177000, 183000, 189000,             /* 6 - 9 VHF-H 7 - 13*/
124        195000, 201000, 207000, 213000,                 /* 10 - 13 */
125        473000, 479000, 485000, 491000,                 /* 14 - 17, 14 -  Begin UHF */
126        497000, 503000, 509000, 515000,                 /* 18 - 21 */
127        521000, 527000, 533000, 539000,                 /* 22 - 25 */
128        545000, 551000, 557000, 563000,                 /* 26 - 29 */
129        569000, 575000, 581000, 587000,                 /* 30 to 33 */
130        593000, 599000, 605000, 611000,                 /* 34 to 37 */
131        617000, 623000, 629000, 635000,                 /* 38 to 41 */
132        641000, 647000, 653000, 659000,                 /* 42 to 45 */
133        665000, 671000, 677000, 683000,                 /* 46 to 49 */
134        689000, 695000,                                                 /* 50 to 51 */
135#ifndef ACB612  /* for Mexico NTIA, channel 2 - 51 only */
136        701000, 707000,                                                 /* 52 to 53 */
137        713000, 719000, 725000, 731000,                 /* 54 to 57 */
138        737000, 743000, 749000, 755000,                 /* 58 to 61 */
139        761000, 767000, 773000, 779000,                 /* 62 to 65 */
140        785000, 791000, 797000, 803000,                 /* 66 to 69 */
141#endif
142};
143const unsigned int s_ch_to_freq_atsc_num = (sizeof(s_ch_to_freq_atsc)/sizeof(s_ch_to_freq_atsc[0]));
144
145const unsigned int s_select_freq[] =
146{
147        /* Select List */
148        567000, 573000, 579000, 585000,
149        591000, 651000, 657000, 489000,
150        495000, 807000, 565750, 571750,
151        /* EIA */ 
152         57000,  63000,  69000,  79000,
153         85000, 177000, 183000, 189000, 
154        195000, 201000, 207000, 213000, 
155        123000, 129000, 135000, 141000, 
156        147000, 153000, 159000, 165000, 
157        171000, 219000, 225000, 231000,
158        237000, 243000, 249000, 255000, 
159        261000, 267000, 273000, 279000, 
160        285000, 291000, 297000, 303000, 
161        309000, 315000, 321000, 327000, 
162        333000, 339000, 345000, 351000, 
163        357000, 363000, 369000, 375000, 
164        381000, 387000, 393000, 399000, 
165        405000, 411000, 417000, 423000, 
166        429000, 435000, 441000, 447000, 
167        453000, 459000, 465000, 471000, 
168        477000, 483000, 489000, 495000,
169        501000, 507000, 513000, 519000, 
170        525000, 531000, 537000, 543000,
171        549000, 555000, 561000, 567000, 
172        573000, 579000, 585000, 591000, 
173        597000, 603000, 609000, 615000, 
174        621000, 627000, 633000, 639000, 
175        645000,  93000,  99000, 105000, 
176        111000, 117000, 651000, 657000, 
177        663000, 669000, 675000, 681000, 
178        687000, 693000, 699000, 705000,         
179        711000, 717000, 723000, 729000, 
180        735000, 741000, 747000, 753000, 
181        759000, 765000, 771000, 777000, 
182        783000, 789000, 795000, 801000, 
183        807000, 813000, 819000, 825000, 
184        831000, 837000, 843000, 849000, 
185        855000, 861000, 867000, 873000, 
186        879000, 885000, 891000, 897000, 
187        903000, 909000, 915000, 921000, 
188        927000, 933000, 939000, 945000, 
189        951000, 957000, 963000, 969000, 
190        975000, 981000, 987000, 993000, 
191        999000, 
192        /* HRC */
193         73750,  55750,  61750,  67750,
194         79750/*77750*/,  85750/*83750*/, 175750, 181750,
195        187750, 193750, 199750, 205750,
196        211750, 121750, 127750, 133750,
197        139750, 145750, 151750, 157750,
198        163750, 169750, 217750, 223750,
199        229750, 235750, 241750, 247750,
200        253750, 259750, 265750, 271750,
201        277750, 283750, 289750, 295750,
202        301750, 307750, 313750, 319750,
203        325750, 331750, 337750, 343750,
204        349750, 355750, 361750, 367750,
205        373750, 379750, 385750, 391750,
206        397750, 403750, 409750, 415750,
207        421750, 427750, 433750, 439750,
208        445750, 451750, 457750, 463750,
209        469750, 475750, 481750, 487750,
210        493750, 499750, 505750, 511750,
211        517750, 523750, 529750, 535750,
212        541750, 547750, 553750, 559750,
213        565750, 571750, 577750, 583750, 
214        589750, 595750, 601750, 607750, 
215        613750, 619750, 625750, 631750, 
216        637750, 643750,  91750,  97750, 
217        103750, 109750, 115750, 649750, 
218        655750, 661750, 667750, 673750, 
219        679750, 685750, 691750, 697750, 
220        703750, 709750, 715750, 721750, 
221        727750, 733750, 739750, 745750, 
222        751750, 757750, 763750, 769750, 
223        775750, 781750, 787750, 793750, 
224        799750, 805750, 811750, 817750, 
225        823750, 829750, 835750, 841750, 
226        847750, 853750, 859750, 865750, 
227        871750, 877750, 883750, 889750, 
228        895750, 901750, 907750, 913750, 
229        919750, 925750, 931750, 937750, 
230        943750, 949750, 955750, 961750, 
231        967750, 973750, 979750, 985750, 
232        991750, 997750,
233        /* IRC */
234         75000, 
235};
236const unsigned int s_select_freq_num = (sizeof(s_select_freq)/sizeof(s_select_freq[0]));
237
238#ifdef CONFIG_ISDB
239/* frequencies from the channel number  i.e. 7-13 but not used, 14-69 in MHz
240 * NOTE that all the frequencies ended with 857 offset.
241 * (central frequency + 1/7 MHz, e.g. 635 MHz + 172 KHz)
242 */
243const unsigned int s_ch_to_freq_isdb[] =
244{
245        /* just use one frequency to scan channels */
246#ifdef CONFIG_ISDB_MY_FREQ
247    545142,
248#else
249    473142, 479142, 485142, 491142,         /* UHF 14 - 49, 14-17 */
250    497142, 503142, 509142, 515142,         /* 18-21 */
251    521142, 527142, 533142, 539142,         /* 22-25 */
252    545142, 551142, 557142, 563142,         /* 26-29 */
253    569142, 575142, 581142, 587142,         /* 30-33 */
254    593142, 599142, 605142, 611142,         /* 34-37, channel 37 not used */
255    617142, 623142, 629142, 635142,         /* 38-41 */
256    641142, 647142, 653142, 659142,         /* 42-45 */
257    665142, 671142, 677142, 683142,         /* 46-49 */
258    689142, 695142, 701142, 707142,         /* 50-53 */
259    713142, 719142, 725142, 731142,         /* 54-57 */
260    737142, 743142, 749142, 755142,         /* 58-61 */
261    761142, 767142, 773142, 779142,         /* 62-65 */
262    785142, 791142, 797142, 803142,         /* 66-69 */
263#endif
264};
265
266const unsigned int s_ch_to_freq_isdb_num = (sizeof(s_ch_to_freq_isdb)/sizeof(s_ch_to_freq_isdb[0]));
267
268unsigned int isdb_offset = 857;                         /* to get frequency in Hz, (s_ch_to_freq_atsc[i] * 1000 + isdb_offset) */
269
270#endif
271
272/**
273Summary:
274        Return the frequency table and number of entries.
275**/
276
277bapp_result_t bapp_freq_table_get(bapp_freq_table_type_t type, 
278                                                                  const unsigned int *freq_table[], 
279                                                                  unsigned int *num_freq)
280{
281        *num_freq = 0;
282        *freq_table =  NULL;
283        switch(type)
284        {
285        case eFREQ_TABLE_NORTH_AMERICA_QAM:
286                *freq_table = s_ch_to_freq_cable;
287                *num_freq = s_ch_to_freq_cable_num;
288                break;
289        case eFREQ_DEBUG_QAM:
290                *freq_table = s_ch_to_freq_cable_debug;
291                *num_freq = s_ch_to_freq_cable_debug_num;
292                break;
293        case eFREQ_TABLE_NTIA_VSB:
294                *freq_table = s_ch_to_freq_atsc;
295                *num_freq = s_ch_to_freq_atsc_num;
296                break;
297        case eFREQ_TABLE_DTA_SELECT:
298                *freq_table = s_select_freq;
299                *num_freq = s_select_freq_num;
300                break;
301#ifdef CONFIG_ISDB
302        case eFREQ_TABLE_ISDB:
303                *freq_table = s_ch_to_freq_isdb;
304                *num_freq = s_ch_to_freq_isdb_num;
305                break;
306#endif
307        default:
308                break;
309        }
310        return (*num_freq > 0) ? eBAPP_RESULT_OK : eBAPP_RESULT_FAILURE;
311}
312
Note: See TracBrowser for help on using the repository browser.