/****************************************************************************** * (c)2008-2009 Broadcom Corporation * * This program is the proprietary software of Broadcom Corporation and/or its licensors, * and may only be used, duplicated, modified or distributed pursuant to the terms and * conditions of a separate, written license agreement executed between you and Broadcom * (an "Authorized License"). Except as set forth in an Authorized License, Broadcom grants * no license (express or implied), right to use, or waiver of any kind with respect to the * Software, and Broadcom expressly reserves all rights in and to the Software and all * intellectual property rights therein. IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. * * Except as expressly set forth in the Authorized License, * * 1. This program, including its structure, sequence and organization, constitutes the valuable trade * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof, * and to use this information only in connection with your use of Broadcom integrated circuit products. * * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO * THE SOFTWARE. BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF * USE OR PERFORMANCE OF THE SOFTWARE. * * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF * ANY LIMITED REMEDY. * * $brcm_Workfile: $ * $brcm_Revision: $ * $brcm_Date: $ * * Module Description: * * Return the requency table to use for channel scanning. * * Revision History: * * Created: 09/28/2009 by Jeff Fisher * Modified to add ISDB frequency table by Liqun Ruan (1/16/2013) * * $brcm_Log: $ * * *****************************************************************************/ #include "bapp_freq_table.h" /* frequencies for US Cable */ const unsigned int s_ch_to_freq_cable[] = { 57000, 63000, 69000, 79000, 85000, 177000, 183000, 189000, 195000, 201000, 207000, 213000, 123000, 129000, 135000, 141000, 147000, 153000, 159000, 165000, 171000, 219000, 225000, 231000, 237000, 243000, 249000, 255000, 261000, 267000, 273000, 279000, 285000, 291000, 297000, 303000, 309000, 315000, 321000, 327000, 333000, 339000, 345000, 351000, 357000, 363000, 369000, 375000, 381000, 387000, 393000, 399000, 405000, 411000, 417000, 423000, 429000, 435000, 441000, 447000, 453000, 459000, 465000, 471000, 477000, 483000, 489000, 495000, 501000, 507000, 513000, 519000, 525000, 531000, 537000, 543000, 549000, 555000, 561000, 567000, 573000, 579000, 585000, 591000, 597000, 603000, 609000, 615000, 621000, 627000, 633000, 639000, 645000, 93000, 99000, 105000, 111000, 117000, 651000, 657000, 663000, 669000, 675000, 681000, 687000, 693000, 699000, 705000, 711000, 717000, 723000, 729000, 735000, 741000, 747000, 753000, 759000, 765000, 771000, 777000, 783000, 789000, 795000, 801000, 807000, 813000, 819000, 825000, 831000, 837000, 843000, 849000, 855000, 861000, /* 867 and up */ 867000, 873000, 879000, 885000, 891000, 897000, 903000, 909000, 915000, 921000, 927000, 933000, 939000, 945000, 951000, 957000, 963000, 969000, 975000, 981000, 987000, 993000, 999000 }; const unsigned int s_ch_to_freq_cable_num = (sizeof(s_ch_to_freq_cable)/sizeof(s_ch_to_freq_cable[0])); /* debug frequencies for US Cable */ const unsigned int s_ch_to_freq_cable_debug[] = { 765000,777000, 567000, 357000, 561000, 549000 }; const unsigned int s_ch_to_freq_cable_debug_num = (sizeof(s_ch_to_freq_cable_debug)/sizeof(s_ch_to_freq_cable_debug[0])); /* frequencies from the channel number i.e. 2 - 69 in MHz*/ const unsigned int s_ch_to_freq_atsc[] = { 57000, 63000, 69000, 79000, /* 2 - 5 VHF-L 2 - 6 */ 85000, 177000, 183000, 189000, /* 6 - 9 VHF-H 7 - 13*/ 195000, 201000, 207000, 213000, /* 10 - 13 */ 473000, 479000, 485000, 491000, /* 14 - 17, 14 - Begin UHF */ 497000, 503000, 509000, 515000, /* 18 - 21 */ 521000, 527000, 533000, 539000, /* 22 - 25 */ 545000, 551000, 557000, 563000, /* 26 - 29 */ 569000, 575000, 581000, 587000, /* 30 to 33 */ 593000, 599000, 605000, 611000, /* 34 to 37 */ 617000, 623000, 629000, 635000, /* 38 to 41 */ 641000, 647000, 653000, 659000, /* 42 to 45 */ 665000, 671000, 677000, 683000, /* 46 to 49 */ 689000, 695000, /* 50 to 51 */ #ifndef ACB612 /* for Mexico NTIA, channel 2 - 51 only */ 701000, 707000, /* 52 to 53 */ 713000, 719000, 725000, 731000, /* 54 to 57 */ 737000, 743000, 749000, 755000, /* 58 to 61 */ 761000, 767000, 773000, 779000, /* 62 to 65 */ 785000, 791000, 797000, 803000, /* 66 to 69 */ #endif }; const unsigned int s_ch_to_freq_atsc_num = (sizeof(s_ch_to_freq_atsc)/sizeof(s_ch_to_freq_atsc[0])); const unsigned int s_select_freq[] = { /* Select List */ 567000, 573000, 579000, 585000, 591000, 651000, 657000, 489000, 495000, 807000, 565750, 571750, /* EIA */ 57000, 63000, 69000, 79000, 85000, 177000, 183000, 189000, 195000, 201000, 207000, 213000, 123000, 129000, 135000, 141000, 147000, 153000, 159000, 165000, 171000, 219000, 225000, 231000, 237000, 243000, 249000, 255000, 261000, 267000, 273000, 279000, 285000, 291000, 297000, 303000, 309000, 315000, 321000, 327000, 333000, 339000, 345000, 351000, 357000, 363000, 369000, 375000, 381000, 387000, 393000, 399000, 405000, 411000, 417000, 423000, 429000, 435000, 441000, 447000, 453000, 459000, 465000, 471000, 477000, 483000, 489000, 495000, 501000, 507000, 513000, 519000, 525000, 531000, 537000, 543000, 549000, 555000, 561000, 567000, 573000, 579000, 585000, 591000, 597000, 603000, 609000, 615000, 621000, 627000, 633000, 639000, 645000, 93000, 99000, 105000, 111000, 117000, 651000, 657000, 663000, 669000, 675000, 681000, 687000, 693000, 699000, 705000, 711000, 717000, 723000, 729000, 735000, 741000, 747000, 753000, 759000, 765000, 771000, 777000, 783000, 789000, 795000, 801000, 807000, 813000, 819000, 825000, 831000, 837000, 843000, 849000, 855000, 861000, 867000, 873000, 879000, 885000, 891000, 897000, 903000, 909000, 915000, 921000, 927000, 933000, 939000, 945000, 951000, 957000, 963000, 969000, 975000, 981000, 987000, 993000, 999000, /* HRC */ 73750, 55750, 61750, 67750, 79750/*77750*/, 85750/*83750*/, 175750, 181750, 187750, 193750, 199750, 205750, 211750, 121750, 127750, 133750, 139750, 145750, 151750, 157750, 163750, 169750, 217750, 223750, 229750, 235750, 241750, 247750, 253750, 259750, 265750, 271750, 277750, 283750, 289750, 295750, 301750, 307750, 313750, 319750, 325750, 331750, 337750, 343750, 349750, 355750, 361750, 367750, 373750, 379750, 385750, 391750, 397750, 403750, 409750, 415750, 421750, 427750, 433750, 439750, 445750, 451750, 457750, 463750, 469750, 475750, 481750, 487750, 493750, 499750, 505750, 511750, 517750, 523750, 529750, 535750, 541750, 547750, 553750, 559750, 565750, 571750, 577750, 583750, 589750, 595750, 601750, 607750, 613750, 619750, 625750, 631750, 637750, 643750, 91750, 97750, 103750, 109750, 115750, 649750, 655750, 661750, 667750, 673750, 679750, 685750, 691750, 697750, 703750, 709750, 715750, 721750, 727750, 733750, 739750, 745750, 751750, 757750, 763750, 769750, 775750, 781750, 787750, 793750, 799750, 805750, 811750, 817750, 823750, 829750, 835750, 841750, 847750, 853750, 859750, 865750, 871750, 877750, 883750, 889750, 895750, 901750, 907750, 913750, 919750, 925750, 931750, 937750, 943750, 949750, 955750, 961750, 967750, 973750, 979750, 985750, 991750, 997750, /* IRC */ 75000, }; const unsigned int s_select_freq_num = (sizeof(s_select_freq)/sizeof(s_select_freq[0])); #ifdef CONFIG_ISDB /* frequencies from the channel number i.e. 7-13 but not used, 14-69 in MHz * NOTE that all the frequencies ended with 857 offset. * (central frequency + 1/7 MHz, e.g. 635 MHz + 172 KHz) */ const unsigned int s_ch_to_freq_isdb[] = { /* just use one frequency to scan channels */ #ifdef CONFIG_ISDB_MY_FREQ 545142, #else 473142, 479142, 485142, 491142, /* UHF 14 - 49, 14-17 */ 497142, 503142, 509142, 515142, /* 18-21 */ 521142, 527142, 533142, 539142, /* 22-25 */ 545142, 551142, 557142, 563142, /* 26-29 */ 569142, 575142, 581142, 587142, /* 30-33 */ 593142, 599142, 605142, 611142, /* 34-37, channel 37 not used */ 617142, 623142, 629142, 635142, /* 38-41 */ 641142, 647142, 653142, 659142, /* 42-45 */ 665142, 671142, 677142, 683142, /* 46-49 */ 689142, 695142, 701142, 707142, /* 50-53 */ 713142, 719142, 725142, 731142, /* 54-57 */ 737142, 743142, 749142, 755142, /* 58-61 */ 761142, 767142, 773142, 779142, /* 62-65 */ 785142, 791142, 797142, 803142, /* 66-69 */ #endif }; const unsigned int s_ch_to_freq_isdb_num = (sizeof(s_ch_to_freq_isdb)/sizeof(s_ch_to_freq_isdb[0])); unsigned int isdb_offset = 857; /* to get frequency in Hz, (s_ch_to_freq_atsc[i] * 1000 + isdb_offset) */ #endif /** Summary: Return the frequency table and number of entries. **/ bapp_result_t bapp_freq_table_get(bapp_freq_table_type_t type, const unsigned int *freq_table[], unsigned int *num_freq) { *num_freq = 0; *freq_table = NULL; switch(type) { case eFREQ_TABLE_NORTH_AMERICA_QAM: *freq_table = s_ch_to_freq_cable; *num_freq = s_ch_to_freq_cable_num; break; case eFREQ_DEBUG_QAM: *freq_table = s_ch_to_freq_cable_debug; *num_freq = s_ch_to_freq_cable_debug_num; break; case eFREQ_TABLE_NTIA_VSB: *freq_table = s_ch_to_freq_atsc; *num_freq = s_ch_to_freq_atsc_num; break; case eFREQ_TABLE_DTA_SELECT: *freq_table = s_select_freq; *num_freq = s_select_freq_num; break; #ifdef CONFIG_ISDB case eFREQ_TABLE_ISDB: *freq_table = s_ch_to_freq_isdb; *num_freq = s_ch_to_freq_isdb_num; break; #endif default: break; } return (*num_freq > 0) ? eBAPP_RESULT_OK : eBAPP_RESULT_FAILURE; }