diff options
author | Carter Hsu <carterhsu@google.com> | 2019-05-30 18:28:34 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-05-30 18:28:34 -0700 |
commit | b3ddb82f37171fa68d4172d7acd8e816cbb9d736 (patch) | |
tree | bdb71fdd3ba0ab8cb5c75cda4a76e49f7a7eefaf | |
parent | 43b3772b83df40bb49e29abbd58cc07e51e55ca3 (diff) | |
parent | aaa9496b9860c1f508342f875867897ce42a1a78 (diff) | |
download | android_hardware_qcom_audio-b3ddb82f37171fa68d4172d7acd8e816cbb9d736.tar.gz android_hardware_qcom_audio-b3ddb82f37171fa68d4172d7acd8e816cbb9d736.tar.bz2 android_hardware_qcom_audio-b3ddb82f37171fa68d4172d7acd8e816cbb9d736.zip |
audio: fix control flow
am: aaa9496b98
Change-Id: Ia89921ae7a5a2b09da3d507b3f58db1a86fe3b81
-rw-r--r-- | hal/audio_hw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c index b15bde77..417d7cdb 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -650,6 +650,8 @@ int enable_audio_route(struct audio_device *adev, ALOGV("%s: enter: usecase(%d)", __func__, usecase->id); + audio_extn_sound_trigger_update_stream_status(usecase, ST_EVENT_STREAM_BUSY); + if (usecase->type == PCM_CAPTURE) snd_device = usecase->in_snd_device; else @@ -664,7 +666,6 @@ int enable_audio_route(struct audio_device *adev, // this also appends to mixer_path platform_add_backend_name(adev->platform, mixer_path, snd_device); - audio_extn_sound_trigger_update_stream_status(usecase, ST_EVENT_STREAM_BUSY); ALOGD("%s: usecase(%d) apply and update mixer path: %s", __func__, usecase->id, mixer_path); audio_route_apply_and_update_path(adev->audio_route, mixer_path); @@ -1442,8 +1443,7 @@ struct audio_usecase *get_usecase_from_list(struct audio_device *adev, static bool force_device_switch(struct audio_usecase *usecase) { - if (usecase->stream.out == NULL) { - ALOGE("%s: stream.out is NULL", __func__); + if (usecase->type == PCM_CAPTURE || usecase->stream.out == NULL) { return false; } |