diff options
author | Kiran Kandi <kkandi@codeaurora.org> | 2013-10-17 11:14:49 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-12 05:42:02 +0100 |
commit | 8ab5ff0b3709976cde09362e7444d78d0a981dd3 (patch) | |
tree | b4e6cb919f78b4b0b54877917a5237ab9f643c8e /media/mediaserver | |
parent | 6e70871973dbd184af867a942b972e10e5d6073d (diff) | |
download | frameworks_av-8ab5ff0b3709976cde09362e7444d78d0a981dd3.zip frameworks_av-8ab5ff0b3709976cde09362e7444d78d0a981dd3.tar.gz frameworks_av-8ab5ff0b3709976cde09362e7444d78d0a981dd3.tar.bz2 |
mediaserver: conditionally launch ListenService
Conditionally instantiate ListenService from MediaService.
ListenServiceruns as a singleton in its own thread that calls
AudioHAL which in turn accesses Listen Driver. It is the entry
point from Application processes that want so execute Listen
commands and receive Voice detection events. It manages Listen
application resources and global states across all Listen
applications.
ListenService is similar to AudioFlinger. That is why it is
instantiated from MediaServer. Listenservice talks to AudioHAL
to deal with concurrent usage of mic.
Change-Id: I71c346bb16e0ed3a7aae9c908e03c7f1c694fe0a
Diffstat (limited to 'media/mediaserver')
-rw-r--r-- | media/mediaserver/Android.mk | 6 | ||||
-rw-r--r-- | media/mediaserver/main_mediaserver.cpp | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/media/mediaserver/Android.mk b/media/mediaserver/Android.mk index 8aeabf0..33766b5 100644 --- a/media/mediaserver/Android.mk +++ b/media/mediaserver/Android.mk @@ -54,6 +54,12 @@ ifneq ($(BOARD_NUMBER_OF_CAMERAS),) LOCAL_CFLAGS += -DMAX_CAMERAS=$(BOARD_NUMBER_OF_CAMERAS) endif +ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true) + LOCAL_SHARED_LIBRARIES += liblisten + LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/audio-listen + LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED +endif + LOCAL_MODULE:= mediaserver LOCAL_32_BIT_ONLY := true diff --git a/media/mediaserver/main_mediaserver.cpp b/media/mediaserver/main_mediaserver.cpp index 4a485ed..c16e646 100644 --- a/media/mediaserver/main_mediaserver.cpp +++ b/media/mediaserver/main_mediaserver.cpp @@ -39,6 +39,10 @@ #include "SoundTriggerHwService.h" #include "RadioService.h" +#ifdef AUDIO_LISTEN_ENABLED +#include "ListenService.h" +#endif + using namespace android; int main(int argc __unused, char** argv) @@ -133,6 +137,10 @@ int main(int argc __unused, char** argv) MediaPlayerService::instantiate(); ResourceManagerService::instantiate(); CameraService::instantiate(); +#ifdef AUDIO_LISTEN_ENABLED + ALOGI("ListenService instantiated"); + ListenService::instantiate(); +#endif AudioPolicyService::instantiate(); SoundTriggerHwService::instantiate(); RadioService::instantiate(); |