Loading hal/audio_extn/dolby.c +13 −7 Original line number Original line Diff line number Diff line Loading @@ -633,7 +633,9 @@ static struct ds2_extn_module ds2extnmod = { }; }; int audio_extn_dap_hal_init(int snd_card) { int audio_extn_dap_hal_init(int snd_card) { int ret = -EINVAL; char c_dmid[128] = {0}; void *handle = NULL; int i_dmid, ret = -EINVAL; dap_hal_device_be_id_map_t device_be_id_map; dap_hal_device_be_id_map_t device_be_id_map; ALOGV("%s: opening DAP HAL lib\n", __func__); ALOGV("%s: opening DAP HAL lib\n", __func__); Loading @@ -652,7 +654,7 @@ int audio_extn_dap_hal_init(int snd_card) { ds2extnmod.dap_hal_set_hw_info(SND_CARD, (void*)(&snd_card)); ds2extnmod.dap_hal_set_hw_info(SND_CARD, (void*)(&snd_card)); ALOGV("%s Sound card number is:%d",__func__,snd_card); ALOGV("%s Sound card number is:%d",__func__,snd_card); platform_get_device_to_be_id_map((int**)&device_be_id_map.device_id_to_be_id, &device_be_id_map.len); platform_get_device_to_be_id_map(&device_be_id_map.device_id_to_be_id, &device_be_id_map.len); ds2extnmod.dap_hal_set_hw_info(DEVICE_BE_ID_MAP, (void*)(&device_be_id_map)); ds2extnmod.dap_hal_set_hw_info(DEVICE_BE_ID_MAP, (void*)(&device_be_id_map)); ALOGV("%s Set be id map len:%d",__func__,device_be_id_map.len); ALOGV("%s Set be id map len:%d",__func__,device_be_id_map.len); ret = 0; ret = 0; Loading @@ -678,7 +680,9 @@ int audio_extn_dap_hal_deinit() { void audio_extn_dolby_ds2_set_endpoint(struct audio_device *adev) { void audio_extn_dolby_ds2_set_endpoint(struct audio_device *adev) { struct listnode *node; struct listnode *node; struct audio_usecase *usecase; struct audio_usecase *usecase; int endpoint = 0; struct mixer_ctl *ctl; const char *mixer_ctl_name = "DS1 DAP Endpoint"; int endpoint = 0, ret; bool send = false; bool send = false; list_for_each(node, &adev->usecase_list) { list_for_each(node, &adev->usecase_list) { Loading Loading @@ -731,7 +735,7 @@ int audio_extn_ds2_enable(struct audio_device *adev) { return 0; return 0; } } int audio_extn_dolby_set_dap_bypass(struct audio_device *adev __unused, int state) { int audio_extn_dolby_set_dap_bypass(struct audio_device *adev, int state) { ALOGV("%s: state %d", __func__, state); ALOGV("%s: state %d", __func__, state); if (ds2extnmod.dap_hal_set_hw_info) { if (ds2extnmod.dap_hal_set_hw_info) { Loading @@ -743,12 +747,12 @@ int audio_extn_dolby_set_dap_bypass(struct audio_device *adev __unused, int stat return 0; return 0; } } void audio_extn_dolby_set_license(struct audio_device *adev __unused) void audio_extn_dolby_set_license(struct audio_device *adev) { { int i_key; int i_key; char c_key[128] = {0}; char c_key[128] = {0}; char c_dmid[128] = {0}; char c_dmid[128] = {0}; int i_dmid; int i_dmid, ret = -EINVAL; struct dolby_param_license dolby_license; struct dolby_param_license dolby_license; #ifdef DOLBY_ACDB_LICENSE #ifdef DOLBY_ACDB_LICENSE Loading @@ -767,14 +771,16 @@ void audio_extn_dolby_set_license(struct audio_device *adev __unused) ds2extnmod.dap_hal_set_hw_info(DMID, (void*)(&dolby_license.dmid)); ds2extnmod.dap_hal_set_hw_info(DMID, (void*)(&dolby_license.dmid)); } else { } else { ALOGV("%s: dap_hal_set_hw_info is NULL", __func__); ALOGV("%s: dap_hal_set_hw_info is NULL", __func__); return ret; } } return 0; } } void audio_extn_ds2_set_parameters(struct audio_device *adev, void audio_extn_ds2_set_parameters(struct audio_device *adev, struct str_parms *parms) struct str_parms *parms) { { int ret; int val, ret; char value[32]={0}; char value[32]={0}; ret = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_SND_CARD_STATUS, value, ret = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_SND_CARD_STATUS, value, Loading Loading
hal/audio_extn/dolby.c +13 −7 Original line number Original line Diff line number Diff line Loading @@ -633,7 +633,9 @@ static struct ds2_extn_module ds2extnmod = { }; }; int audio_extn_dap_hal_init(int snd_card) { int audio_extn_dap_hal_init(int snd_card) { int ret = -EINVAL; char c_dmid[128] = {0}; void *handle = NULL; int i_dmid, ret = -EINVAL; dap_hal_device_be_id_map_t device_be_id_map; dap_hal_device_be_id_map_t device_be_id_map; ALOGV("%s: opening DAP HAL lib\n", __func__); ALOGV("%s: opening DAP HAL lib\n", __func__); Loading @@ -652,7 +654,7 @@ int audio_extn_dap_hal_init(int snd_card) { ds2extnmod.dap_hal_set_hw_info(SND_CARD, (void*)(&snd_card)); ds2extnmod.dap_hal_set_hw_info(SND_CARD, (void*)(&snd_card)); ALOGV("%s Sound card number is:%d",__func__,snd_card); ALOGV("%s Sound card number is:%d",__func__,snd_card); platform_get_device_to_be_id_map((int**)&device_be_id_map.device_id_to_be_id, &device_be_id_map.len); platform_get_device_to_be_id_map(&device_be_id_map.device_id_to_be_id, &device_be_id_map.len); ds2extnmod.dap_hal_set_hw_info(DEVICE_BE_ID_MAP, (void*)(&device_be_id_map)); ds2extnmod.dap_hal_set_hw_info(DEVICE_BE_ID_MAP, (void*)(&device_be_id_map)); ALOGV("%s Set be id map len:%d",__func__,device_be_id_map.len); ALOGV("%s Set be id map len:%d",__func__,device_be_id_map.len); ret = 0; ret = 0; Loading @@ -678,7 +680,9 @@ int audio_extn_dap_hal_deinit() { void audio_extn_dolby_ds2_set_endpoint(struct audio_device *adev) { void audio_extn_dolby_ds2_set_endpoint(struct audio_device *adev) { struct listnode *node; struct listnode *node; struct audio_usecase *usecase; struct audio_usecase *usecase; int endpoint = 0; struct mixer_ctl *ctl; const char *mixer_ctl_name = "DS1 DAP Endpoint"; int endpoint = 0, ret; bool send = false; bool send = false; list_for_each(node, &adev->usecase_list) { list_for_each(node, &adev->usecase_list) { Loading Loading @@ -731,7 +735,7 @@ int audio_extn_ds2_enable(struct audio_device *adev) { return 0; return 0; } } int audio_extn_dolby_set_dap_bypass(struct audio_device *adev __unused, int state) { int audio_extn_dolby_set_dap_bypass(struct audio_device *adev, int state) { ALOGV("%s: state %d", __func__, state); ALOGV("%s: state %d", __func__, state); if (ds2extnmod.dap_hal_set_hw_info) { if (ds2extnmod.dap_hal_set_hw_info) { Loading @@ -743,12 +747,12 @@ int audio_extn_dolby_set_dap_bypass(struct audio_device *adev __unused, int stat return 0; return 0; } } void audio_extn_dolby_set_license(struct audio_device *adev __unused) void audio_extn_dolby_set_license(struct audio_device *adev) { { int i_key; int i_key; char c_key[128] = {0}; char c_key[128] = {0}; char c_dmid[128] = {0}; char c_dmid[128] = {0}; int i_dmid; int i_dmid, ret = -EINVAL; struct dolby_param_license dolby_license; struct dolby_param_license dolby_license; #ifdef DOLBY_ACDB_LICENSE #ifdef DOLBY_ACDB_LICENSE Loading @@ -767,14 +771,16 @@ void audio_extn_dolby_set_license(struct audio_device *adev __unused) ds2extnmod.dap_hal_set_hw_info(DMID, (void*)(&dolby_license.dmid)); ds2extnmod.dap_hal_set_hw_info(DMID, (void*)(&dolby_license.dmid)); } else { } else { ALOGV("%s: dap_hal_set_hw_info is NULL", __func__); ALOGV("%s: dap_hal_set_hw_info is NULL", __func__); return ret; } } return 0; } } void audio_extn_ds2_set_parameters(struct audio_device *adev, void audio_extn_ds2_set_parameters(struct audio_device *adev, struct str_parms *parms) struct str_parms *parms) { { int ret; int val, ret; char value[32]={0}; char value[32]={0}; ret = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_SND_CARD_STATUS, value, ret = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_SND_CARD_STATUS, value, Loading