source: svn/newcon3bcm2_21bu/nexus/modules/frontend/common/src/nexus_frontend_vsb.c

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 5.6 KB
Line 
1/***************************************************************************
2*     (c)2004-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: nexus_frontend_vsb.c $
39* $brcm_Revision: 5 $
40* $brcm_Date: 6/16/09 2:50p $
41*
42* API Description:
43*   API name: Frontend QAM
44*    Generic APIs for QAM tuning.
45*
46* Revision History:
47*
48* $brcm_Log: /nexus/modules/frontend/common/src/nexus_frontend_vsb.c $
49*
50* 5   6/16/09 2:50p mward
51* PR56038: Default autoAcquire = true.
52*
53* 4   5/12/09 9:37a erickson
54* PR54481: add NEXUS_FrontendVsbStatus.timeElapsed
55*
56* 3   1/23/09 3:32p jgarrett
57* PR 51457: Adding frontend extension hooks for tuners and
58*  frontends/demods
59*
60* 2   7/11/08 5:07p jtna
61* PR42924: Add channel change measurements functionality
62*
63* 1   1/18/08 2:19p jgarrett
64* PR 38808: Merging to main branch
65*
66* Nexus_Devel/2   12/20/07 2:30p jgarrett
67* PR 38019: Adding terrestrial flag (default=true)
68*
69* Nexus_Devel/1   10/5/07 5:52p jgarrett
70* PR 35551: Adding initial version
71*
72***************************************************************************/
73
74#include "nexus_frontend_module.h"
75
76BDBG_MODULE(nexus_frontend_vsb);
77
78BTRC_MODULE_DECLARE(ChnChange_Tune);
79
80/***************************************************************************
81Summary:
82        Initialize a VSB settings structure to defaults
83See Also:
84    NEXUS_Frontend_TuneVsb
85 ***************************************************************************/
86void NEXUS_Frontend_GetDefaultVsbSettings(
87    NEXUS_FrontendVsbSettings *pSettings
88    )
89{
90    BKNI_Memset(pSettings, 0, sizeof(*pSettings));
91    pSettings->autoAcquire = true;
92    pSettings->terrestrial = true;
93}
94
95/***************************************************************************
96Summary:
97        Tune to a VSB channel
98See Also:
99    NEXUS_Frontend_InitVsbSettings
100 ***************************************************************************/
101NEXUS_Error NEXUS_Frontend_TuneVsb(
102    NEXUS_FrontendHandle handle,
103    const NEXUS_FrontendVsbSettings *pSettings
104    )
105{
106    BDBG_ASSERT(NULL != handle);
107    BDBG_ASSERT(NULL != pSettings);
108    BTRC_TRACE(ChnChange_Tune, START);
109
110    NEXUS_Time_Get(&handle->resetStatusTime);
111
112    if ( NULL == handle->tuneVsb )
113    {
114        if ( handle->pParentFrontend )
115        {
116            return NEXUS_Frontend_TuneVsb(handle->pParentFrontend, pSettings);
117        }
118        else
119        {
120            return BERR_TRACE(BERR_NOT_SUPPORTED);
121        }
122    }
123    else
124    {
125        return handle->tuneVsb(handle->pDeviceHandle, pSettings);
126    }
127}
128
129/***************************************************************************
130Summary:
131        Get the status of a VSB tuner
132 ***************************************************************************/
133NEXUS_Error NEXUS_Frontend_GetVsbStatus( NEXUS_FrontendHandle handle, NEXUS_FrontendVsbStatus *pStatus )
134{
135    NEXUS_Error rc;
136
137    BDBG_ASSERT(NULL != handle);
138    BDBG_ASSERT(NULL != pStatus);
139
140    if ( NULL == handle->getVsbStatus )
141    {
142        if ( handle->pParentFrontend )
143        {
144            rc = NEXUS_Frontend_GetVsbStatus(handle->pParentFrontend, pStatus);
145        }
146        else
147        {
148            return BERR_TRACE(BERR_NOT_SUPPORTED);
149        }
150    }
151    else
152    {
153        rc = handle->getVsbStatus(handle->pDeviceHandle, pStatus);
154    }
155    if (!rc) {
156        NEXUS_Time now;
157        NEXUS_Time_Get(&now);
158        pStatus->timeElapsed = NEXUS_Time_Diff(&now, &handle->resetStatusTime);
159    }
160    return rc;
161}
162
Note: See TracBrowser for help on using the repository browser.