Add sound trigger control by audio policy
Audio policy:
- Added active capture indication to sound trigger service:
recognition stops if concurrent capture is not supported.
- Added generation of reserved I/O handle and session ID for
utterance capture.
Sound trigger service
- Added sound model update callback handling.
- Added service state callback
- Simplified callback shared memory allocation.
Bug: 12378680.
Change-Id: Ib0292c2733e6df90fdae480633dd9953d0016ef1
diff --git a/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp b/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp
index aa46ace..f20c070 100644
--- a/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp
+++ b/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp
@@ -496,10 +496,21 @@
audio_output_flags_t flags,
const audio_offload_info_t *offloadInfo)
{
- //FIXME: temporary to fix build with USE_LEGACY_AUDIO_POLICY
- audio_stream_type_t stream = AUDIO_STREAM_MUSIC;
+ audio_stream_type_t stream = audio_attributes_to_stream_type(attr);
+
return getOutput(stream, samplingRate, format, channelMask, flags, offloadInfo);
}
+status_t AudioPolicyService::acquireSoundTriggerSession(audio_session_t *session,
+ audio_io_handle_t *ioHandle,
+ audio_devices_t *device)
+{
+ return INVALID_OPERATION;
+}
+
+status_t AudioPolicyService::releaseSoundTriggerSession(audio_session_t session)
+{
+ return INVALID_OPERATION;
+}
}; // namespace android