Loading hal/audio_hw.c +12 −28 Original line number Diff line number Diff line Loading @@ -216,7 +216,7 @@ static int get_snd_codec_id(audio_format_t format) int enable_audio_route(struct audio_device *adev, struct audio_usecase *usecase, bool update_mixer) bool __unused update_mixer) { snd_device_t snd_device; char mixer_path[MIXER_PATH_MAX_LENGTH]; Loading @@ -237,18 +237,15 @@ int enable_audio_route(struct audio_device *adev, #endif strcpy(mixer_path, use_case_table[usecase->id]); platform_add_backend_name(mixer_path, snd_device); ALOGV("%s: apply mixer path: %s", __func__, mixer_path); audio_route_apply_path(adev->audio_route, mixer_path); if (update_mixer) audio_route_update_mixer(adev->audio_route); ALOGV("%s: apply mixer and update path: %s", __func__, mixer_path); audio_route_apply_and_update_path(adev->audio_route, mixer_path); ALOGV("%s: exit", __func__); return 0; } int disable_audio_route(struct audio_device *adev, struct audio_usecase *usecase, bool update_mixer) bool __unused update_mixer) { snd_device_t snd_device; char mixer_path[MIXER_PATH_MAX_LENGTH]; Loading @@ -263,18 +260,15 @@ int disable_audio_route(struct audio_device *adev, snd_device = usecase->out_snd_device; strcpy(mixer_path, use_case_table[usecase->id]); platform_add_backend_name(mixer_path, snd_device); ALOGV("%s: reset mixer path: %s", __func__, mixer_path); audio_route_reset_path(adev->audio_route, mixer_path); if (update_mixer) audio_route_update_mixer(adev->audio_route); ALOGV("%s: reset and update mixer path: %s", __func__, mixer_path); audio_route_reset_and_update_path(adev->audio_route, mixer_path); ALOGV("%s: exit", __func__); return 0; } int enable_snd_device(struct audio_device *adev, snd_device_t snd_device, bool update_mixer) bool __unused update_mixer) { char device_name[DEVICE_NAME_MAX_SIZE] = {0}; Loading Loading @@ -321,17 +315,14 @@ int enable_snd_device(struct audio_device *adev, audio_extn_listen_update_status(snd_device, LISTEN_EVENT_SND_DEVICE_BUSY); audio_route_apply_path(adev->audio_route, device_name); audio_route_apply_and_update_path(adev->audio_route, device_name); } if (update_mixer) audio_route_update_mixer(adev->audio_route); return 0; } int disable_snd_device(struct audio_device *adev, snd_device_t snd_device, bool update_mixer) bool __unused update_mixer) { char device_name[DEVICE_NAME_MAX_SIZE] = {0}; Loading Loading @@ -368,10 +359,7 @@ int disable_snd_device(struct audio_device *adev, audio_extn_spkr_prot_is_enabled()) { audio_extn_spkr_prot_stop_processing(); } else audio_route_reset_path(adev->audio_route, device_name); if (update_mixer) audio_route_update_mixer(adev->audio_route); audio_route_reset_and_update_path(adev->audio_route, device_name); audio_extn_listen_update_status(snd_device, LISTEN_EVENT_SND_DEVICE_FREE); Loading Loading @@ -420,8 +408,7 @@ static void check_usecases_codec_backend(struct audio_device *adev, } if (num_uc_to_switch) { /* Make sure all the streams are de-routed before disabling the device */ audio_route_update_mixer(adev->audio_route); /* All streams have been de-routed. Disable the device */ list_for_each(node, &adev->usecase_list) { usecase = node_to_item(node, struct audio_usecase, list); Loading Loading @@ -490,8 +477,7 @@ static void check_and_route_capture_usecases(struct audio_device *adev, } if (num_uc_to_switch) { /* Make sure all the streams are de-routed before disabling the device */ audio_route_update_mixer(adev->audio_route); /* All streams have been de-routed. Disable the device */ list_for_each(node, &adev->usecase_list) { usecase = node_to_item(node, struct audio_usecase, list); Loading Loading @@ -716,8 +702,6 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id) out_snd_device, in_snd_device); audio_route_update_mixer(adev->audio_route); usecase->in_snd_device = in_snd_device; usecase->out_snd_device = out_snd_device; Loading Loading
hal/audio_hw.c +12 −28 Original line number Diff line number Diff line Loading @@ -216,7 +216,7 @@ static int get_snd_codec_id(audio_format_t format) int enable_audio_route(struct audio_device *adev, struct audio_usecase *usecase, bool update_mixer) bool __unused update_mixer) { snd_device_t snd_device; char mixer_path[MIXER_PATH_MAX_LENGTH]; Loading @@ -237,18 +237,15 @@ int enable_audio_route(struct audio_device *adev, #endif strcpy(mixer_path, use_case_table[usecase->id]); platform_add_backend_name(mixer_path, snd_device); ALOGV("%s: apply mixer path: %s", __func__, mixer_path); audio_route_apply_path(adev->audio_route, mixer_path); if (update_mixer) audio_route_update_mixer(adev->audio_route); ALOGV("%s: apply mixer and update path: %s", __func__, mixer_path); audio_route_apply_and_update_path(adev->audio_route, mixer_path); ALOGV("%s: exit", __func__); return 0; } int disable_audio_route(struct audio_device *adev, struct audio_usecase *usecase, bool update_mixer) bool __unused update_mixer) { snd_device_t snd_device; char mixer_path[MIXER_PATH_MAX_LENGTH]; Loading @@ -263,18 +260,15 @@ int disable_audio_route(struct audio_device *adev, snd_device = usecase->out_snd_device; strcpy(mixer_path, use_case_table[usecase->id]); platform_add_backend_name(mixer_path, snd_device); ALOGV("%s: reset mixer path: %s", __func__, mixer_path); audio_route_reset_path(adev->audio_route, mixer_path); if (update_mixer) audio_route_update_mixer(adev->audio_route); ALOGV("%s: reset and update mixer path: %s", __func__, mixer_path); audio_route_reset_and_update_path(adev->audio_route, mixer_path); ALOGV("%s: exit", __func__); return 0; } int enable_snd_device(struct audio_device *adev, snd_device_t snd_device, bool update_mixer) bool __unused update_mixer) { char device_name[DEVICE_NAME_MAX_SIZE] = {0}; Loading Loading @@ -321,17 +315,14 @@ int enable_snd_device(struct audio_device *adev, audio_extn_listen_update_status(snd_device, LISTEN_EVENT_SND_DEVICE_BUSY); audio_route_apply_path(adev->audio_route, device_name); audio_route_apply_and_update_path(adev->audio_route, device_name); } if (update_mixer) audio_route_update_mixer(adev->audio_route); return 0; } int disable_snd_device(struct audio_device *adev, snd_device_t snd_device, bool update_mixer) bool __unused update_mixer) { char device_name[DEVICE_NAME_MAX_SIZE] = {0}; Loading Loading @@ -368,10 +359,7 @@ int disable_snd_device(struct audio_device *adev, audio_extn_spkr_prot_is_enabled()) { audio_extn_spkr_prot_stop_processing(); } else audio_route_reset_path(adev->audio_route, device_name); if (update_mixer) audio_route_update_mixer(adev->audio_route); audio_route_reset_and_update_path(adev->audio_route, device_name); audio_extn_listen_update_status(snd_device, LISTEN_EVENT_SND_DEVICE_FREE); Loading Loading @@ -420,8 +408,7 @@ static void check_usecases_codec_backend(struct audio_device *adev, } if (num_uc_to_switch) { /* Make sure all the streams are de-routed before disabling the device */ audio_route_update_mixer(adev->audio_route); /* All streams have been de-routed. Disable the device */ list_for_each(node, &adev->usecase_list) { usecase = node_to_item(node, struct audio_usecase, list); Loading Loading @@ -490,8 +477,7 @@ static void check_and_route_capture_usecases(struct audio_device *adev, } if (num_uc_to_switch) { /* Make sure all the streams are de-routed before disabling the device */ audio_route_update_mixer(adev->audio_route); /* All streams have been de-routed. Disable the device */ list_for_each(node, &adev->usecase_list) { usecase = node_to_item(node, struct audio_usecase, list); Loading Loading @@ -716,8 +702,6 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id) out_snd_device, in_snd_device); audio_route_update_mixer(adev->audio_route); usecase->in_snd_device = in_snd_device; usecase->out_snd_device = out_snd_device; Loading