source: svn/newcon3bcm2_21bu/magnum/portinginterface/ape/7552/bape_output_capture.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: 8.1 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2006-2011, 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: bape_output_capture.h $
11 * $brcm_Revision: Hydra_Software_Devel/4 $
12 * $brcm_Date: 2/22/11 5:43p $
13 *
14 * Module Description: Audio Output Capture Interface
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /magnum/portinginterface/ape/7422/bape_output_capture.h $
19 *
20 * Hydra_Software_Devel/4   2/22/11 5:43p jgarrett
21 * SW7422-146: Implemented type renaming based on filter graph review
22 * comments
23 *
24 * Hydra_Software_Devel/3   12/16/10 4:04p jgarrett
25 * SW7422-146: Initial compilable APE for 7422
26 *
27 * Hydra_Software_Devel/2   12/14/10 2:39p jgarrett
28 * SW7422-146: Renaming MixerOutput to OutputPort
29 *
30 * Hydra_Software_Devel/1   12/14/10 2:16p jgarrett
31 * SW7422-146: Adding initial API for APE/DSP
32 *
33 ***************************************************************************/
34
35#ifndef BAPE_OUTPUT_CAPTURE_H_
36#define BAPE_OUTPUT_CAPTURE_H_
37
38/***************************************************************************
39Summary:
40Output Capture Handle
41***************************************************************************/
42typedef struct BAPE_OutputCapture *BAPE_OutputCaptureHandle;
43
44/***************************************************************************
45Summary:
46Output Capture Open Settings
47***************************************************************************/
48typedef struct BAPE_OutputCaptureOpenSettings
49{
50    unsigned numBuffers;            /* Number of buffers to allocate.  For mono or interleaved stereo,
51                                       one buffer is required.  For non-interleaved 7.1 data 8 buffers
52                                       are required.  For interleaved 7.1 data, 4 buffers are required. */
53    unsigned bufferSize;            /* Buffer size in bytes, must be a multiple of 256.  If more than one
54                                       buffer is allocated, all buffers will be this size.  If this size
55                                       is 0, buffers will be allocated from the internal buffer pool. */
56    unsigned watermarkThreshold;    /* FIFO interrupt threshold in bytes. 
57                                       When an amuont >= this threshold is available,
58                                       an interrupt will be raised. This value should
59                                       be a multiple of 256. */   
60} BAPE_OutputCaptureOpenSettings;
61
62/***************************************************************************
63Summary:
64Get Default Output Capture Open Settings
65***************************************************************************/
66void BAPE_OutputCapture_GetDefaultOpenSettings(
67    BAPE_OutputCaptureOpenSettings *pSettings       /* [out] */
68    );
69
70/***************************************************************************
71Summary:
72Open a capture output
73***************************************************************************/
74BERR_Code BAPE_OutputCapture_Open(
75    BAPE_Handle deviceHandle,
76    unsigned index,
77    const BAPE_OutputCaptureOpenSettings *pSettings,
78    BAPE_OutputCaptureHandle *pHandle             /* [out] */
79    );
80
81/***************************************************************************
82Summary:
83Close a capture output
84***************************************************************************/
85void BAPE_OutputCapture_Close(
86    BAPE_OutputCaptureHandle handle
87    );
88
89/***************************************************************************
90Summary:
91OutputCapture Settings
92***************************************************************************/
93typedef struct BAPE_OutputCaptureSettings
94{
95    unsigned bitsPerSample;                 /* Currently, only 32-bit PCM capture is supported.  */
96    bool interleaveData;                    /* If true, PCM data for a stereo pair will be interleaved
97                                               into a single buffer.  False will use a separate buffer
98                                               for each channel. */
99} BAPE_OutputCaptureSettings;
100
101/***************************************************************************
102Summary:
103Get OutputCapture Settings
104***************************************************************************/
105void BAPE_OutputCapture_GetSettings(
106    BAPE_OutputCaptureHandle handle,
107    BAPE_OutputCaptureSettings *pSettings       /* [out] */
108    );
109
110/***************************************************************************
111Summary:
112Set OutputCapture Settings
113***************************************************************************/
114BERR_Code BAPE_OutputCapture_SetSettings(
115    BAPE_OutputCaptureHandle handle,
116    const BAPE_OutputCaptureSettings *pSettings
117    );
118
119/***************************************************************************
120Summary:
121Flush OutputCapture Buffer
122***************************************************************************/
123void BAPE_OutputCapture_Flush(
124    BAPE_OutputCaptureHandle handle
125    );
126
127/***************************************************************************
128Summary:
129Flush OutputCapture Buffer from interrupt context
130***************************************************************************/
131void BAPE_OutputCapture_Flush_isr(
132    BAPE_OutputCaptureHandle handle
133    );
134
135/***************************************************************************
136Summary:
137Get Capture Buffer
138 
139Description:
140This routine will return the next contiguous buffer address and size.  If
141interrupts are enabled, the caller should call this routine and commit data
142until the size returned from this function is zero.
143***************************************************************************/
144BERR_Code BAPE_OutputCapture_GetBuffer(
145    BAPE_OutputCaptureHandle handle,
146    BAPE_BufferDescriptor *pBuffers      /* [out] */
147    );
148
149/***************************************************************************
150Summary:
151Mark data as consumed from the OutputCapture hardware
152***************************************************************************/
153BERR_Code BAPE_OutputCapture_ConsumeData(
154    BAPE_OutputCaptureHandle handle,
155    unsigned numBytes                   /* Number of bytes read from the buffer */
156    );
157
158/***************************************************************************
159Summary:
160Get Audio Output Connector
161***************************************************************************/
162void BAPE_OutputCapture_GetOutputPort(
163    BAPE_OutputCaptureHandle handle,
164    BAPE_OutputPort *pConnector
165    );
166
167/***************************************************************************
168Summary:
169Audio Output Capture Interrupts
170***************************************************************************/
171typedef struct BAPE_OutputCaptureInterruptHandlers
172{
173    struct
174    {
175        void (*pCallback_isr)(void *pParam1, int param2);
176        void *pParam1;
177        int param2;
178    } watermark;
179    struct
180    {
181        void (*pCallback_isr)(void *pParam1, int param2);
182        void *pParam1;
183        int param2;
184    } overflow;
185    struct
186    {
187        void (*pCallback_isr)(void *pParam1, int param2, unsigned sampleRate);
188        void *pParam1;
189        int param2;
190    } sampleRate;
191} BAPE_OutputCaptureInterruptHandlers;
192
193/***************************************************************************
194Summary:
195Get Audio Output Capture Interrupts
196***************************************************************************/
197void BAPE_OutputCapture_GetInterruptHandlers(
198    BAPE_OutputCaptureHandle handle,
199    BAPE_OutputCaptureInterruptHandlers *pInterrupts    /* [out] */
200    );
201
202/***************************************************************************
203Summary:
204Set Audio Output Capture Interrupts
205***************************************************************************/
206BERR_Code BAPE_OutputCapture_SetInterruptHandlers(
207    BAPE_OutputCaptureHandle handle,
208    const BAPE_OutputCaptureInterruptHandlers *pInterrupts
209    );
210
211#endif /* #ifndef BAPE_OUTPUT_CAPTURE_H_ */
212
Note: See TracBrowser for help on using the repository browser.