| 1 | /*************************************************************************** |
|---|
| 2 | * (c)2011 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: nexus_frontend_scan.h $ |
|---|
| 39 | * $brcm_Revision: 1 $ |
|---|
| 40 | * $brcm_Date: 5/26/11 7:15p $ |
|---|
| 41 | * |
|---|
| 42 | * API Description: |
|---|
| 43 | * API name: Frontend channel scan |
|---|
| 44 | * Not all platforms support channel (frequency) scanning, and detectable |
|---|
| 45 | * signal types vary platform by platform. |
|---|
| 46 | * |
|---|
| 47 | * Revision History: |
|---|
| 48 | * |
|---|
| 49 | * $brcm_Log: /nexus/modules/frontend/7552/include/nexus_frontend_scan.h $ |
|---|
| 50 | * |
|---|
| 51 | * 1 5/26/11 7:15p jtna |
|---|
| 52 | * SW7552-35: initial branch-out |
|---|
| 53 | * |
|---|
| 54 | ***************************************************************************/ |
|---|
| 55 | |
|---|
| 56 | /* base was /nexus/modules/frontend/35230/include/nexus_frontend_scan.h@@/main/1 */ |
|---|
| 57 | |
|---|
| 58 | #ifndef NEXUS_FRONTEND_SCAN_H__ |
|---|
| 59 | #define NEXUS_FRONTEND_SCAN_H__ |
|---|
| 60 | |
|---|
| 61 | #include "nexus_frontend.h" |
|---|
| 62 | |
|---|
| 63 | #ifdef __cplusplus |
|---|
| 64 | extern "C" { |
|---|
| 65 | #endif |
|---|
| 66 | |
|---|
| 67 | /*************************************************************************** |
|---|
| 68 | Summary: |
|---|
| 69 | Signal types that may be scanned |
|---|
| 70 | ***************************************************************************/ |
|---|
| 71 | typedef enum NEXUS_FrontendSignalType |
|---|
| 72 | { |
|---|
| 73 | NEXUS_FrontendSignalType_eVsb, |
|---|
| 74 | NEXUS_FrontendSignalType_eQam, /* J.83B */ |
|---|
| 75 | NEXUS_FrontendSignalType_eAnalog, |
|---|
| 76 | NEXUS_FrontendSignalType_eNtsc = NEXUS_FrontendSignalType_eAnalog, |
|---|
| 77 | NEXUS_FrontendSignalType_eDvbt, |
|---|
| 78 | NEXUS_FrontendSignalType_eIsdbt, |
|---|
| 79 | NEXUS_FrontendSignalType_eDvbc, /* J.83A */ |
|---|
| 80 | NEXUS_FrontendSignalType_ePal, |
|---|
| 81 | NEXUS_FrontendSignalType_eSecam, |
|---|
| 82 | NEXUS_FrontendSignalType_eMax |
|---|
| 83 | } NEXUS_FrontendSignalType; |
|---|
| 84 | |
|---|
| 85 | /*************************************************************************** |
|---|
| 86 | Summary: |
|---|
| 87 | Options for NEXUS_Frontend_ScanFrequency |
|---|
| 88 | ***************************************************************************/ |
|---|
| 89 | typedef struct NEXUS_FrontendScanSettings |
|---|
| 90 | { |
|---|
| 91 | bool signalTypes[NEXUS_FrontendSignalType_eMax]; /* signal types to scan */ |
|---|
| 92 | |
|---|
| 93 | unsigned frequency; /* In Hz */ |
|---|
| 94 | unsigned ifFrequency; /* In Hz, ignored if 0 (zero) */ |
|---|
| 95 | unsigned bandwidths[NEXUS_FrontendBandwidth_eMax]; /* supported bandwidths, in Hz. |
|---|
| 96 | Ignored for fixed bandwidth signals, for example 6MHz for VSB. |
|---|
| 97 | Applied bandwidths are from index 0 upward until repeating the same bandwidth or NEXUS_FrontendBandwidth_eMax. |
|---|
| 98 | Supported bandwidths are platform and attached-tuner dependent. */ |
|---|
| 99 | } NEXUS_FrontendScanSettings; |
|---|
| 100 | |
|---|
| 101 | /*************************************************************************** |
|---|
| 102 | Summary: |
|---|
| 103 | Get default options for NEXUS_Frontend_ScanFrequency |
|---|
| 104 | ***************************************************************************/ |
|---|
| 105 | void NEXUS_Frontend_GetDefaultScanSettings( |
|---|
| 106 | NEXUS_FrontendHandle handle, |
|---|
| 107 | NEXUS_FrontendScanSettings *pSettings /* [out] */ |
|---|
| 108 | ); |
|---|
| 109 | |
|---|
| 110 | /*************************************************************************** |
|---|
| 111 | Summary: |
|---|
| 112 | Frequency Scan Results |
|---|
| 113 | ***************************************************************************/ |
|---|
| 114 | typedef struct NEXUS_FrontendScanResults |
|---|
| 115 | { |
|---|
| 116 | NEXUS_FrontendSignalType signalType; /* Detected signal type */ |
|---|
| 117 | |
|---|
| 118 | /* Based on the value in signalType, precise modulation scheme is |
|---|
| 119 | listed below */ |
|---|
| 120 | union |
|---|
| 121 | { |
|---|
| 122 | NEXUS_FrontendQamMode qam; |
|---|
| 123 | NEXUS_FrontendVsbMode vsb; |
|---|
| 124 | } mode; |
|---|
| 125 | |
|---|
| 126 | unsigned bandwidth; /* Detected bandwidth in Hz */ |
|---|
| 127 | bool spectrumInverted; /* is the spectrum inverted? */ |
|---|
| 128 | int frequencyOffset; /* in Hz */ |
|---|
| 129 | unsigned symbolRate; /* in baud, not all detected signals report */ |
|---|
| 130 | } NEXUS_FrontendScanResults; |
|---|
| 131 | |
|---|
| 132 | /*************************************************************************** |
|---|
| 133 | Summary: |
|---|
| 134 | Scan a frequency for specified signal types |
|---|
| 135 | |
|---|
| 136 | Description: |
|---|
| 137 | This is a blocking function. It will return NEXUS_SUCCESS if a signal |
|---|
| 138 | is detected matching the specified settings. If no signal is |
|---|
| 139 | detected, NEXUS_TIMEOUT will be returned. |
|---|
| 140 | |
|---|
| 141 | See NEXUS_Frontend_SatellitePeakscan for satellite frequency scanning. |
|---|
| 142 | ***************************************************************************/ |
|---|
| 143 | NEXUS_Error NEXUS_Frontend_ScanFrequency( |
|---|
| 144 | NEXUS_FrontendHandle handle, |
|---|
| 145 | const NEXUS_FrontendScanSettings *pSettings, |
|---|
| 146 | NEXUS_FrontendScanResults *pResults /* [out] */ |
|---|
| 147 | ); |
|---|
| 148 | |
|---|
| 149 | /*************************************************************************** |
|---|
| 150 | Summary: |
|---|
| 151 | Thresholds for NEXUS_Frontend_ScanFrequency operation |
|---|
| 152 | ***************************************************************************/ |
|---|
| 153 | typedef struct NEXUS_FrontendScanThresholds |
|---|
| 154 | { |
|---|
| 155 | unsigned qamThreshold; /* Value in ??? */ |
|---|
| 156 | unsigned agfThreshold; /* Value in 1/256 dB */ |
|---|
| 157 | unsigned agcThreshold; /* Value in 1/256 dB */ |
|---|
| 158 | } NEXUS_FrontendScanThresholds; |
|---|
| 159 | |
|---|
| 160 | /*************************************************************************** |
|---|
| 161 | Summary: |
|---|
| 162 | Get thresholds for NEXUS_Frontend_ScanFrequency operation |
|---|
| 163 | ***************************************************************************/ |
|---|
| 164 | void NEXUS_Frontend_GetScanThresholds( |
|---|
| 165 | NEXUS_FrontendHandle handle, |
|---|
| 166 | NEXUS_FrontendScanThresholds *pThresholds /* [out] */ |
|---|
| 167 | ); |
|---|
| 168 | |
|---|
| 169 | /*************************************************************************** |
|---|
| 170 | Summary: |
|---|
| 171 | Set thresholds for NEXUS_Frontend_ScanFrequency operation |
|---|
| 172 | ***************************************************************************/ |
|---|
| 173 | NEXUS_Error NEXUS_Frontend_SetScanThresholds( |
|---|
| 174 | NEXUS_FrontendHandle handle, |
|---|
| 175 | const NEXUS_FrontendScanThresholds *pThresholds |
|---|
| 176 | ); |
|---|
| 177 | |
|---|
| 178 | #ifdef __cplusplus |
|---|
| 179 | } |
|---|
| 180 | #endif |
|---|
| 181 | |
|---|
| 182 | #endif /* NEXUS_FRONTEND_SCAN_H__ */ |
|---|
| 183 | |
|---|