hal: ip_hdlr intf for MAT decoder
- ip-handler interface audio extension module changes to handle MAT decoder security mechanism. - ip-handler deinit after lib de-allocated. Change-Id: I050dce82ce57597b9bf135a81516f6401abd2315
This commit is contained in:
parent
3ca34ba844
commit
cfec66baf4
|
@ -212,10 +212,12 @@ int audio_extn_ip_hdlr_copp_update_cal_info(void *cfg, void *data)
|
|||
return ret;
|
||||
|
||||
}
|
||||
|
||||
bool audio_extn_ip_hdlr_intf_supported_for_copp(void *platform)
|
||||
{
|
||||
return adm_event_enable;
|
||||
}
|
||||
|
||||
bool audio_extn_ip_hdlr_intf_supported(audio_format_t format,
|
||||
bool is_direct_passthrough,
|
||||
bool is_transcode_loopback)
|
||||
|
@ -224,6 +226,9 @@ bool audio_extn_ip_hdlr_intf_supported(audio_format_t format,
|
|||
if ((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_DOLBY_TRUEHD) {
|
||||
asm_event_enable = true;
|
||||
return true;
|
||||
} else if ((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_MAT) {
|
||||
asm_event_enable = true;
|
||||
return true;
|
||||
} else if (!is_direct_passthrough && !audio_extn_qaf_is_enabled() &&
|
||||
(((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_E_AC3) ||
|
||||
((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_AC3))) {
|
||||
|
@ -238,7 +243,6 @@ bool audio_extn_ip_hdlr_intf_supported(audio_format_t format,
|
|||
asm_event_enable = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
int audio_extn_ip_hdlr_intf_event_adm(void *stream_handle __unused,
|
||||
void *payload, void *ip_hdlr_handle )
|
||||
|
@ -887,9 +891,6 @@ int audio_extn_ip_hdlr_intf_deinit(void *handle)
|
|||
return -EINVAL;
|
||||
}
|
||||
ALOGD("%s:[%d] handle = %p",__func__, ip_hdlr->ref_cnt, handle);
|
||||
ret = ip_hdlr->deinit(handle);
|
||||
if (ret < 0)
|
||||
ALOGE("%s:[%d] deinit failed ret = %d", __func__, ip_hdlr->ref_cnt, ret);
|
||||
|
||||
if (--ip_hdlr->ref_cnt == 0) {
|
||||
ip_hdlr->get_lib_fd(handle, &lib_fd.fd);
|
||||
|
@ -917,8 +918,11 @@ int audio_extn_ip_hdlr_intf_deinit(void *handle)
|
|||
goto dlclose;
|
||||
}
|
||||
|
||||
ret = ip_hdlr->deinit_lib(ip_hdlr->ip_lib_handle);
|
||||
ret = ip_hdlr->deinit_lib(handle);
|
||||
ip_hdlr->lib_fd_created = false;
|
||||
ret = ip_hdlr->deinit(handle);
|
||||
if (ret < 0)
|
||||
ALOGE("%s:[%d] deinit failed ret = %d", __func__, ip_hdlr->ref_cnt, ret);
|
||||
if (ip_hdlr->lib_hdl)
|
||||
dlclose(ip_hdlr->lib_hdl);
|
||||
dlclose:
|
||||
|
|
Loading…
Reference in New Issue