close Warning: Can't use blame annotator:
No changeset 2 in the repository

source: svn/newcon3bcm2_21bu/magnum/basemodules/dsp/common/bdsp_task.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: 12.9 KB
RevLine 
1/***************************************************************************
2 *     Copyright (c) 2006-2012, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bdsp_task.h $
11 * $brcm_Revision: Hydra_Software_Devel/13 $
12 * $brcm_Date: 2/22/12 7:21p $
13 *
14 * Module Description: Host DSP Task Interface
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /magnum/basemodules/dsp/common/bdsp_task.h $
19 *
20 * Hydra_Software_Devel/13   2/22/12 7:21p ashoky
21 * SW7231-585: Adding APIs to expose interrupt bits to interrupt DSP.
22 *
23 * Hydra_Software_Devel/12   1/27/12 1:02p ashoky
24 * FWRAA-377: Merging h264 soft dsp video encoder to mainline.
25 *
26 * Hydra_Software_Devel/11   8/19/11 4:02p ashoky
27 * SWDTV-8271: [35233] Adding low delay support.
28 *
29 * Hydra_Software_Devel/10   6/24/11 1:50p gautamk
30 * SW7425-499: [7425] Merging to mainline.
31 *
32 * Hydra_Software_Devel/NRT_XCODE_DEVEL/2   6/22/11 6:21p gautamk
33 * SW7425-499: [7425] Adding bdsp suport for non-real time transcode
34 * cases.
35 *
36 * Hydra_Software_Devel/NRT_XCODE_DEVEL/1   6/17/11 6:15p gautamk
37 * SW7425-499: [7425] Adding bdsp suport for non-real time transcode
38 * cases.
39 *
40 * Hydra_Software_Devel/9   6/16/11 1:53p gautamk
41 * SW7422-357 : [7425] rehsuffling the defenitions
42 *
43 * Hydra_Software_Devel/8   6/15/11 4:21p gautamk
44 * SW7422-357 : [7425] Adding support for new API for getStageInputIndex
45 *
46 * Hydra_Software_Devel/7   6/14/11 3:13p gautamk
47 * SW7422-357 : [7425] Merging to mainline
48 *
49 * Hydra_Software_Devel/6   6/3/11 11:59a srajapur
50 * SW7422-357 : [7425] Added support for MS11
51 *
52 * Hydra_Software_Devel/5   6/2/11 7:56p srajapur
53 * SW7422-358 : [7425] Added support for MS11
54 *
55 * Hydra_Software_Devel/4   5/31/11 5:39p srajapur
56 * SW7422-358 : [7425] Added support for MS11
57 *
58 * Hydra_Software_Devel/3   5/25/11 5:24p srajapur
59 * SW7422-358: [7425] Adding support for MS11  in BDSP
60 *
61 * Hydra_Software_Devel/2   5/16/11 10:07p srajapur
62 * SW7425-572: [7425] Adding VP6 support in basemodules
63 *
64 * Hydra_Software_Devel/1   4/6/11 2:16p srajapur
65 * SW7425-291: [7425]BDSP directory structure changes
66 *
67 * Hydra_Software_Devel/3   1/13/11 6:00a gautamk
68 * SW7422-191:[7422]Adding DSP support for Audio decode in Basemodule  It
69 * includes - DSP Booting - Open time Download :  - Start Time Audio
70 * Decode algorithm download  - Message buffer interaction with DSP:  -
71 * Synchronized Interrupt:  - Async interrupts:  - Config Commands for
72 * Decode/TSM/IDS: - Status Buffer for Decode/TSM/IDS:  - Start AC3 Audio
73 * Decode:  - Pause/Resume Command:  - Frame Advance command:  - Device
74 * level interrupt
75 *
76 * Hydra_Software_Devel/2   12/15/10 6:47p jgarrett
77 * SW7422-146: Initial compileable prototype
78 *
79 * Hydra_Software_Devel/1   12/14/10 2:17p jgarrett
80 * SW7422-146: Adding initial API for APE/DSP
81 *
82 ***************************************************************************/
83
84#ifndef BDSP_TASK_H_
85#define BDSP_TASK_H_
86
87#include "bchp.h"
88#include "bint.h"
89#include "bmem.h"
90#include "breg_mem.h"
91#include "btmr.h"
92#include "bimg.h"
93#include "bdsp_context.h"
94#include "bdsp_raaga_cit_priv.h"
95#include "bdsp_raaga_fwstatus.h"
96#include "bdsp_raaga_fwstatus.h"
97
98/* Kept as 2 keeping in mind the ping-pong type of arrangement for video encoder */
99#define BDSP_MAX_EXT_INTERRUPT_PER_TASK                         2
100#define BDSP_MAX_METADATA_REGISTERS_PER_TASK            2
101
102
103/***************************************************************************
104Summary:
105Task Scheduling mode
106***************************************************************************/
107typedef enum BDSP_TaskSchedulingMode
108{
109   BDSP_TaskSchedulingMode_eStandalone,    /* Default.  Standalone task */
110   BDSP_TaskSchedulingMode_eMaster,            /* Master task in a master/slave relationship */
111   BDSP_TaskSchedulingMode_eSlave,                /* Slave task in a master/slave relationship */
112   BDSP_TaskSchedulingMode_eMax
113} BDSP_TaskSchedulingMode;
114
115
116/***************************************************************************
117Summary:
118Task Realtime mode
119***************************************************************************/
120typedef enum BDSP_TaskRealtimeMode
121{
122    BDSP_TaskRealtimeMode_eRealTime,                /* Realtime */     
123    BDSP_TaskRealtimeMode_eNonRealTime,                /* Non-Realtime */   
124    BDSP_TaskRealtimeMode_eSoftRealTime,                /* Soft-Realtime */     
125    BDSP_TaskRealtimeMode_eMax
126} BDSP_TaskRealtimeMode;
127
128
129/***************************************************************************
130Summary:
131Audio Task Low delay  mode
132***************************************************************************/
133typedef enum BDSP_AudioTaskDelayMode
134{
135    BDSP_AudioTaskDelayMode_eDefault,  /* Fixed path delay of 128ms is used for all audio processing */
136    BDSP_AudioTaskDelayMode_eLow,        /* Variable path delay depending on decode algorithm. */
137    BDSP_AudioTaskDelayMode_eMax       
138}BDSP_AudioTaskDelayMode;
139
140
141/***************************************************************************
142Summary:
143        The structure contains all information regarding soft increment of STC
144
145Description:
146        This structure contains configuration info of soft STC increment.
147
148See Also:
149        None.
150****************************************************************************/
151
152typedef struct BDSP_STCIncrementConfig
153{
154        /* If soft triggering is required. Default = BDSP_AF_P_eDisable */
155        bool                        enableStcTrigger;
156        /* High and Low part of registers to tell the amount of STC increment. */
157        uint32_t                                stcIncHiAddr;
158        uint32_t                                stcIncLowAddr;
159        /* Address of register to send trigger for incrementing STC */
160        uint32_t                                stcIncTrigAddr;
161    /* Trigger bit in the above register. Bit count [031]*/
162        uint32_t                                triggerBit;
163
164}BDSP_STCIncrementConfig;
165
166/***************************************************************************
167Summary:
168        The structure contains all information regarding soft external interrupts to DSP
169
170Description:
171        This structure contains configuration info of soft external interrupts to DSP.
172
173See Also:
174        None.
175****************************************************************************/
176typedef struct BDSP_ExtInterruptConfig
177{
178        /* If the dsp task will be interrupted by external client */
179        bool                    enableInterrupts;
180        uint32_t                                numInterrupts;
181        /* only numInterrupts of following struct will be valid */
182        struct
183        {
184                /* ESR_SI register address. Full 32bit address */
185                uint32_t                                interruptRegAddr;
186            /* Trigger bit in the above register. Bit count [0...31]*/
187                uint32_t                                interruptBit;
188        }interruptInfo[BDSP_MAX_EXT_INTERRUPT_PER_TASK];
189
190}BDSP_ExtInterruptConfig;
191
192/***************************************************************************
193Summary:
194        The structure contains all information regarding RDB registers that will be used to
195        communicate between dsp and some other clients.
196
197Description:
198        This structure contains configuration info of RDB registers that will be used to
199        communicate between dsp and some other clients.
200
201See Also:
202        None.
203****************************************************************************/
204typedef struct BDSP_VideoEncRdbRegisterConfig
205{
206        /* Full 32 bit RDB address for STC to take snapshot for generating ESCR/PTS */
207        uint32_t                                stcAddress;
208        /* Full 32 bit RDB address of DSP page registers where metadata will be written */
209        uint32_t                                metadataRdbAddress[BDSP_MAX_METADATA_REGISTERS_PER_TASK];
210}BDSP_VideoEncRdbRegisterConfig;
211
212/***************************************************************************
213Summary:
214Create A DSP Task
215***************************************************************************/
216typedef struct BDSP_TaskCreateSettings
217{
218    unsigned dspIndex;          /* Which DSP to create this task on */
219    BDSP_TaskSchedulingMode schedulingMode;   
220    BDSP_TaskRealtimeMode realtimeMode;
221    BDSP_TaskHandle masterTask;
222   
223    unsigned numBranches;
224    BDSP_CIT_P_FwBranchInfo *pBranchInfo[BDSP_P_MAX_FW_BRANCH_PER_FW_TASK]; /* Information of FW branches in a FW task */
225
226    /* TODO: Should probably be a union based on context/task type - revisit with video encoding */
227    BDSP_VF_P_sVDecodeBuffCfg   *psVDecodeBuffCfg;
228        BDSP_VF_P_sVEncoderConfig               *psVEncoderConfig;
229    BDSP_AudioTaskDelayMode     audioTaskDelayMode;
230
231    BDSP_AF_P_TimeBaseType  timeBaseType;       /* Time base type for a task 45Khz or 27 Mhz (Direct TV)*/         
232    bool    ppmCorrection;  /*Enable/Disable 2ms tight lypsinc*/
233    BDSP_STCIncrementConfig    stcIncrementConfig;  /* Soft increment of STC*/
234        BDSP_ExtInterruptConfig         extInterruptConfig; /* External interrupt to DSP configuration */
235        BDSP_VideoEncRdbRegisterConfig  videoEncRdbConfig;  /* RDB of DSP page configuration */
236} BDSP_TaskCreateSettings;
237
238
239
240/***************************************************************************
241Summary:
242Get Default DSP Task Settings
243***************************************************************************/
244void BDSP_Task_GetDefaultCreateSettings(
245    BDSP_ContextHandle context,
246    BDSP_TaskCreateSettings *pSettings     /* [out] */
247    );
248
249/***************************************************************************
250Summary:
251Create a DSP task
252***************************************************************************/
253BERR_Code BDSP_Task_Create(
254    BDSP_ContextHandle context,
255    const BDSP_TaskCreateSettings *pSettings,
256    BDSP_TaskHandle *pTask    /* [out] */
257    );
258
259/***************************************************************************
260Summary:
261Destroy a DSP task
262***************************************************************************/
263void BDSP_Task_Destroy(
264    BDSP_TaskHandle task
265    );
266
267/***************************************************************************
268Summary:
269Start a DSP task
270***************************************************************************/
271BERR_Code BDSP_Task_Start(
272    BDSP_TaskHandle task
273    );
274
275/***************************************************************************
276Summary:
277Stop a DSP task
278***************************************************************************/
279BERR_Code BDSP_Task_Stop(
280    BDSP_TaskHandle task
281    );
282
283/***************************************************************************
284Summary:
285Get settings for a particular task stage
286***************************************************************************/
287BERR_Code BDSP_Task_GetStageSettings(
288    BDSP_TaskHandle task,
289    unsigned branchId,
290    unsigned stageId,
291    void *pSettingsBuffer,        /* [out] */
292    size_t settingsBufferSize
293    );
294
295/***************************************************************************
296Summary:
297Set settings for a particular task stage
298***************************************************************************/
299BERR_Code BDSP_Task_SetStageSettings(
300    BDSP_TaskHandle task,
301    unsigned branchId,
302    unsigned stageId,
303    const void *pSettingsBuffer,
304    size_t settingsBufferSize
305    );
306
307/***************************************************************************
308Summary:
309Get status from a particular task stage
310***************************************************************************/
311BERR_Code BDSP_Task_GetStageStatus(
312    BDSP_TaskHandle task,
313    unsigned branchId,
314    unsigned stageId,
315    void *pStatusBuffer,        /* [out] */
316    size_t statusBufferSize
317    );
318
319/***************************************************************************
320Summary:
321Add Stage Input settings
322***************************************************************************/
323typedef struct BDSP_TaskAddStageInputSettings
324{
325    unsigned branchId;
326    unsigned stageId;
327    BDSP_CIT_P_FwStgSrcDstDetails sourceDetails;
328} BDSP_TaskAddStageInputSettings;
329
330
331/***************************************************************************
332Summary:
333Get default add Stage Input settings
334***************************************************************************/
335void BDSP_Task_GetDefaultAddStageInputSettings(
336    BDSP_CIT_P_FwStgSrcDstType  inputType,
337    BDSP_TaskAddStageInputSettings *pSettings /*[out] */
338    );
339
340
341/***************************************************************************
342Summary:
343Add input to a task stage
344***************************************************************************/
345BERR_Code BDSP_Task_AddStageInput(
346    BDSP_TaskHandle task,
347    const BDSP_TaskAddStageInputSettings *pSettings,
348    BDSP_TaskStageInputHandle *pHandle /* [out] */
349    );
350
351
352/***************************************************************************
353Summary:
354remove input from a task stage
355***************************************************************************/
356BERR_Code BDSP_Task_RemoveStageInput(
357    BDSP_TaskStageInputHandle input
358    );
359
360/***************************************************************************
361Summary:
362Get input index of a task stage
363***************************************************************************/
364BERR_Code BDSP_Task_GetStageInputIndex(
365    BDSP_TaskStageInputHandle input,
366    unsigned    *inputIndex
367    );
368#endif
369
Note: See TracBrowser for help on using the repository browser.