source: svn/newcon3bcm2_21bu/nexus/modules/frontend/common/src/nexus_frontend_module.h

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

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

  • Property svn:executable set to *
File size: 26.1 KB
Line 
1/***************************************************************************
2*     (c)2004-2012 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_module.h $
39* $brcm_Revision: 78 $
40* $brcm_Date: 1/6/12 4:44p $
41*
42* API Description:
43*   API name: Frontend Module
44*    Frontend module private APIs and module data.
45*
46* Revision History:
47*
48* $brcm_Log: X:/win_views/7425_latest/nexus/modules/frontend/common/src/nexus_frontend_module.h $
49*
50* 78   1/6/12 4:44p vishk
51* SW7425-1786: all chip-specific frontend API's must validate against an
52*  always-available chip id before dereferencing chip-specific data
53*  structures
54*
55* 77   11/17/11 4:43p vishk
56* SW3461-96: Remove GetLockStatus and replace it with GetFastStatus
57*
58* 76   11/1/11 5:04p mphillip
59* SW7425-1437: Merge 4528 to main
60*
61* 75   11/1/11 3:09p vishk
62* SW3461-55: Means of returning BCM3461 chip revsion and firmware
63*  revision via NEXUS i/f
64*
65* 74   10/12/11 11:55a vishk
66* SW3461-50, SW3128-16: add qam scan
67*
68* 73   10/11/11 6:52p vishk
69* SW3128-46: add support for BCM3124 devices
70*
71* 72   10/7/11 2:30p vishk
72* SW3128-47: Add Support for BCM3123
73*
74* 71   10/6/11 5:22p jtna
75* SW7425-1327: add NEXUS_Frontend_Get/SetTransportSettings()
76*
77* 70   10/6/11 4:50p jtna
78* SW7425-1189: change return type to void. make tsmfSettings per frontend
79*  handle, not per device.
80*
81* 69   10/5/11 12:24p jtna
82* SW7425-1189: add transport and frontend TSMF support
83*
84* 68   9/26/11 2:05p vishk
85* SW3461-53: 3461 interrupt line 'stuck low' after multiple tune events.
86*  Remove unsupported api.
87*
88* 67   9/21/11 5:43p vishk
89* SW3128-16: Add scan support to 3128
90*
91* 66   9/7/11 5:54p vishk
92* SW3461-36: add DVB T2 status API. Fix compilation flag.
93*
94* 65   9/7/11 5:36p vishk
95* SW3461-36: add DVB T2 status API.
96*
97* SATIP_7425_4528/1   7/11/11 12:02p vishk
98* SWSATFE-132: Add nexus support for 4528 satellite frontend for 97425
99*  SATIPSW platform.
100*
101* 64   6/23/11 5:47p vishk
102* SW7346-165: NEXUS Frontend changes for multi-tuner board are not
103*  platform independent
104*
105* 63   6/9/11 11:27a shyi
106* SWDTV-7365: Added Sharp VA1E1CD2406 tuner support to Nexus
107*
108* 62   6/8/11 2:14p vishk
109* SW7552-35: Add 7552 Nexus frontend support. External Tuner support has
110*  been removed as there will be no use case for it. Also, Scan features
111*  have been disabled for now.
112*
113* 61   5/27/11 8:54p jtna
114* SW7552-35: merge 7552 frontend work
115*
116* SW7552-35/1   5/26/11 7:46p jtna
117* SW7552-35: add 7552
118*
119* 60   5/24/11 7:05p vishk
120* SW7231-32: Implement the Nexus code to support the 3461 frontend chip
121*
122* 59   4/25/11 3:59p shyi
123* SWDTV-6735: Added Nutune FK1605 tuner support
124*
125* 58   4/15/11 3:45p shyi
126* SWDTV-6597: Added Silicon Labs Si2153 tuner support
127*
128* 57   3/29/11 2:59p shyi
129* SWDTV-6189: Added NEXUS frontend into 35233 build
130*
131* 56   3/17/11 1:12p vishk
132* SW7231-32: Implement the Nexus code to support the 3461 frontend chip
133*
134* 55   3/10/11 3:28p shyi
135* SWDTV-5866: Added SEMco DTVA50CVH1019 tuner support
136*
137* 54   3/9/11 1:56p erickson
138* SW7422-171: fix 3420
139*
140* 53   3/4/11 3:04p jgarrett
141* SW7422-171: Adding support for 3128 daughtercard
142*
143* 52   3/4/11 3:43p shyi
144* SWDTV-5407: Added the linkage between reading RF input power from a
145*  supported tuner and passing the read value to IFD
146*
147* 51   1/6/11 7:31p shyi
148* SW35230-2441: Made channel scanning a platform specific feature
149*
150* 50   12/9/10 11:02a shyi
151* SW35230-2520: Added LG Innotek TDTK-H801F tuner support
152*
153* 49   12/1/10 8:32p shyi
154* SW35230-2396: Added Nutune FA2328/31/32/33 tuner support
155*
156* 48   11/29/10 10:56a mward
157* SW7125-729:  Add header for NEXUS_FRONTEND_3412.
158*
159* SW7125-729/1   11/10/10 5:39p mward
160* SW7125-729:  Add header for NEXUS_FRONTEND_3412.
161*
162* 47   10/28/10 4:26p VISHK
163* SW7420-1020: Request for non-blocking call support in Nexus frontend
164*
165* 46   10/21/10 6:02p VISHK
166* SW7420-1020: Add asynchronous status API
167*
168* 45   10/21/10 6:00p VISHK
169* SW7420-1020: Add asynchronous status API
170*
171* 44   10/21/10 5:55p mphillip
172* SW7420-1020: Add asynchronous status API
173*
174* 43   10/14/10 11:24a shyi
175* SW35230-1738: Added NXP TD1636F tuner support to NEXUS layer
176* SW35230-1605: Added Sharp VA1E1ED2411 tuner support to NEXUS layer
177* SW35230-1469: Added Panasonic ENGS6301D5F tuner support to NEXUS layer
178* SW35230-1423: Added Panasonic ET-29 tuner support to NEXUS layer
179*
180* 42   8/26/10 12:00p jgarrett
181* SW35230-900: Merging new tuner interfaces to main branch
182*
183* 41   7/26/10 10:11a mward
184* SW7125-513:  Add NEXUS_FRONTEND_7125, default y, for host control of
185*  7125 tuner/ds.
186*
187* SW7125-513/1   7/12/10 4:42p mward
188* SW7125-513:  Add NEXUS_FRONTEND_7125, default y, for host control of
189*  7125 tuner/ds.
190*
191* SW35230-900/4   8/20/10 4:43p shyi
192* SW35230-900: Adding NXP TDA18273 tuner
193* SW35230-1049: Adding NXP TDA18273 tuner support at NEXUS layer
194*
195* SW35230-900/3   8/18/10 3:37p shyi
196* SW35230-900: Re-arranging build configuration and correcting function
197*  header comments
198*
199* SW35230-900/2   8/18/10 11:24a shyi
200* SW35230-900: Adding NULL tuner
201*
202* SW35230-900/1   8/12/10 8:24p shyi
203* SW35230-900: Taking TFE tuner changes for I2C read and firmware
204*  download capabilities
205*
206* 40   7/19/10 1:09p shyi
207* SW35230-49: Merging to main branch
208*
209* 39   2/25/10 6:20p mward
210* SW7400-2673: Implement support for BCM4500.
211*
212* SW7400-2673/1   2/22/10 1:45p mward
213* SW7400-2673:  Support BCM4500.
214*
215* SW35230-49/1   2/5/10 6:42p blovre
216* SW35230-49: making Nexus Frontend buildable 1'st ver. (inbranch)
217*
218* 38   11/6/09 5:06p jgarrett
219* SW7550-48: Adding 7550 Frontend Support
220*
221* 37   8/20/09 4:48p erickson
222* PR57770: convert FTM extension into more generic customer extension
223*
224* 36   7/21/09 9:01a erickson
225* PR56765: add ftm state and uninit
226*
227* 35   7/20/09 5:11p erickson
228* PR56765: enable separate NEXUS_FRONTEND_FTM_EXTENSION_INC extension
229*
230* 34   7/14/09 3:47p erickson
231* PR56789: remove NEXUS_Frontend_SetPowerState. unimplemented and unused.
232*
233* 33   7/13/09 4:47p erickson
234* PR56773: added NEXUS_FrontendDiseqcStatus
235*
236* 32   7/8/09 3:13p erickson
237* PR56607: remove unused NEXUS_Frontend_P_Register function
238*
239* 31   7/8/09 6:53a erickson
240* PR56607: add optional registerExtension operator so that callbacks can
241*  be recreated with the handle that the user gets. this allows
242*  NEXUS_StopCallbacks to work.
243*
244* 30   6/24/09 9:37a erickson
245* PR53078: add support for frontend handle extensions in 73xx public API
246*  implementations
247*
248* PR54416/2   5/21/09 6:03p jtna
249* PR54416: improve naming
250*
251* PR54416/1   5/15/09 7:48p jtna
252* PR54416: nexus support for satellite scanning
253*
254* 28   5/11/09 4:29p erickson
255* PR53078: get time of tune or resetStatus so that elapsed time can be
256*  returned with status
257*
258* 27   4/2/09 2:29p erickson
259* PR53078: satellite api additions
260*
261* 26   3/11/09 7:22p vishk
262* PR 46431: Add support for BCM3117, BCM3114, and BCM3112
263*
264* 25   2/9/09 5:04p jgarrett
265* PR 50837: Merge to main branch
266*
267* PR50837/1   1/29/09 10:37a jgarrett
268* PR 50837: Renaming 7325 to 73xx
269*
270* 24   1/26/09 11:29a erickson
271* PR51468: global variable naming convention
272*
273* 23   1/23/09 3:32p jgarrett
274* PR 51457: Adding frontend extension hooks for tuners and
275*  frontends/demods
276*
277* 22   1/16/09 7:40p vishk
278* PR46436: AOB PI: Add support for BCM3117 and BCM3114
279*
280* 21   12/22/08 9:48p agin
281* PR49982: Add reset diseqc.
282*
283* 20   12/11/08 4:07p erickson
284* PR49556: separate frontend power management into analog and digital,
285*  guarantee correct refcnt
286*
287* 19   10/2/08 11:27a erickson
288* PR40799: add optional untune function pointer
289*
290* 18   8/8/08 6:59p jgarrett
291* PR 45171: Adding AASD hooks
292*
293* 17   7/22/08 7:05p anilmm
294* PR44830: Add 3255 frontend
295*
296* 16   5/1/08 11:49a erickson
297* PR42376: add prototype
298*
299* 15   5/1/08 11:27a jgarrett
300* PR 41689: PR 41690: Adding dtt76800 and dtt75409 tuners
301*
302* 14   4/29/08 5:59p jrubio
303* PR42336: add 7325 tuner code
304*
305* 13   4/21/08 1:08p jgarrett
306* PR41793: PR41793: Frontend: Add Thomson tuner Dtt7045 driver to support
307*  8M tuner
308*
309* PR41793/1   4/21/08 3:05p pinglong
310* PR41793: Frontend: Add Thomson tuner Dtt7045 driver to support 8M tuner
311*
312* 12   4/8/08 1:53p erickson
313* PR39453: add 3548 & 3556
314*
315* 11   3/31/08 1:13p erickson
316* PR41075: add BDBG_OBJECT
317*
318* 10   3/14/08 1:33p jgarrett
319* PR 40111: Fixing prototype
320*
321* 9   3/14/08 1:31p jgarrett
322* PR 40111: Adding analog agc settings
323*
324* 8   3/14/08 12:55p jgarrett
325* PR 40108: Adding NEXUS_Frontend_ScanFrequency
326*
327* 7   3/14/08 11:31a jgarrett
328* PR 40109: Adding NEXUS_Frontend_ResetStatus
329*
330* 6   3/13/08 7:41p jgarrett
331* PR 39985: Adding AST support
332*
333* 5   3/12/08 10:25a erickson
334* PR39584: added BDBG_OBJECT_ASSERT's
335*
336* 4   3/4/08 9:48a jgarrett
337* PR 39984: Adding 3510/3420 support
338*
339* 3   2/8/08 6:36p jgarrett
340* PR 39408: Adding daughtercard support
341*
342* 2   2/7/08 5:36p jgarrett
343* PR 39407: Converting to common close functions
344*
345* 1   1/18/08 2:19p jgarrett
346* PR 38808: Merging to main branch
347*
348* Nexus_Devel/4   12/20/07 2:30p jgarrett
349* PR 38019: Adding GetAnalogAudioConnector
350*
351* Nexus_Devel/3   11/20/07 6:52p jgarrett
352* PR 37130: Unifying 3563 frontend and platform
353*
354* Nexus_Devel/2   10/10/07 11:29a jgarrett
355* PR 35551: Adding conditional includes for frontend chips
356*
357* Nexus_Devel/1   10/5/07 5:52p jgarrett
358* PR 35551: Adding initial version
359*
360***************************************************************************/
361#ifndef NEXUS_FRONTEND_MODULE_H__
362#define NEXUS_FRONTEND_MODULE_H__
363
364#include "nexus_frontend_thunks.h"
365#include "nexus_frontend.h"
366#include "nexus_tuner.h"
367#include "nexus_power_management.h"
368#include "nexus_base.h"
369#include "priv/nexus_core.h"
370#include "priv/nexus_core_audio.h"
371#include "priv/nexus_core_video.h"
372#include "blst_squeue.h"
373#include "nexus_frontend_extension_api.h"
374
375#ifdef NEXUS_FRONTEND_2940
376#include "nexus_frontend_2940.h"
377#endif
378#ifdef NEXUS_FRONTEND_3510
379#include "nexus_frontend_3510.h"
380#endif
381#ifdef NEXUS_FRONTEND_3520
382#include "nexus_frontend_3520.h"
383#endif
384#ifdef NEXUS_FRONTEND_DTT760X
385#include "nexus_tuner_dtt760x.h"
386#endif
387#ifdef NEXUS_FRONTEND_DTT7045
388#include "nexus_tuner_dtt7045.h"
389#endif
390#ifdef NEXUS_FRONTEND_DTT76800
391#include "nexus_tuner_dtt76800.h"
392#endif
393#ifdef NEXUS_FRONTEND_DTT75409
394#include "nexus_tuner_dtt75409.h"
395#endif
396#ifdef NEXUS_FRONTEND_3418
397#include "nexus_tuner_3418.h"
398#endif
399#ifdef NEXUS_FRONTEND_3420
400#include "nexus_tuner_3420.h"
401#endif
402#ifdef NEXUS_FRONTEND_3440
403#include "nexus_tuner_3440.h"
404#endif
405#ifdef NEXUS_FRONTEND_3412
406#include "nexus_amplifier_3412.h"
407#endif
408#ifdef NEXUS_FRONTEND_3431
409#include "nexus_amplifier_3431.h"
410#endif
411#ifdef NEXUS_FRONTEND_4500
412#include "nexus_frontend_4500.h"
413#endif
414#ifdef NEXUS_FRONTEND_4501
415#include "nexus_frontend_4501.h"
416#endif
417#ifdef NEXUS_FRONTEND_4506
418#include "nexus_frontend_4506.h"
419#endif
420#ifdef NEXUS_FRONTEND_4528
421#include "nexus_frontend_4528.h"
422#endif
423#ifdef NEXUS_FRONTEND_3563
424#include "nexus_frontend_3563.h"
425#endif
426#ifdef NEXUS_FRONTEND_3548
427#include "nexus_frontend_3548.h"
428#endif
429#ifdef NEXUS_FRONTEND_3556
430#include "nexus_frontend_3556.h"
431#endif
432#ifdef NEXUS_FRONTEND_35230
433#include "nexus_frontend_35230.h"
434#endif
435#ifdef NEXUS_FRONTEND_35233
436#include "nexus_frontend_35233.h"
437#endif
438#ifdef NEXUS_FRONTEND_7550
439#include "nexus_frontend_7550.h"
440#include "nexus_tuner_7550.h"
441#endif
442#ifdef NEXUS_FRONTEND_7552
443#include "nexus_frontend_7552.h"
444#endif
445#ifdef NEXUS_FRONTEND_73XX
446#include "nexus_frontend_73xx.h"
447#endif
448#ifdef NEXUS_FRONTEND_7346
449#include "nexus_frontend_7346.h"
450#endif
451#ifdef NEXUS_FRONTEND_3255
452#include "nexus_frontend_3255.h"
453#endif
454#ifdef NEXUS_FRONTEND_3117
455#include "nexus_frontend_31xx.h"
456#endif
457#ifdef NEXUS_FRONTEND_3114
458#include "nexus_frontend_31xx.h"
459#endif
460#ifdef NEXUS_FRONTEND_3112
461#include "nexus_frontend_31xx.h"
462#endif
463#ifdef NEXUS_FRONTEND_3109
464#include "nexus_frontend_31xx.h"
465#endif
466#ifdef NEXUS_FRONTEND_3128
467#include "nexus_frontend_3128.h"
468#endif
469#ifdef NEXUS_FRONTEND_3123
470#include "nexus_frontend_3128.h"
471#endif
472#ifdef NEXUS_FRONTEND_3124
473#include "nexus_frontend_3128.h"
474#endif
475#ifdef NEXUS_FRONTEND_3461
476#include "nexus_frontend_3461.h"
477#endif
478#ifdef NEXUS_FRONTEND_LGITTDTKH801F
479#include "nexus_tuner_lgittdtkh801f.h"
480#endif
481#ifdef NEXUS_FRONTEND_NUTUNEFA2315
482#include "nexus_tuner_nutunefa2315.h"
483#endif
484#ifdef NEXUS_FRONTEND_NUTUNEFA2328
485#include "nexus_tuner_nutunefa2328.h"
486#endif
487#ifdef NEXUS_FRONTEND_NUTUNEFH2601
488#include "nexus_tuner_nutunefh2601.h"
489#endif
490#ifdef NEXUS_FRONTEND_NUTUNEFK1605
491#include "nexus_tuner_nutunefk1605.h"
492#endif
493#ifdef NEXUS_FRONTEND_NULLTUNER
494#include "nexus_tuner_null.h"
495#endif
496#ifdef NEXUS_FRONTEND_NXPTDA18273
497#include "nexus_tuner_nxptda18273.h"
498#endif
499#ifdef NEXUS_FRONTEND_NXPTD1636F
500#include "nexus_tuner_nxptd1636f.h"
501#endif
502#ifdef NEXUS_FRONTEND_PANASONICENGS6301D5F
503#include "nexus_tuner_panasonicengs6301d5f.h"
504#endif
505#ifdef NEXUS_FRONTEND_PANASONICET29
506#include "nexus_tuner_panasonicet29.h"
507#endif
508#ifdef NEXUS_FRONTEND_SEMCODTVA50CVH1019
509#include "nexus_tuner_semcodtva50cvh1019.h"
510#endif
511#ifdef NEXUS_FRONTEND_SHARPVA1E1CD2406
512#include "nexus_tuner_sharpva1e1cd2406.h"
513#endif
514#ifdef NEXUS_FRONTEND_SHARPVA1E1ED2411
515#include "nexus_tuner_sharpva1e1ed2411.h"
516#endif
517#ifdef NEXUS_FRONTEND_SILABSSI2153
518#include "nexus_tuner_silabssi2153.h"
519#endif
520#ifdef NEXUS_FRONTEND_7125
521#include "nexus_frontend_7125.h"
522#include "nexus_tuner_7125.h"
523#endif
524#ifdef NEXUS_FRONTEND_SCAN_SUPPORTED
525#include "nexus_frontend_scan.h"
526#endif
527
528#ifdef NEXUS_FRONTEND_EXTENSION
529/* This is for NEXUS_FrontendHandle inheritence used to integrated board-specific logic
530into the frontend module. */
531#include "nexus_frontend_extension.h"
532#endif
533
534#ifdef NEXUS_FRONTEND_CUSTOMER_EXTENSION
535/* This is for customer's to add customer API's into the Frontend module. This is the
536normal meaning of the term "extension." */
537#include "nexus_frontend_customer_extension.h"
538
539/* this function must exist in the extension to uninit the customerData hook */
540extern void NEXUS_Frontend_P_UninitExtension( NEXUS_FrontendHandle handle );
541#endif
542
543#include "priv/nexus_frontend_analog_priv.h"
544#include "priv/nexus_tuner_priv.h"
545
546#ifdef __cplusplus
547extern "C" {
548#endif
549
550#ifdef NEXUS_MODULE_SELF
551#error Cant be in two modules at the same time
552#endif
553
554#define NEXUS_MODULE_NAME frontend
555#define NEXUS_MODULE_SELF g_NEXUS_frontendModule
556
557BDBG_OBJECT_ID_DECLARE(NEXUS_Frontend);
558
559/***************************************************************************
560 * Handle for a generic frontend object
561 ***************************************************************************/
562typedef struct NEXUS_Frontend
563{
564    BDBG_OBJECT(NEXUS_Frontend)
565    BLST_SQ_ENTRY(NEXUS_Frontend) node;
566    struct NEXUS_Frontend *pParentFrontend;     /* Only set for extended frontends */
567    unsigned numExtensions;
568    void *pDeviceHandle;
569    struct {
570        bool digital;
571        bool analog;
572    } power;
573    NEXUS_FrontendCapabilities capabilities;
574    NEXUS_FrontendUserParameters userParameters;
575    void        (*close)(NEXUS_FrontendHandle handle);
576    NEXUS_Error (*registerExtension)(NEXUS_FrontendHandle parentHandle, NEXUS_FrontendHandle extensionHandle);
577
578    NEXUS_Error (*tuneAnalog)(void *handle, const NEXUS_FrontendAnalogSettings *pSettings);
579    NEXUS_Error (*getAnalogStatus)(void *handle, NEXUS_FrontendAnalogStatus *pStatus);
580    NEXUS_VideoInput (*getAnalogVideoConnector)(void *handle);
581    NEXUS_AudioInput (*getAnalogAudioConnector)(void *handle);
582    NEXUS_Error (*tuneOutOfBand)(void *handle, const NEXUS_FrontendOutOfBandSettings *pSettings);
583    NEXUS_Error (*getOutOfBandStatus)(void *handle, NEXUS_FrontendOutOfBandStatus *pStatus);
584    NEXUS_Error (*tuneQam)(void *handle, const NEXUS_FrontendQamSettings *pSettings);
585    NEXUS_Error (*getQamStatus)(void *handle, NEXUS_FrontendQamStatus *pStatus);
586    NEXUS_Error (*tuneUpstream)(void *handle, const NEXUS_FrontendUpstreamSettings *pSettings);
587    NEXUS_Error (*getUpstreamStatus)(void *handle, NEXUS_FrontendUpstreamStatus *pStatus);
588    NEXUS_Error (*tuneVsb)(void *handle, const NEXUS_FrontendVsbSettings *pSettings);
589    NEXUS_Error (*getVsbStatus)(void *handle, NEXUS_FrontendVsbStatus *pStatus);
590    NEXUS_Error (*tuneSatellite)(void *handle, const NEXUS_FrontendSatelliteSettings *pSettings);
591    NEXUS_Error (*getSatelliteStatus)(void *handle, NEXUS_FrontendSatelliteStatus *pStatus);
592    void        (*getDiseqcSettings)(void *handle, NEXUS_FrontendDiseqcSettings *pSettings);
593    NEXUS_Error (*setDiseqcSettings)(void *handle, const NEXUS_FrontendDiseqcSettings *pSettings);
594    NEXUS_Error (*getDiseqcStatus)(void *handle, NEXUS_FrontendDiseqcStatus *pStatus);
595    NEXUS_Error (*sendDiseqcMessage)(void *handle, const uint8_t *pSendData, size_t sendDataSize, const NEXUS_CallbackDesc *pSendComplete);
596    NEXUS_Error (*getDiseqcReply)(void *handle, NEXUS_FrontendDiseqcMessageStatus *pStatus, uint8_t *pReplyBuffer, size_t replyBufferSize, size_t *pReplyLength);
597    NEXUS_Error (*sendDiseqcAcw)(void *handle, uint8_t codeWord);
598    NEXUS_Error (*resetDiseqc)(void *handle, uint8_t options);
599    NEXUS_Error (*tuneOfdm)(void *handle, const NEXUS_FrontendOfdmSettings *pSettings);
600    NEXUS_Error (*getOfdmStatus)(void *handle, NEXUS_FrontendOfdmStatus *pStatus);
601    NEXUS_Error (*getSoftDecisions)(void *handle, NEXUS_FrontendSoftDecision *pDecisions, size_t length);
602    void        (*resetStatus)(void *handle);
603    #ifdef NEXUS_FRONTEND_SCAN_SUPPORTED
604    NEXUS_Error (*scanFrequency)(void *handle, const NEXUS_FrontendScanSettings *pSettings, NEXUS_FrontendScanResults *pResults);
605    void        (*getScanThresholds)(void *handle, NEXUS_FrontendScanThresholds *pThresholds);
606    NEXUS_Error (*setScanThresholds)(void *handle, const NEXUS_FrontendScanThresholds *pThresholds);
607    #endif
608    void        (*getAnalogAgcSettings)(void *handle, NEXUS_FrontendAnalogAgcSettings *pSettings);
609    NEXUS_Error (*setAnalogAgcSettings)(void *handle, const NEXUS_FrontendAnalogAgcSettings *pSettings);
610    void        (*notifyAnalogVideoFormat)(void *handle, NEXUS_VideoFormat format);
611    void        (*getAnalogVideoFormat)(void *handle, NEXUS_VideoFormat *pFormat);
612    NEXUS_Error (*setAnalogAVFormat)(void *handle, NEXUS_VideoFormat format, NEXUS_IfdAudioMode audioMode, bool carriersOnly);
613    void        (*setAnalogAudioInterrupt)(void *handle, NEXUS_FrontendAnalogAudioInterruptFunc function_isr, void *pFuncParam);
614    void        (*untune)(void *handle); /* optional */
615    NEXUS_Error (*readSatelliteConfig)(void *handle, unsigned id, void *buffer, unsigned bufferSize);
616    NEXUS_Error (*writeSatelliteConfig)(void *handle, unsigned id, const void *buffer, unsigned bufferSize);
617    NEXUS_Error (*satellitePeakscan)(void *handle, const NEXUS_FrontendSatellitePeakscanSettings *pSettings);
618    NEXUS_Error (*getSatellitePeakscanResult)(void *handle, NEXUS_FrontendSatellitePeakscanResult *pResult);
619    NEXUS_Error (*requestQamAsyncStatus)(void *handle);
620    NEXUS_Error (*getQamAsyncStatus)(void *handle, NEXUS_FrontendQamStatus *pStatus);
621    NEXUS_Error (*requestOutOfBandAsyncStatus)(void *handle);
622    NEXUS_Error (*getOutOfBandAsyncStatus)(void *handle, NEXUS_FrontendOutOfBandStatus *pStatus);
623    NEXUS_Error (*requestOfdmAsyncStatus)(void *handle);
624    NEXUS_Error (*getOfdmAsyncStatus)(void *handle, NEXUS_FrontendOfdmStatus *pStatus);
625    NEXUS_Error (*getFastStatus)(void *handle, NEXUS_FrontendFastStatus *pStatus );
626    void (*getTsmfSettings)(void *handle, NEXUS_TsmfSettings *pSettings);
627    NEXUS_Error (*setTsmfSettings)(void *handle, const NEXUS_TsmfSettings *pSettings);
628    void (*getTransportSettings)(void *handle, NEXUS_FrontendTransportSettings *pSettings);
629    NEXUS_Error (*setTransportSettings)(void *handle, const NEXUS_FrontendTransportSettings *pSettings);
630    NEXUS_Error (*getQamScanStatus)(void *handle, NEXUS_FrontendQamScanStatus *pScanStatus );
631    void        (*getType)(void *handle, NEXUS_FrontendType *pType);
632   
633    NEXUS_Time resetStatusTime;
634    NEXUS_FrontendChipType chip; 
635} NEXUS_Frontend;
636
637/***************************************************************************
638 * Module Instance Data
639 ***************************************************************************/
640/* global module handle & data */
641extern NEXUS_ModuleHandle g_NEXUS_frontendModule;
642
643/***************************************************************************
644 * Generic tuner handle
645 ***************************************************************************/
646BDBG_OBJECT_ID_DECLARE(NEXUS_Tuner);
647typedef struct NEXUS_Tuner
648{
649    BDBG_OBJECT(NEXUS_Tuner)
650    void *pDeviceHandle;
651    void (*close)(void *handle);
652    NEXUS_Error (*setFrequency)(void *handle, NEXUS_TunerMode mode, unsigned frequency);
653    unsigned ifFrequency;
654    NEXUS_Error (*init)(void *handle);
655    NEXUS_Error (*getStatus)(void *handle, NEXUS_TunerStatus *pStatus);
656    void (*getDefaultTuneSettings)(NEXUS_TunerMode mode, NEXUS_TunerTuneSettings *pSettings);
657    NEXUS_Error (*tune)(void *handle, const NEXUS_TunerTuneSettings *pSettings);
658    NEXUS_Error (*getSettings)(void *handle, NEXUS_TunerSettings *pSettings);
659    NEXUS_Error (*setSettings)(void *handle, const NEXUS_TunerSettings *pSettings);
660    void *(*getAgcScript)(void *handle);
661    void (*getAttributes)(void *handle, NEXUS_TunerAttributes *pAttributes);
662    NEXUS_Error (*readPowerLevel)(void *handle, int *pPowerLevel);
663} NEXUS_Tuner;
664
665/***************************************************************************
666 * Generic method to create a nexus tuner.  It will be automatically
667 * destroyed when NEXUS_Tuner_Close is called.
668 ***************************************************************************/
669NEXUS_TunerHandle NEXUS_Tuner_P_Create(
670    void *pDeviceHandle
671    );
672
673#if NEXUS_TUNER_SUPPORT
674#include "btnr.h"
675/***************************************************************************
676 * Method to create a tuner from a BTNR handle.
677 ***************************************************************************/
678NEXUS_Tuner *NEXUS_Tuner_P_CreateFromBTNR(
679    BTNR_Handle tnrHandle
680    );
681#endif
682
683/***************************************************************************
684 * Generic IFD Handle
685 ***************************************************************************/
686#if NEXUS_IFD_SUPPORT
687#include "bifd.h"
688typedef struct NEXUS_Ifd
689{
690    BIFD_Handle ifdHandle;
691} NEXUS_Ifd;
692#endif
693
694/***************************************************************************
695 * Generic Amplifier Handle
696 ***************************************************************************/
697#if NEXUS_AMPLIFIER_SUPPORT
698#include "blna.h"
699typedef struct NEXUS_Amplifier
700{
701    BLNA_Handle lnaHandle;
702    NEXUS_AmplifierSettings settings;
703} NEXUS_Amplifier;
704#endif
705
706/***************************************************************************
707 * Generic Frontend Card handle
708 ***************************************************************************/
709#define NEXUS_MAX_FRONTEND_CHANNELS 8
710#define NEXUS_MAX_FRONTEND_OOB_CHANNELS 1
711#define NEXUS_MAX_FRONTEND_AUS_CHANNELS 1
712
713BDBG_OBJECT_ID_DECLARE(NEXUS_FrontendCard);
714typedef struct NEXUS_FrontendCard
715{
716    BDBG_OBJECT(NEXUS_FrontendCard)
717    unsigned numChannels;
718    unsigned numOutOfBandChannels;
719    unsigned numUpstreamChannels;
720    NEXUS_FrontendHandle frontends[NEXUS_MAX_FRONTEND_CHANNELS];
721    NEXUS_FrontendHandle outOfBandFrontends[NEXUS_MAX_FRONTEND_OOB_CHANNELS];
722    NEXUS_FrontendHandle upstreamFrontends[NEXUS_MAX_FRONTEND_AUS_CHANNELS];
723    NEXUS_AmplifierHandle amplifiers[NEXUS_MAX_FRONTEND_CHANNELS];
724    NEXUS_TunerHandle tuners[NEXUS_MAX_FRONTEND_CHANNELS];
725    NEXUS_IfdHandle ifds[NEXUS_MAX_FRONTEND_CHANNELS];
726} NEXUS_FrontendCard;
727
728
729/***************************************************************************
730 * Frontend Private Routines
731 ***************************************************************************/
732void NEXUS_Frontend_P_Init(void);
733NEXUS_FrontendHandle NEXUS_Frontend_P_Create(void *pDeviceHandle);
734void NEXUS_Frontend_P_Destroy(NEXUS_FrontendHandle handle);
735void NEXUS_Ifd_P_GetDefaultSettings(NEXUS_IfdSettings *pSettings);
736bool NEXUS_Frontend_P_ProbeCard(NEXUS_FrontendCard *pCard, const NEXUS_FrontendCardSettings *pSettings);
737unsigned NEXUS_Frontend_P_GetDefaultQamSymbolRate(NEXUS_FrontendQamMode mode, NEXUS_FrontendQamAnnex annex);
738void NEXUS_Frontend_P_SetPower(NEXUS_FrontendHandle handle, NEXUS_PowerManagementCore core, bool poweredUp);
739NEXUS_FrontendHandle NEXUS_Frontend_P_GetParentHandle(NEXUS_FrontendHandle handle);
740
741#ifdef __cplusplus
742}
743#endif
744
745#endif /* #ifndef NEXUS_FRONTEND_MODULE_H__ */
746
Note: See TracBrowser for help on using the repository browser.