From ee5c40c6bcf1ccf87e82abcfb8d1eb52e1acf29c Mon Sep 17 00:00:00 2001 From: Sujin Panicker Date: Fri, 29 Mar 2019 13:04:37 +0530 Subject: [PATCH] visualizer:Handle pcmopen error for WFD+visualizer WFD and offload visualizer effect both use same proxy capture device resulting in pcm_open failure when offload playback with visualizer effect is enabled on WFD device.This is handled by APM to fallback to deep-buffer so that software visualizer effect is enabled. This change ensures to avoid pcm_open until APM invalidates offload track, that is, changing the visualizer effect state transition. CRs-Fixed: 2310784 Change-Id: I13ccf1051d10b67898a35d7a8a855c9b1f6c1e58 --- visualizer/offload_visualizer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/visualizer/offload_visualizer.c b/visualizer/offload_visualizer.c index 678b73a1..7f4be044 100644 --- a/visualizer/offload_visualizer.c +++ b/visualizer/offload_visualizer.c @@ -401,6 +401,7 @@ void *capture_thread_loop(void *arg) pcm_close(pcm); pcm = NULL; configure_proxy_capture(mixer, 0); + pthread_cond_wait(&cond, &lock); } else { capture_enabled = true; ALOGD("%s: capture ENABLED", __func__);