Add audio_input_flags_t to IAudioFlinger::openInput
For backward compatibility, until flags are correctly calculated,
we will assume that the request is for a low latency input stream.
Change-Id: I76746834e870df00833dc77cbdaa2edd2ffeec95
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 5fd7ce8..1ad6285 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1820,7 +1820,8 @@
audio_devices_t *pDevices,
uint32_t *pSamplingRate,
audio_format_t *pFormat,
- audio_channel_mask_t *pChannelMask)
+ audio_channel_mask_t *pChannelMask,
+ audio_input_flags_t flags)
{
struct audio_config config;
memset(&config, 0, sizeof(config));
@@ -1847,15 +1848,15 @@
audio_io_handle_t id = nextUniqueId();
audio_stream_in_t *inStream = NULL;
- audio_input_flags_t flags = AUDIO_INPUT_FLAG_FAST; // FIXME until added to openInput()
status_t status = inHwHal->open_input_stream(inHwHal, id, *pDevices, &config,
&inStream, flags);
ALOGV("openInput() openInputStream returned input %p, SamplingRate %d, Format %#x, Channels %x, "
- "status %d",
+ "flags %#x, status %d",
inStream,
config.sample_rate,
config.format,
config.channel_mask,
+ flags,
status);
// If the input could not be opened with the requested parameters and we can handle the
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index be19554..bae18fd 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -179,7 +179,8 @@
audio_devices_t *pDevices,
uint32_t *pSamplingRate,
audio_format_t *pFormat,
- audio_channel_mask_t *pChannelMask);
+ audio_channel_mask_t *pChannelMask,
+ audio_input_flags_t flags);
virtual status_t closeInput(audio_io_handle_t input);