3 * Copyright 2012 Samsung Electronics S.LSI Co. LTD
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 * @file Exynos_OMX_Aacdec.c
21 * @author Sungyeon Kim (sy85.kim@samsung.com)
31 #include "Exynos_OMX_Macros.h"
32 #include "Exynos_OMX_Basecomponent.h"
33 #include "Exynos_OMX_Baseport.h"
34 #include "Exynos_OMX_Adec.h"
35 #include "Exynos_OSAL_ETC.h"
36 #include "Exynos_OSAL_Semaphore.h"
37 #include "Exynos_OSAL_Thread.h"
38 #include "library_register.h"
39 #include "Exynos_OMX_Aacdec.h"
42 #define EXYNOS_LOG_TAG "EXYNOS_AAC_DEC"
43 #define EXYNOS_LOG_OFF
44 #include "Exynos_OSAL_Log.h"
46 //#define Seiren_DUMP_TO_FILE
47 #ifdef Seiren_DUMP_TO_FILE
54 OMX_ERRORTYPE
Exynos_Seiren_AacDec_GetParameter(
55 OMX_IN OMX_HANDLETYPE hComponent
,
56 OMX_IN OMX_INDEXTYPE nParamIndex
,
57 OMX_INOUT OMX_PTR pComponentParameterStructure
)
59 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
60 OMX_COMPONENTTYPE
*pOMXComponent
= NULL
;
61 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= NULL
;
65 if (hComponent
== NULL
|| pComponentParameterStructure
== NULL
) {
66 ret
= OMX_ErrorBadParameter
;
69 pOMXComponent
= (OMX_COMPONENTTYPE
*)hComponent
;
70 ret
= Exynos_OMX_Check_SizeVersion(pOMXComponent
, sizeof(OMX_COMPONENTTYPE
));
71 if (ret
!= OMX_ErrorNone
) {
74 if (pOMXComponent
->pComponentPrivate
== NULL
) {
75 ret
= OMX_ErrorBadParameter
;
79 pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
80 if (pExynosComponent
->currentState
== OMX_StateInvalid
) {
81 ret
= OMX_ErrorInvalidState
;
85 switch (nParamIndex
) {
86 case OMX_IndexParamAudioAac
:
88 OMX_AUDIO_PARAM_AACPROFILETYPE
*pDstAacParam
= (OMX_AUDIO_PARAM_AACPROFILETYPE
*)pComponentParameterStructure
;
89 OMX_AUDIO_PARAM_AACPROFILETYPE
*pSrcAacParam
= NULL
;
90 EXYNOS_AAC_HANDLE
*pAacDec
= NULL
;
92 ret
= Exynos_OMX_Check_SizeVersion(pDstAacParam
, sizeof(OMX_AUDIO_PARAM_AACPROFILETYPE
));
93 if (ret
!= OMX_ErrorNone
) {
97 if (pDstAacParam
->nPortIndex
>= ALL_PORT_NUM
) {
98 ret
= OMX_ErrorBadPortIndex
;
102 pAacDec
= (EXYNOS_AAC_HANDLE
*)((EXYNOS_OMX_AUDIODEC_COMPONENT
*)pExynosComponent
->hComponentHandle
)->hCodecHandle
;
103 pSrcAacParam
= &pAacDec
->aacParam
;
105 Exynos_OSAL_Memcpy(pDstAacParam
, pSrcAacParam
, sizeof(OMX_AUDIO_PARAM_AACPROFILETYPE
));
108 case OMX_IndexParamAudioPcm
:
110 OMX_AUDIO_PARAM_PCMMODETYPE
*pDstPcmParam
= (OMX_AUDIO_PARAM_PCMMODETYPE
*)pComponentParameterStructure
;
111 OMX_AUDIO_PARAM_PCMMODETYPE
*pSrcPcmParam
= NULL
;
112 EXYNOS_AAC_HANDLE
*pAacDec
= NULL
;
114 ret
= Exynos_OMX_Check_SizeVersion(pDstPcmParam
, sizeof(OMX_AUDIO_PARAM_PCMMODETYPE
));
115 if (ret
!= OMX_ErrorNone
) {
119 if (pDstPcmParam
->nPortIndex
>= ALL_PORT_NUM
) {
120 ret
= OMX_ErrorBadPortIndex
;
124 pAacDec
= (EXYNOS_AAC_HANDLE
*)((EXYNOS_OMX_AUDIODEC_COMPONENT
*)pExynosComponent
->hComponentHandle
)->hCodecHandle
;
125 pSrcPcmParam
= &pAacDec
->pcmParam
;
127 Exynos_OSAL_Memcpy(pDstPcmParam
, pSrcPcmParam
, sizeof(OMX_AUDIO_PARAM_PCMMODETYPE
));
130 case OMX_IndexParamStandardComponentRole
:
133 OMX_PARAM_COMPONENTROLETYPE
*pComponentRole
= (OMX_PARAM_COMPONENTROLETYPE
*)pComponentParameterStructure
;
135 ret
= Exynos_OMX_Check_SizeVersion(pComponentRole
, sizeof(OMX_PARAM_COMPONENTROLETYPE
));
136 if (ret
!= OMX_ErrorNone
) {
140 Exynos_OSAL_Strcpy((char *)pComponentRole
->cRole
, EXYNOS_OMX_COMPONENT_AAC_DEC_ROLE
);
144 ret
= Exynos_OMX_AudioDecodeGetParameter(hComponent
, nParamIndex
, pComponentParameterStructure
);
153 OMX_ERRORTYPE
Exynos_Seiren_AacDec_SetParameter(
154 OMX_IN OMX_HANDLETYPE hComponent
,
155 OMX_IN OMX_INDEXTYPE nIndex
,
156 OMX_IN OMX_PTR pComponentParameterStructure
)
158 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
159 OMX_COMPONENTTYPE
*pOMXComponent
= NULL
;
160 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= NULL
;
164 if (hComponent
== NULL
|| pComponentParameterStructure
== NULL
) {
165 ret
= OMX_ErrorBadParameter
;
168 pOMXComponent
= (OMX_COMPONENTTYPE
*)hComponent
;
169 ret
= Exynos_OMX_Check_SizeVersion(pOMXComponent
, sizeof(OMX_COMPONENTTYPE
));
170 if (ret
!= OMX_ErrorNone
) {
173 if (pOMXComponent
->pComponentPrivate
== NULL
) {
174 ret
= OMX_ErrorBadParameter
;
178 pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
179 if (pExynosComponent
->currentState
== OMX_StateInvalid
) {
180 ret
= OMX_ErrorInvalidState
;
185 case OMX_IndexParamAudioAac
:
187 OMX_AUDIO_PARAM_AACPROFILETYPE
*pDstAacParam
= NULL
;
188 OMX_AUDIO_PARAM_AACPROFILETYPE
*pSrcAacParam
= (OMX_AUDIO_PARAM_AACPROFILETYPE
*)pComponentParameterStructure
;
189 EXYNOS_AAC_HANDLE
*pAacDec
= NULL
;
191 ret
= Exynos_OMX_Check_SizeVersion(pSrcAacParam
, sizeof(OMX_AUDIO_PARAM_AACPROFILETYPE
));
192 if (ret
!= OMX_ErrorNone
) {
196 if (pSrcAacParam
->nPortIndex
>= ALL_PORT_NUM
) {
197 ret
= OMX_ErrorBadPortIndex
;
201 pAacDec
= (EXYNOS_AAC_HANDLE
*)((EXYNOS_OMX_AUDIODEC_COMPONENT
*)pExynosComponent
->hComponentHandle
)->hCodecHandle
;
202 pDstAacParam
= &pAacDec
->aacParam
;
204 Exynos_OSAL_Memcpy(pDstAacParam
, pSrcAacParam
, sizeof(OMX_AUDIO_PARAM_AACPROFILETYPE
));
205 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m nSize : %d \e[0m", pDstAacParam
->nSize
);
206 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m nPortIndex : %d \e[0m", pDstAacParam
->nPortIndex
);
207 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m nChannels : %d \e[0m", pDstAacParam
->nChannels
);
208 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m nSampleRate : %d \e[0m", pDstAacParam
->nSampleRate
);
209 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m nBitRate : %d \e[0m", pDstAacParam
->nBitRate
);
210 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m nAudioBandWidth : %d \e[0m", pDstAacParam
->nAudioBandWidth
);
211 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m nFrameLength : %d \e[0m", pDstAacParam
->nFrameLength
);
212 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m nAACtools : %d \e[0m", pDstAacParam
->nAACtools
);
213 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m nAACERtools : %d \e[0m", pDstAacParam
->nAACERtools
);
214 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m eAACProfile : %d \e[0m", pDstAacParam
->eAACProfile
);
215 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m eAACStreamFormat : %d \e[0m", pDstAacParam
->eAACStreamFormat
);
216 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33;46m eChannelMode : %d \e[0m", pDstAacParam
->eChannelMode
);
219 case OMX_IndexParamAudioPcm
:
221 OMX_AUDIO_PARAM_PCMMODETYPE
*pDstPcmParam
= NULL
;
222 OMX_AUDIO_PARAM_PCMMODETYPE
*pSrcPcmParam
= (OMX_AUDIO_PARAM_PCMMODETYPE
*)pComponentParameterStructure
;
223 EXYNOS_AAC_HANDLE
*pAacDec
= NULL
;
225 ret
= Exynos_OMX_Check_SizeVersion(pSrcPcmParam
, sizeof(OMX_AUDIO_PARAM_PCMMODETYPE
));
226 if (ret
!= OMX_ErrorNone
) {
230 if (pSrcPcmParam
->nPortIndex
>= ALL_PORT_NUM
) {
231 ret
= OMX_ErrorBadPortIndex
;
235 pAacDec
= (EXYNOS_AAC_HANDLE
*)((EXYNOS_OMX_AUDIODEC_COMPONENT
*)pExynosComponent
->hComponentHandle
)->hCodecHandle
;
236 pDstPcmParam
= &pAacDec
->pcmParam
;
238 Exynos_OSAL_Memcpy(pDstPcmParam
, pSrcPcmParam
, sizeof(OMX_AUDIO_PARAM_PCMMODETYPE
));
241 case OMX_IndexParamStandardComponentRole
:
243 OMX_PARAM_COMPONENTROLETYPE
*pComponentRole
= (OMX_PARAM_COMPONENTROLETYPE
*)pComponentParameterStructure
;
245 ret
= Exynos_OMX_Check_SizeVersion(pComponentRole
, sizeof(OMX_PARAM_COMPONENTROLETYPE
));
246 if (ret
!= OMX_ErrorNone
) {
250 if ((pExynosComponent
->currentState
!= OMX_StateLoaded
) && (pExynosComponent
->currentState
!= OMX_StateWaitForResources
)) {
251 ret
= OMX_ErrorIncorrectStateOperation
;
255 if (!Exynos_OSAL_Strcmp((char*)pComponentRole
->cRole
, EXYNOS_OMX_COMPONENT_AAC_DEC_ROLE
)) {
256 pExynosComponent
->pExynosPort
[INPUT_PORT_INDEX
].portDefinition
.format
.audio
.eEncoding
= OMX_AUDIO_CodingAAC
;
258 ret
= OMX_ErrorBadParameter
;
264 ret
= Exynos_OMX_AudioDecodeSetParameter(hComponent
, nIndex
, pComponentParameterStructure
);
273 OMX_ERRORTYPE
Exynos_Seiren_AacDec_GetConfig(
274 OMX_IN OMX_HANDLETYPE hComponent
,
275 OMX_IN OMX_INDEXTYPE nIndex
,
276 OMX_IN OMX_PTR pComponentConfigStructure
)
278 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
279 OMX_COMPONENTTYPE
*pOMXComponent
= NULL
;
280 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= NULL
;
284 if (hComponent
== NULL
|| pComponentConfigStructure
== NULL
) {
285 ret
= OMX_ErrorBadParameter
;
288 pOMXComponent
= (OMX_COMPONENTTYPE
*)hComponent
;
289 ret
= Exynos_OMX_Check_SizeVersion(pOMXComponent
, sizeof(OMX_COMPONENTTYPE
));
290 if (ret
!= OMX_ErrorNone
) {
293 if (pOMXComponent
->pComponentPrivate
== NULL
) {
294 ret
= OMX_ErrorBadParameter
;
298 pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
299 if (pExynosComponent
->currentState
== OMX_StateInvalid
) {
300 ret
= OMX_ErrorInvalidState
;
306 ret
= Exynos_OMX_AudioDecodeGetConfig(hComponent
, nIndex
, pComponentConfigStructure
);
316 OMX_ERRORTYPE
Exynos_Seiren_AacDec_SetConfig(
317 OMX_IN OMX_HANDLETYPE hComponent
,
318 OMX_IN OMX_INDEXTYPE nIndex
,
319 OMX_IN OMX_PTR pComponentConfigStructure
)
321 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
322 OMX_COMPONENTTYPE
*pOMXComponent
= NULL
;
323 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= NULL
;
327 if (hComponent
== NULL
|| pComponentConfigStructure
== NULL
) {
328 ret
= OMX_ErrorBadParameter
;
331 pOMXComponent
= (OMX_COMPONENTTYPE
*)hComponent
;
332 ret
= Exynos_OMX_Check_SizeVersion(pOMXComponent
, sizeof(OMX_COMPONENTTYPE
));
333 if (ret
!= OMX_ErrorNone
) {
336 if (pOMXComponent
->pComponentPrivate
== NULL
) {
337 ret
= OMX_ErrorBadParameter
;
341 pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
342 if (pExynosComponent
->currentState
== OMX_StateInvalid
) {
343 ret
= OMX_ErrorInvalidState
;
349 ret
= Exynos_OMX_AudioDecodeSetConfig(hComponent
, nIndex
, pComponentConfigStructure
);
359 OMX_ERRORTYPE
Exynos_Seiren_AacDec_GetExtensionIndex(
360 OMX_IN OMX_HANDLETYPE hComponent
,
361 OMX_IN OMX_STRING cParameterName
,
362 OMX_OUT OMX_INDEXTYPE
*pIndexType
)
364 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
365 OMX_COMPONENTTYPE
*pOMXComponent
= NULL
;
366 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= NULL
;
370 if (hComponent
== NULL
) {
371 ret
= OMX_ErrorBadParameter
;
374 pOMXComponent
= (OMX_COMPONENTTYPE
*)hComponent
;
375 ret
= Exynos_OMX_Check_SizeVersion(pOMXComponent
, sizeof(OMX_COMPONENTTYPE
));
376 if (ret
!= OMX_ErrorNone
) {
380 if (pOMXComponent
->pComponentPrivate
== NULL
) {
381 ret
= OMX_ErrorBadParameter
;
384 pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
386 if ((cParameterName
== NULL
) || (pIndexType
== NULL
)) {
387 ret
= OMX_ErrorBadParameter
;
390 if (pExynosComponent
->currentState
== OMX_StateInvalid
) {
391 ret
= OMX_ErrorInvalidState
;
395 ret
= Exynos_OMX_AudioDecodeGetExtensionIndex(hComponent
, cParameterName
, pIndexType
);
403 OMX_ERRORTYPE
Exynos_Seiren_AacDec_ComponentRoleEnum(
404 OMX_IN OMX_HANDLETYPE hComponent
,
405 OMX_OUT OMX_U8
*cRole
,
406 OMX_IN OMX_U32 nIndex
)
408 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
409 OMX_COMPONENTTYPE
*pOMXComponent
= NULL
;
410 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= NULL
;
415 if ((hComponent
== NULL
) || (cRole
== NULL
)) {
416 ret
= OMX_ErrorBadParameter
;
419 if (nIndex
!= (MAX_COMPONENT_ROLE_NUM
- 1)) {
420 ret
= OMX_ErrorNoMore
;
423 pOMXComponent
= (OMX_COMPONENTTYPE
*)hComponent
;
424 ret
= Exynos_OMX_Check_SizeVersion(pOMXComponent
, sizeof(OMX_COMPONENTTYPE
));
425 if (ret
!= OMX_ErrorNone
) {
428 if (pOMXComponent
->pComponentPrivate
== NULL
) {
429 ret
= OMX_ErrorBadParameter
;
433 pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
434 if (pExynosComponent
->currentState
== OMX_StateInvalid
) {
435 ret
= OMX_ErrorInvalidState
;
439 Exynos_OSAL_Strcpy((char *)cRole
, EXYNOS_OMX_COMPONENT_AAC_DEC_ROLE
);
447 OMX_ERRORTYPE
Exynos_Seiren_AacDec_Init(OMX_COMPONENTTYPE
*pOMXComponent
)
449 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
450 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
451 EXYNOS_OMX_AUDIODEC_COMPONENT
*pAudioDec
= (EXYNOS_OMX_AUDIODEC_COMPONENT
*)pExynosComponent
->hComponentHandle
;
452 EXYNOS_AAC_HANDLE
*pAacDec
= (EXYNOS_AAC_HANDLE
*)pAudioDec
->hCodecHandle
;
456 INIT_ARRAY_TO_VAL(pExynosComponent
->timeStamp
, DEFAULT_TIMESTAMP_VAL
, MAX_TIMESTAMP
);
457 Exynos_OSAL_Memset(pExynosComponent
->nFlags
, 0, sizeof(OMX_U32
) * MAX_FLAGS
);
458 pExynosComponent
->bUseFlagEOF
= OMX_TRUE
; /* Aac extractor should parse into frame unit. */
459 pExynosComponent
->bSaveFlagEOS
= OMX_FALSE
;
460 pAacDec
->hSeirenAacHandle
.bConfiguredSeiren
= OMX_FALSE
;
461 pAacDec
->hSeirenAacHandle
.bSeirenSendEOS
= OMX_FALSE
;
462 pExynosComponent
->getAllDelayBuffer
= OMX_FALSE
;
464 #ifdef Seiren_DUMP_TO_FILE
465 inFile
= fopen("/data/InFile.aac", "w+");
466 outFile
= fopen("/data/OutFile.pcm", "w+");
475 OMX_ERRORTYPE
Exynos_Seiren_AacDec_Terminate(OMX_COMPONENTTYPE
*pOMXComponent
)
477 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
478 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
482 #ifdef Seiren_DUMP_TO_FILE
493 OMX_ERRORTYPE
Exynos_Seiren_Aac_Decode_Block(OMX_COMPONENTTYPE
*pOMXComponent
, EXYNOS_OMX_DATA
*pInputData
, EXYNOS_OMX_DATA
*pOutputData
)
495 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
496 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
497 EXYNOS_OMX_AUDIODEC_COMPONENT
*pAudioDec
= (EXYNOS_OMX_AUDIODEC_COMPONENT
*)pExynosComponent
->hComponentHandle
;
498 EXYNOS_AAC_HANDLE
*pAacDec
= (EXYNOS_AAC_HANDLE
*)pAudioDec
->hCodecHandle
;
500 unsigned long isSeirenStopped
= 0;
501 OMX_BOOL isSeirenIbufOverflow
= OMX_FALSE
;
503 u32 fd
= pAacDec
->hSeirenAacHandle
.hSeirenHandle
;
504 audio_mem_info_t input_mem_pool
= pAacDec
->hSeirenAacHandle
.input_mem_pool
;
505 audio_mem_info_t output_mem_pool
= pAacDec
->hSeirenAacHandle
.output_mem_pool
;
506 unsigned long sample_rate
, channels
;
507 int consumed_size
= 0;
508 sample_rate
= channels
= 0;
512 #ifdef Seiren_DUMP_TO_FILE
513 if (pExynosComponent
->reInputData
== OMX_FALSE
) {
514 fwrite(pInputData
->multiPlaneBuffer
.dataBuffer
[AUDIO_DATA_PLANE
], pInputData
->dataLen
, 1, inFile
);
518 /* Save timestamp and flags of input data */
519 pOutputData
->timeStamp
= pInputData
->timeStamp
;
520 pOutputData
->nFlags
= pInputData
->nFlags
& (~OMX_BUFFERFLAG_EOS
);
522 /* Decoding aac frames by Seiren */
523 if (pExynosComponent
->getAllDelayBuffer
== OMX_FALSE
) {
524 input_mem_pool
.data_size
= pInputData
->dataLen
;
525 char* pt
= input_mem_pool
.virt_addr
;
526 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "\e[1;33m %02X %02X %02X %02X %02X %02X %lld \e[0m", *pt
,*(pt
+1),*(pt
+2),*(pt
+3),*(pt
+4), *(pt
+5), pInputData
->timeStamp
);
528 if (pInputData
->nFlags
& OMX_BUFFERFLAG_CODECCONFIG
) {
529 if (pAacDec
->hSeirenAacHandle
.bConfiguredSeiren
== OMX_TRUE
)
532 ADec_ConfigSignal(fd
);
533 unsigned char sample_rate_index
= ((*(pt
+1)) >> 7 & 0x01) |
535 unsigned char num_of_channel
= ((*(pt
+1)) >> 3 & 0x07);
536 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "index %x ", sample_rate_index
);
537 ADec_SetParams(fd
, PCM_PARAM_SAMPLE_RATE
, aac_sample_rates
[sample_rate_index
]);
538 ADec_SetParams(fd
, PCM_PARAM_NUM_OF_CH
, num_of_channel
);
540 /* AAC setup-data(or DSI) could be various length. But it only needs 2byte */
541 input_mem_pool
.data_size
= 2;
542 ADec_SendStream(fd
, &input_mem_pool
, &consumed_size
);
545 returnCodec
= ADec_SendStream(fd
, &input_mem_pool
, &consumed_size
);
547 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "ProcessedSize : %d return : %d", consumed_size
, returnCodec
);
548 if (pInputData
->nFlags
& OMX_BUFFERFLAG_EOS
)
549 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "EOS!!");
550 if (returnCodec
>= 0) {
551 if (pInputData
->nFlags
& OMX_BUFFERFLAG_EOS
) {
553 pAacDec
->hSeirenAacHandle
.bSeirenSendEOS
= OMX_TRUE
;
555 } else if (returnCodec
< 0) {
556 ret
= OMX_ErrorCodecDecode
;
561 if (pAacDec
->hSeirenAacHandle
.bConfiguredSeiren
== OMX_FALSE
) {
562 if ((pInputData
->dataLen
<= 0) && (pInputData
->nFlags
& OMX_BUFFERFLAG_EOS
)) {
563 pOutputData
->nFlags
|= OMX_BUFFERFLAG_EOS
;
564 pAacDec
->hSeirenAacHandle
.bSeirenSendEOS
= OMX_FALSE
;
569 returnCodec
= ADec_GetParams(fd
, PCM_PARAM_SAMPLE_RATE
, &sample_rate
);
570 returnCodec
= returnCodec
| ADec_GetParams(fd
, PCM_PARAM_NUM_OF_CH
, &channels
);
572 if (returnCodec
< 0) {
573 Exynos_OSAL_Log(EXYNOS_LOG_ERROR
, "Seiren_ADec_GetParams failed: %d", returnCodec
);
574 ret
= OMX_ErrorHardware
;
578 if (!sample_rate
|| !channels
) {
579 if (pAacDec
->hSeirenAacHandle
.bSeirenSendEOS
== OMX_TRUE
) {
580 pOutputData
->dataLen
= 0;
581 pExynosComponent
->getAllDelayBuffer
= OMX_TRUE
;
583 pExynosComponent
->getAllDelayBuffer
= OMX_FALSE
;
589 Exynos_OSAL_Log(EXYNOS_LOG_TRACE
, "numChannels(%d), samplingRate(%d)",
590 channels
, sample_rate
);
592 if (pAacDec
->pcmParam
.nChannels
!= channels
||
593 pAacDec
->pcmParam
.nSamplingRate
!= sample_rate
) {
594 /* Change channel count and sampling rate information */
595 pAacDec
->pcmParam
.nChannels
= channels
;
596 pAacDec
->pcmParam
.nSamplingRate
= sample_rate
;
598 /* Send Port Settings changed call back */
599 (*(pExynosComponent
->pCallbacks
->EventHandler
))
601 pExynosComponent
->callbackData
,
602 OMX_EventPortSettingsChanged
, /* The command was completed */
603 OMX_DirOutput
, /* This is the port index */
608 pAacDec
->hSeirenAacHandle
.bConfiguredSeiren
= OMX_TRUE
;
610 if (pAacDec
->hSeirenAacHandle
.bSeirenSendEOS
== OMX_TRUE
) {
611 pOutputData
->dataLen
= 0;
612 pExynosComponent
->getAllDelayBuffer
= OMX_TRUE
;
613 ret
= OMX_ErrorInputDataDecodeYet
;
615 pExynosComponent
->getAllDelayBuffer
= OMX_FALSE
;
621 /* Get decoded data from Seiren */
622 ADec_RecvPCM(fd
, &output_mem_pool
);
623 if (output_mem_pool
.data_size
> 0) {
624 pOutputData
->dataLen
= output_mem_pool
.data_size
;
625 Exynos_OSAL_Memcpy(pOutputData
->multiPlaneBuffer
.dataBuffer
[AUDIO_DATA_PLANE
],
626 output_mem_pool
.virt_addr
, output_mem_pool
.data_size
);
628 pOutputData
->dataLen
= 0;
631 #ifdef Seiren_DUMP_TO_FILE
632 if (pOutputData
->dataLen
> 0)
633 fwrite(pOutputData
->multiPlaneBuffer
.dataBuffer
[AUDIO_DATA_PLANE
], pOutputData
->dataLen
, 1, outFile
);
636 /* Delay EOS signal until all the PCM is returned from the Seiren driver. */
637 if (pAacDec
->hSeirenAacHandle
.bSeirenSendEOS
== OMX_TRUE
) {
638 if (pInputData
->nFlags
& OMX_BUFFERFLAG_EOS
) {
639 returnCodec
= ADec_GetParams(fd
, ADEC_PARAM_GET_OUTPUT_STATUS
, &isSeirenStopped
);
640 if (returnCodec
!= 0)
641 Exynos_OSAL_Log(EXYNOS_LOG_ERROR
, "Fail Seiren_STOP_EOS_STATE");
642 if (isSeirenStopped
== 1) {
643 pOutputData
->nFlags
|= OMX_BUFFERFLAG_EOS
;
644 pExynosComponent
->getAllDelayBuffer
= OMX_FALSE
;
645 pAacDec
->hSeirenAacHandle
.bSeirenSendEOS
= OMX_FALSE
; /* for repeating one song */
648 pExynosComponent
->getAllDelayBuffer
= OMX_TRUE
;
649 ret
= OMX_ErrorInputDataDecodeYet
;
651 } else { /* Flush after EOS */
652 pAacDec
->hSeirenAacHandle
.bSeirenSendEOS
= OMX_FALSE
;
661 OMX_ERRORTYPE
Exynos_Seiren_AacDec_bufferProcess(OMX_COMPONENTTYPE
*pOMXComponent
, EXYNOS_OMX_DATA
*pInputData
, EXYNOS_OMX_DATA
*pOutputData
)
663 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
664 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
665 EXYNOS_OMX_BASEPORT
*pInputPort
= &pExynosComponent
->pExynosPort
[INPUT_PORT_INDEX
];
666 EXYNOS_OMX_BASEPORT
*pOutputPort
= &pExynosComponent
->pExynosPort
[OUTPUT_PORT_INDEX
];
670 if ((!CHECK_PORT_ENABLED(pInputPort
)) || (!CHECK_PORT_ENABLED(pOutputPort
)) ||
671 (!CHECK_PORT_POPULATED(pInputPort
)) || (!CHECK_PORT_POPULATED(pOutputPort
))) {
672 if (pInputData
->nFlags
& OMX_BUFFERFLAG_EOS
)
673 ret
= OMX_ErrorInputDataDecodeYet
;
679 if (OMX_FALSE
== Exynos_Check_BufferProcess_State(pExynosComponent
)) {
680 if (pInputData
->nFlags
& OMX_BUFFERFLAG_EOS
)
681 ret
= OMX_ErrorInputDataDecodeYet
;
688 ret
= Exynos_Seiren_Aac_Decode_Block(pOMXComponent
, pInputData
, pOutputData
);
690 if (ret
!= OMX_ErrorNone
) {
691 if (ret
== (OMX_ERRORTYPE
)OMX_ErrorInputDataDecodeYet
) {
692 pOutputData
->usedDataLen
= 0;
693 pOutputData
->remainDataLen
= pOutputData
->dataLen
;
695 pExynosComponent
->pCallbacks
->EventHandler((OMX_HANDLETYPE
)pOMXComponent
,
696 pExynosComponent
->callbackData
,
697 OMX_EventError
, ret
, 0, NULL
);
700 pInputData
->usedDataLen
+= pInputData
->dataLen
;
701 pInputData
->remainDataLen
= pInputData
->dataLen
- pInputData
->usedDataLen
;
702 pInputData
->dataLen
-= pInputData
->usedDataLen
;
703 pInputData
->usedDataLen
= 0;
705 pOutputData
->usedDataLen
= 0;
706 pOutputData
->remainDataLen
= pOutputData
->dataLen
;
715 OMX_ERRORTYPE
Exynos_Seiren_AacDec_flushSeiren(OMX_COMPONENTTYPE
*pOMXComponent
, SEIREN_PORTTYPE type
)
717 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
718 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
719 EXYNOS_OMX_AUDIODEC_COMPONENT
*pAudioDec
= (EXYNOS_OMX_AUDIODEC_COMPONENT
*)pExynosComponent
->hComponentHandle
;
720 EXYNOS_AAC_HANDLE
*pAacDec
= (EXYNOS_AAC_HANDLE
*)pAudioDec
->hCodecHandle
;
722 int fd
= pAacDec
->hSeirenAacHandle
.hSeirenHandle
;
723 return ADec_Flush(fd
, type
);
726 OSCL_EXPORT_REF OMX_ERRORTYPE
Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent
, OMX_STRING componentName
)
728 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
729 OMX_COMPONENTTYPE
*pOMXComponent
= NULL
;
730 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= NULL
;
731 EXYNOS_OMX_BASEPORT
*pExynosPort
= NULL
;
732 EXYNOS_OMX_AUDIODEC_COMPONENT
*pAudioDec
= NULL
;
733 EXYNOS_AAC_HANDLE
*pAacDec
= NULL
;
734 audio_mem_info_t input_mem_pool
;
735 audio_mem_info_t output_mem_pool
;
742 if ((hComponent
== NULL
) || (componentName
== NULL
)) {
743 Exynos_OSAL_Log(EXYNOS_LOG_ERROR
, "%s: parameters are null, ret: %X", __FUNCTION__
, ret
);
744 ret
= OMX_ErrorBadParameter
;
747 if (Exynos_OSAL_Strcmp(EXYNOS_OMX_COMPONENT_AAC_DEC
, componentName
) != 0) {
748 Exynos_OSAL_Log(EXYNOS_LOG_ERROR
, "%s: componentName(%s) error, ret: %X", __FUNCTION__
, componentName
, ret
);
749 ret
= OMX_ErrorBadParameter
;
753 pOMXComponent
= (OMX_COMPONENTTYPE
*)hComponent
;
754 ret
= Exynos_OMX_AudioDecodeComponentInit(pOMXComponent
);
755 if (ret
!= OMX_ErrorNone
) {
756 Exynos_OSAL_Log(EXYNOS_LOG_ERROR
, "%s: Exynos_OMX_AudioDecodeComponentInit error, ret: %X", __FUNCTION__
, ret
);
759 pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
760 pExynosComponent
->codecType
= HW_AUDIO_DEC_CODEC
;
762 pExynosComponent
->componentName
= (OMX_STRING
)Exynos_OSAL_Malloc(MAX_OMX_COMPONENT_NAME_SIZE
);
763 if (pExynosComponent
->componentName
== NULL
) {
764 Exynos_OSAL_Log(EXYNOS_LOG_ERROR
, "%s: componentName alloc error, ret: %X", __FUNCTION__
, ret
);
765 ret
= OMX_ErrorInsufficientResources
;
768 Exynos_OSAL_Memset(pExynosComponent
->componentName
, 0, MAX_OMX_COMPONENT_NAME_SIZE
);
769 Exynos_OSAL_Strcpy(pExynosComponent
->componentName
, EXYNOS_OMX_COMPONENT_AAC_DEC
);
771 pAacDec
= Exynos_OSAL_Malloc(sizeof(EXYNOS_AAC_HANDLE
));
772 if (pAacDec
== NULL
) {
773 Exynos_OSAL_Log(EXYNOS_LOG_ERROR
, "%s: EXYNOS_AAC_HANDLE alloc error, ret: %X", __FUNCTION__
, ret
);
774 ret
= OMX_ErrorInsufficientResources
;
777 Exynos_OSAL_Memset(pAacDec
, 0, sizeof(EXYNOS_AAC_HANDLE
));
778 pAudioDec
= (EXYNOS_OMX_AUDIODEC_COMPONENT
*)pExynosComponent
->hComponentHandle
;
779 pAudioDec
->hCodecHandle
= (OMX_HANDLETYPE
)pAacDec
;
781 /* Create and Init Seiren */
782 pAacDec
->hSeirenAacHandle
.bSeirenLoaded
= OMX_FALSE
;
783 fd
= ADec_Create(0, ADEC_AAC
, NULL
);
786 Exynos_OSAL_Log(EXYNOS_LOG_ERROR
, "Seiren_ADec_Create failed: %d", fd
);
787 ret
= OMX_ErrorHardware
;
790 pAacDec
->hSeirenAacHandle
.hSeirenHandle
= fd
; /* Seiren's fd */
791 pAacDec
->hSeirenAacHandle
.bSeirenLoaded
= OMX_TRUE
;
793 /* Get input buffer info from Seiren */
794 Exynos_OSAL_Memset(&pAacDec
->hSeirenAacHandle
.input_mem_pool
, 0, sizeof(audio_mem_info_t
));
795 ADec_GetIMemPoolInfo(fd
, &pAacDec
->hSeirenAacHandle
.input_mem_pool
);
796 input_mem_pool
= pAacDec
->hSeirenAacHandle
.input_mem_pool
;
798 Exynos_OSAL_Log(EXYNOS_LOG_ERROR
, "eiren_Adec_GetIMemPoolInfo : %d", input_mem_pool
.mem_size
);
800 if (input_mem_pool
.virt_addr
== NULL
) {
801 Exynos_OSAL_Log(EXYNOS_LOG_ERROR
, "Seiren_Adec_GetIMemPoolInfo failed: %d", fd
);
802 ret
= OMX_ErrorHardware
;
806 pExynosPort
= &pExynosComponent
->pExynosPort
[INPUT_PORT_INDEX
];
807 pExynosPort
->processData
.allocSize
= input_mem_pool
.mem_size
;
808 pExynosPort
->processData
.multiPlaneBuffer
.dataBuffer
[AUDIO_DATA_PLANE
] = input_mem_pool
.virt_addr
;
810 /* Get output buffer info from Seiren */
811 Exynos_OSAL_Memset(&pAacDec
->hSeirenAacHandle
.output_mem_pool
, 0, sizeof(audio_mem_info_t
));
812 ADec_GetOMemPoolInfo(fd
, &pAacDec
->hSeirenAacHandle
.output_mem_pool
);
813 output_mem_pool
= pAacDec
->hSeirenAacHandle
.output_mem_pool
;
814 if (output_mem_pool
.virt_addr
== NULL
) {
815 Exynos_OSAL_Log(EXYNOS_LOG_ERROR
, "Seiren_ADec_GetOMemPoolInfo failed: %d", fd
);
816 ret
= OMX_ErrorHardware
;
820 /* Set componentVersion */
821 pExynosComponent
->componentVersion
.s
.nVersionMajor
= VERSIONMAJOR_NUMBER
;
822 pExynosComponent
->componentVersion
.s
.nVersionMinor
= VERSIONMINOR_NUMBER
;
823 pExynosComponent
->componentVersion
.s
.nRevision
= REVISION_NUMBER
;
824 pExynosComponent
->componentVersion
.s
.nStep
= STEP_NUMBER
;
826 /* Set specVersion */
827 pExynosComponent
->specVersion
.s
.nVersionMajor
= VERSIONMAJOR_NUMBER
;
828 pExynosComponent
->specVersion
.s
.nVersionMinor
= VERSIONMINOR_NUMBER
;
829 pExynosComponent
->specVersion
.s
.nRevision
= REVISION_NUMBER
;
830 pExynosComponent
->specVersion
.s
.nStep
= STEP_NUMBER
;
833 pExynosPort
= &pExynosComponent
->pExynosPort
[INPUT_PORT_INDEX
];
834 pExynosPort
->portDefinition
.nBufferCountActual
= input_mem_pool
.block_count
;
835 pExynosPort
->portDefinition
.nBufferCountMin
= input_mem_pool
.block_count
;
836 pExynosPort
->portDefinition
.nBufferSize
= input_mem_pool
.mem_size
;
837 pExynosPort
->portDefinition
.bEnabled
= OMX_TRUE
;
838 Exynos_OSAL_Memset(pExynosPort
->portDefinition
.format
.audio
.cMIMEType
, 0, MAX_OMX_MIMETYPE_SIZE
);
839 Exynos_OSAL_Strcpy(pExynosPort
->portDefinition
.format
.audio
.cMIMEType
, "audio/aac");
840 pExynosPort
->portDefinition
.format
.audio
.pNativeRender
= 0;
841 pExynosPort
->portDefinition
.format
.audio
.bFlagErrorConcealment
= OMX_FALSE
;
842 pExynosPort
->portDefinition
.format
.audio
.eEncoding
= OMX_AUDIO_CodingAAC
;
843 pExynosPort
->portWayType
= WAY1_PORT
;
846 pExynosPort
= &pExynosComponent
->pExynosPort
[OUTPUT_PORT_INDEX
];
847 pExynosPort
->portDefinition
.nBufferCountActual
= output_mem_pool
.block_count
;
848 pExynosPort
->portDefinition
.nBufferCountMin
= output_mem_pool
.block_count
;
849 pExynosPort
->portDefinition
.nBufferSize
= output_mem_pool
.mem_size
;
850 pExynosPort
->portDefinition
.bEnabled
= OMX_TRUE
;
851 Exynos_OSAL_Memset(pExynosPort
->portDefinition
.format
.audio
.cMIMEType
, 0, MAX_OMX_MIMETYPE_SIZE
);
852 Exynos_OSAL_Strcpy(pExynosPort
->portDefinition
.format
.audio
.cMIMEType
, "audio/raw");
853 pExynosPort
->portDefinition
.format
.audio
.pNativeRender
= 0;
854 pExynosPort
->portDefinition
.format
.audio
.bFlagErrorConcealment
= OMX_FALSE
;
855 pExynosPort
->portDefinition
.format
.audio
.eEncoding
= OMX_AUDIO_CodingPCM
;
856 pExynosPort
->portWayType
= WAY1_PORT
;
858 /* Default values for Aac audio param */
859 INIT_SET_SIZE_VERSION(&pAacDec
->aacParam
, OMX_AUDIO_PARAM_AACPROFILETYPE
);
860 pAacDec
->aacParam
.nPortIndex
= INPUT_PORT_INDEX
;
861 pAacDec
->aacParam
.nChannels
= DEFAULT_AUDIO_CHANNELS_NUM
;
862 pAacDec
->aacParam
.nBitRate
= 0;
863 pAacDec
->aacParam
.nSampleRate
= DEFAULT_AUDIO_SAMPLING_FREQ
;
864 pAacDec
->aacParam
.nAudioBandWidth
= 0;
865 pAacDec
->aacParam
.eChannelMode
= OMX_AUDIO_ChannelModeStereo
;
866 pAacDec
->aacParam
.eAACProfile
= OMX_AUDIO_AACObjectNull
;
867 pAacDec
->aacParam
.eAACStreamFormat
= OMX_AUDIO_AACStreamFormatMP2ADTS
;
869 /* Default values for PCM audio param */
870 INIT_SET_SIZE_VERSION(&pAacDec
->pcmParam
, OMX_AUDIO_PARAM_PCMMODETYPE
);
871 pAacDec
->pcmParam
.nPortIndex
= OUTPUT_PORT_INDEX
;
872 pAacDec
->pcmParam
.nChannels
= DEFAULT_AUDIO_CHANNELS_NUM
;
873 pAacDec
->pcmParam
.eNumData
= OMX_NumericalDataSigned
;
874 pAacDec
->pcmParam
.eEndian
= OMX_EndianLittle
;
875 pAacDec
->pcmParam
.bInterleaved
= OMX_TRUE
;
876 pAacDec
->pcmParam
.nBitPerSample
= DEFAULT_AUDIO_BIT_PER_SAMPLE
;
877 pAacDec
->pcmParam
.nSamplingRate
= DEFAULT_AUDIO_SAMPLING_FREQ
;
878 pAacDec
->pcmParam
.ePCMMode
= OMX_AUDIO_PCMModeLinear
;
879 pAacDec
->pcmParam
.eChannelMapping
[0] = OMX_AUDIO_ChannelLF
;
880 pAacDec
->pcmParam
.eChannelMapping
[1] = OMX_AUDIO_ChannelRF
;
882 pOMXComponent
->GetParameter
= &Exynos_Seiren_AacDec_GetParameter
;
883 pOMXComponent
->SetParameter
= &Exynos_Seiren_AacDec_SetParameter
;
884 pOMXComponent
->GetConfig
= &Exynos_Seiren_AacDec_GetConfig
;
885 pOMXComponent
->SetConfig
= &Exynos_Seiren_AacDec_SetConfig
;
886 pOMXComponent
->GetExtensionIndex
= &Exynos_Seiren_AacDec_GetExtensionIndex
;
887 pOMXComponent
->ComponentRoleEnum
= &Exynos_Seiren_AacDec_ComponentRoleEnum
;
888 pOMXComponent
->ComponentDeInit
= &Exynos_OMX_ComponentDeinit
;
890 /* ToDo: Change the function name associated with a specific codec */
891 pExynosComponent
->exynos_codec_componentInit
= &Exynos_Seiren_AacDec_Init
;
892 pExynosComponent
->exynos_codec_componentTerminate
= &Exynos_Seiren_AacDec_Terminate
;
893 pAudioDec
->exynos_codec_bufferProcess
= &Exynos_Seiren_AacDec_bufferProcess
;
894 pAudioDec
->exynos_codec_flushSeiren
= &Exynos_Seiren_AacDec_flushSeiren
;
895 pAudioDec
->exynos_checkInputFrame
= NULL
;
897 pExynosComponent
->currentState
= OMX_StateLoaded
;
900 goto EXIT
; /* This function is performed successfully. */
903 pExynosPort
= &pExynosComponent
->pExynosPort
[INPUT_PORT_INDEX
];
904 pExynosPort
->processData
.multiPlaneBuffer
.dataBuffer
[AUDIO_DATA_PLANE
] = NULL
;
905 pExynosPort
->processData
.allocSize
= 0;
908 ADec_Destroy(pAacDec
->hSeirenAacHandle
.hSeirenHandle
);
910 Exynos_OSAL_Free(pAacDec
);
911 pAudioDec
->hCodecHandle
= NULL
;
913 Exynos_OSAL_Free(pExynosComponent
->componentName
);
914 pExynosComponent
->componentName
= NULL
;
916 Exynos_OMX_AudioDecodeComponentDeinit(pOMXComponent
);
923 OMX_ERRORTYPE
Exynos_OMX_ComponentDeinit(OMX_HANDLETYPE hComponent
)
925 OMX_ERRORTYPE ret
= OMX_ErrorNone
;
926 OMX_COMPONENTTYPE
*pOMXComponent
= NULL
;
927 EXYNOS_OMX_BASECOMPONENT
*pExynosComponent
= NULL
;
928 EXYNOS_AAC_HANDLE
*pAacDec
= NULL
;
929 EXYNOS_OMX_BASEPORT
*pExynosPort
= NULL
;
933 if (hComponent
== NULL
) {
934 ret
= OMX_ErrorBadParameter
;
937 pOMXComponent
= (OMX_COMPONENTTYPE
*)hComponent
;
938 pExynosComponent
= (EXYNOS_OMX_BASECOMPONENT
*)pOMXComponent
->pComponentPrivate
;
940 Exynos_OSAL_Free(pExynosComponent
->componentName
);
941 pExynosComponent
->componentName
= NULL
;
943 pAacDec
= (EXYNOS_AAC_HANDLE
*)((EXYNOS_OMX_AUDIODEC_COMPONENT
*)pExynosComponent
->hComponentHandle
)->hCodecHandle
;
944 if (pAacDec
!= NULL
) {
945 if (pAacDec
->hSeirenAacHandle
.bSeirenLoaded
== OMX_TRUE
) {
946 ADec_Destroy(pAacDec
->hSeirenAacHandle
.hSeirenHandle
);
948 Exynos_OSAL_Free(pAacDec
);
949 ((EXYNOS_OMX_AUDIODEC_COMPONENT
*)pExynosComponent
->hComponentHandle
)->hCodecHandle
= NULL
;
952 ret
= Exynos_OMX_AudioDecodeComponentDeinit(pOMXComponent
);
953 if (ret
!= OMX_ErrorNone
) {