Loading hal/audio_extn/audio_extn.c +5 −2 Original line number Diff line number Diff line Loading @@ -916,8 +916,11 @@ void audio_extn_perf_lock_acquire(int *handle, int duration, int *perf_lock_opts, int size) { if (!perf_lock_opts || !size || !perf_lock_acq || !handle) return -EINVAL; if (!perf_lock_opts || !size || !perf_lock_acq || !handle) { ALOGE("%s: Incorrect params, Failed to acquire perf lock, err ", __func__); return; } /* * Acquire performance lock for 1 sec during device path bringup. * Lock will be released either after 1 sec or when perf_lock_release Loading hal/audio_hw.c +2 −2 Original line number Diff line number Diff line Loading @@ -905,7 +905,7 @@ static int read_hdmi_channel_masks(struct stream_out *out) return ret; } static audio_usecase_t get_voice_usecase_id_from_list(struct audio_device *adev) static audio_usecase_t get_voice_usecase_id_from_list(const struct audio_device *adev) { struct audio_usecase *usecase; struct listnode *node; Loading @@ -920,7 +920,7 @@ static audio_usecase_t get_voice_usecase_id_from_list(struct audio_device *adev) return USECASE_INVALID; } struct audio_usecase *get_usecase_from_list(struct audio_device *adev, struct audio_usecase *get_usecase_from_list(const struct audio_device *adev, audio_usecase_t uc_id) { struct audio_usecase *usecase; Loading hal/audio_hw.h +1 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ int enable_snd_device(struct audio_device *adev, int enable_audio_route(struct audio_device *adev, struct audio_usecase *usecase); struct audio_usecase *get_usecase_from_list(struct audio_device *adev, struct audio_usecase *get_usecase_from_list(const struct audio_device *adev, audio_usecase_t uc_id); bool is_offload_usecase(audio_usecase_t uc_id); Loading hal/msm8974/platform.c +11 −4 Original line number Diff line number Diff line Loading @@ -1036,7 +1036,7 @@ void *platform_init(struct audio_device *adev) char value[PROPERTY_VALUE_MAX]; struct platform_data *my_data = NULL; int retry_num = 0, snd_card_num = 0, key = 0; const char *snd_card_name; char *snd_card_name = NULL; char *cvd_version = NULL; my_data = calloc(1, sizeof(struct platform_data)); Loading @@ -1063,7 +1063,7 @@ void *platform_init(struct audio_device *adev) continue; } snd_card_name = mixer_get_name(adev->mixer); snd_card_name = strdup(mixer_get_name(adev->mixer)); if (!snd_card_name) { ALOGE("failed to allocate memory for snd_card_name\n"); free(my_data); Loading @@ -1089,7 +1089,10 @@ void *platform_init(struct audio_device *adev) if (!adev->audio_route) { ALOGE("%s: Failed to init audio route controls, aborting.", __func__); if (my_data) free(my_data); if (snd_card_name) free(snd_card_name); mixer_close(adev->mixer); return NULL; } Loading @@ -1104,7 +1107,11 @@ void *platform_init(struct audio_device *adev) if (snd_card_num >= MAX_SND_CARD) { ALOGE("%s: Unable to find correct sound card, aborting.", __func__); if (my_data) free(my_data); if (snd_card_name) free(snd_card_name); mixer_close(adev->mixer); return NULL; } Loading hal/voice.c +3 −3 Original line number Diff line number Diff line /* * Copyright (c) 2013-2014, 2016, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. * Not a contribution. * * Copyright (C) 2013 The Android Open Source Project Loading Loading @@ -274,12 +274,12 @@ bool voice_is_call_state_active(struct audio_device *adev) return call_state; } bool voice_is_in_call(struct audio_device *adev) bool voice_is_in_call(const struct audio_device *adev) { return adev->voice.in_call; } bool voice_is_in_call_rec_stream(struct stream_in *in) bool voice_is_in_call_rec_stream(const struct stream_in *in) { bool in_call_rec = false; Loading Loading
hal/audio_extn/audio_extn.c +5 −2 Original line number Diff line number Diff line Loading @@ -916,8 +916,11 @@ void audio_extn_perf_lock_acquire(int *handle, int duration, int *perf_lock_opts, int size) { if (!perf_lock_opts || !size || !perf_lock_acq || !handle) return -EINVAL; if (!perf_lock_opts || !size || !perf_lock_acq || !handle) { ALOGE("%s: Incorrect params, Failed to acquire perf lock, err ", __func__); return; } /* * Acquire performance lock for 1 sec during device path bringup. * Lock will be released either after 1 sec or when perf_lock_release Loading
hal/audio_hw.c +2 −2 Original line number Diff line number Diff line Loading @@ -905,7 +905,7 @@ static int read_hdmi_channel_masks(struct stream_out *out) return ret; } static audio_usecase_t get_voice_usecase_id_from_list(struct audio_device *adev) static audio_usecase_t get_voice_usecase_id_from_list(const struct audio_device *adev) { struct audio_usecase *usecase; struct listnode *node; Loading @@ -920,7 +920,7 @@ static audio_usecase_t get_voice_usecase_id_from_list(struct audio_device *adev) return USECASE_INVALID; } struct audio_usecase *get_usecase_from_list(struct audio_device *adev, struct audio_usecase *get_usecase_from_list(const struct audio_device *adev, audio_usecase_t uc_id) { struct audio_usecase *usecase; Loading
hal/audio_hw.h +1 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ int enable_snd_device(struct audio_device *adev, int enable_audio_route(struct audio_device *adev, struct audio_usecase *usecase); struct audio_usecase *get_usecase_from_list(struct audio_device *adev, struct audio_usecase *get_usecase_from_list(const struct audio_device *adev, audio_usecase_t uc_id); bool is_offload_usecase(audio_usecase_t uc_id); Loading
hal/msm8974/platform.c +11 −4 Original line number Diff line number Diff line Loading @@ -1036,7 +1036,7 @@ void *platform_init(struct audio_device *adev) char value[PROPERTY_VALUE_MAX]; struct platform_data *my_data = NULL; int retry_num = 0, snd_card_num = 0, key = 0; const char *snd_card_name; char *snd_card_name = NULL; char *cvd_version = NULL; my_data = calloc(1, sizeof(struct platform_data)); Loading @@ -1063,7 +1063,7 @@ void *platform_init(struct audio_device *adev) continue; } snd_card_name = mixer_get_name(adev->mixer); snd_card_name = strdup(mixer_get_name(adev->mixer)); if (!snd_card_name) { ALOGE("failed to allocate memory for snd_card_name\n"); free(my_data); Loading @@ -1089,7 +1089,10 @@ void *platform_init(struct audio_device *adev) if (!adev->audio_route) { ALOGE("%s: Failed to init audio route controls, aborting.", __func__); if (my_data) free(my_data); if (snd_card_name) free(snd_card_name); mixer_close(adev->mixer); return NULL; } Loading @@ -1104,7 +1107,11 @@ void *platform_init(struct audio_device *adev) if (snd_card_num >= MAX_SND_CARD) { ALOGE("%s: Unable to find correct sound card, aborting.", __func__); if (my_data) free(my_data); if (snd_card_name) free(snd_card_name); mixer_close(adev->mixer); return NULL; } Loading
hal/voice.c +3 −3 Original line number Diff line number Diff line /* * Copyright (c) 2013-2014, 2016, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. * Not a contribution. * * Copyright (C) 2013 The Android Open Source Project Loading Loading @@ -274,12 +274,12 @@ bool voice_is_call_state_active(struct audio_device *adev) return call_state; } bool voice_is_in_call(struct audio_device *adev) bool voice_is_in_call(const struct audio_device *adev) { return adev->voice.in_call; } bool voice_is_in_call_rec_stream(struct stream_in *in) bool voice_is_in_call_rec_stream(const struct stream_in *in) { bool in_call_rec = false; Loading