summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Lee <lerobert@google.com>2023-04-11 15:58:38 +0800
committerRobert Lee <lerobert@google.com>2023-04-13 05:30:00 +0000
commit09067186e76eb3896a3fb9635c2b6d7639eabad0 (patch)
treea074e3864e059ad2e5c86c033191ad833597507a
parent22245b4237b9e50dac698172bfefd2925bbbe7e4 (diff)
downloadaoc-09067186e76eb3896a3fb9635c2b6d7639eabad0.tar.gz
Revert "GKI: Revert "alsa: compress: enable pause in draining""
This reverts commit 11ba130d1e1737aca9f2d2bdd5213c492d861d0d. Reason for revert: b/275459411 cannot pause offload music in draining Bug: 275459411 Change-Id: Icffaf99422e1c0793baf60ee69d9e9b8f99aefd5 Signed-off-by: Robert Lee <lerobert@google.com>
-rw-r--r--alsa/aoc_alsa_compr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/alsa/aoc_alsa_compr.c b/alsa/aoc_alsa_compr.c
index b26e918..d20f803 100644
--- a/alsa/aoc_alsa_compr.c
+++ b/alsa/aoc_alsa_compr.c
@@ -14,11 +14,25 @@
#include <linux/platform_device.h>
#include <linux/version.h>
+#include <trace/hooks/snd_compr.h>
+
#include "aoc_alsa.h"
#include "aoc_alsa_drv.h"
static void aoc_stop_work_handler(struct work_struct *work);
+static void vh_ep_use_pause_in_drain(void *data, bool *use_pause_in_drain, bool *leave_draining)
+{
+ *use_pause_in_drain = true;
+ *leave_draining = true;
+}
+
+static int aoc_compr_vh_snd_compr_init()
+{
+ return register_trace_android_vh_snd_compr_use_pause_in_drain(vh_ep_use_pause_in_drain,
+ NULL);
+}
+
static void aoc_compr_reset_handler(aoc_aud_service_event_t evnt, void *cookies)
{
struct aoc_alsa_stream *alsa_stream = (struct aoc_alsa_stream *)cookies;
@@ -850,6 +864,7 @@ int aoc_compr_init(void)
return err;
}
+ aoc_compr_vh_snd_compr_init();
return 0;
}