source: svn/newcon3bcm2_21bu/magnum/syslib/pcrlib/7552/bpcrlib_aud.c @ 74

Last change on this file since 74 was 74, checked in by phkim, 10 years ago
  1. phkim
  2. zasc
  3. 변경 내용
    • CT_ChMapUpdatePMTAC3AudioDescriptor 메모리 leak 버그 수정
  • Property svn:executable set to *
File size: 3.4 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2003-2006, 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: bpcrlib_aud.c $
11 * $brcm_Revision: Hydra_Software_Devel/6 $
12 * $brcm_Date: 12/4/06 1:39p $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /magnum/syslib/pcrlib/7038/bpcrlib_aud.c $
19 *
20 * Hydra_Software_Devel/6   12/4/06 1:39p erickson
21 * PR26295: only call BXPT_PcrOffset_RegenOffset_isr on request_stc, not
22 * pts_error. this requires a new param to UpdateStc.
23 *
24 * Hydra_Software_Devel/5   8/29/05 6:24p vsilyaev
25 * PR 16685,PR15967: Added use of UpdateStc function.
26 *
27 * Hydra_Software_Devel/4   8/16/05 3:53p vsilyaev
28 * PR 15967: Added debug traces.
29 *
30 * Hydra_Software_Devel/3   8/9/05 2:31p vsilyaev
31 * PR 15967: Use both aux transport and decoder to access STC.
32 *
33 * Hydra_Software_Devel/2   6/28/05 1:16p vsilyaev
34 * PR 15697: Improved interface to update STC.
35 *
36 * Hydra_Software_Devel/1   6/24/05 3:49p vsilyaev
37 * PR 15967: 7038 implementation of the audio/video interface.
38 *
39 ***************************************************************************/
40#include "bstd.h"
41#include "bpcrlib.h"
42#include "bpcrlib_aud.h"
43#include "baud.h"
44#include "baud_dec.h"
45#include "bxpt_directv_pcr.h"
46
47BDBG_MODULE(pcrlib);
48
49
50static BERR_Code
51BPCRlib_Audio_GetStc_AUD_isr(void *trp, void *dec, uint32_t *stc)
52{
53        BAUD_DEC_TimeInfo time;
54        BERR_Code rc;
55
56        BSTD_UNUSED(trp);
57
58        BDBG_MSG(("AUD_AUD:GetStc %#x %#x", (unsigned)trp, (unsigned)dec));
59        rc = BAUD_DEC_GetCurrentTimeInfo_isr(dec, &time);
60        if (rc==BERR_SUCCESS) {
61                *stc = time.uiStc;
62        }
63        return rc;
64}
65
66static BERR_Code
67BPCRlib_Audio_GetPts_AUD_isr(void *dec, BAVC_PTSInfo *pts)
68{
69        BAUD_DEC_TimeInfo time;
70        BERR_Code rc;
71
72        BDBG_MSG(("AUD_AUD:GetPts %#x", (unsigned)dec));
73        rc = BAUD_DEC_GetCurrentTimeInfo_isr(dec, &time);
74        if (rc==BERR_SUCCESS) {
75                pts->ui32CurrentPTS = time.uiPts;
76                pts->ePTSType = BAVC_PTSType_eCoded;
77        }
78        return rc;
79}
80
81static BERR_Code
82BPCRlib_Audio_GetCdbLevel_AUD_isr(void *dec, unsigned *level)
83{
84        BSTD_UNUSED(dec);
85        *level = 0;
86        return BERR_SUCCESS;
87}
88
89static BERR_Code
90BPCRlib_Audio_SetStc_AUD_isr(void *trp, void *dec, bool dss, uint32_t stc)
91{
92        BERR_Code rc;
93
94        BSTD_UNUSED(dec);
95
96        if (dss) {
97                BDBG_MSG(("updating XPT: DSS stc %#x", stc));
98                rc = BXPT_PCR_DirecTv_SendPcr_isr(trp, stc);
99                if (rc!=BERR_SUCCESS) { BDBG_ERR(("BXPT_PCR_DirecTv_SendPcr_isr returned error %#x, ignored", rc)); }
100        } else {
101                BDBG_MSG(("updating XPT: stc %#x", stc));
102                rc = BXPT_PCR_SendPcr_isr(trp, stc, 0);
103                if (rc!=BERR_SUCCESS) { BDBG_ERR(("BXPT_PCR_SendPcr_isr returned error %#x, ignored", rc)); }
104        }
105        return rc;
106}
107
108static BERR_Code
109BPCRlib_Audio_UpdateStc_AUD_isr(void *trp, bool is_request_stc)
110{
111        BSTD_UNUSED(is_request_stc);
112        BDBG_MSG(("AUD_AUD:Update STC %#x", (unsigned)trp));
113        BXPT_PCR_RefreshPcrPid_isr(trp);
114        return BERR_SUCCESS;
115}
116
117
118const BPCRlib_StcDecIface BPCRlib_Audio_Aud = {
119        BPCRlib_Audio_GetPts_AUD_isr,
120        BPCRlib_Audio_GetStc_AUD_isr,
121        BPCRlib_Audio_GetCdbLevel_AUD_isr,
122        BPCRlib_Audio_SetStc_AUD_isr,
123        BPCRlib_Audio_UpdateStc_AUD_isr,
124        false
125};
126
127
128
129
130
Note: See TracBrowser for help on using the repository browser.