audio policy: add hw hotword flag for inputs
Audio input profiles can indicate flag AUDIO_INPUT_FLAG_HW_HOTWORD
meaning they allow capture from the same source as HW hotword
detection.
When a client requests capture with this flag, the policy will
try to find an input profile matching this request first and
fallback to a regular input if not found.
Bug: 17575019.
Change-Id: Ia463211597d7fa363527d776389f2257f0ced9a2
diff --git a/services/audiopolicy/AudioPolicyManager.h b/services/audiopolicy/AudioPolicyManager.h
index da0d95d..0ea7b97 100644
--- a/services/audiopolicy/AudioPolicyManager.h
+++ b/services/audiopolicy/AudioPolicyManager.h
@@ -283,8 +283,8 @@
Vector <audio_format_t> mFormats; // supported audio formats
Vector < sp<AudioGain> > mGains; // gain controllers
sp<HwModule> mModule; // audio HW module exposing this I/O stream
- audio_output_flags_t mFlags; // attribute flags (e.g primary output,
- // direct output...). For outputs only.
+ uint32_t mFlags; // attribute flags (e.g primary output,
+ // direct output...).
};
class AudioPortConfig: public virtual RefBase
@@ -387,7 +387,7 @@
uint32_t *updatedSamplingRate,
audio_format_t format,
audio_channel_mask_t channelMask,
- audio_output_flags_t flags) const;
+ uint32_t flags) const;
void dump(int fd);
void log();
@@ -754,7 +754,8 @@
size_t size,
uint32_t value);
static bool stringToBool(const char *value);
- static audio_output_flags_t parseFlagNames(char *name);
+ static uint32_t parseOutputFlagNames(char *name);
+ static uint32_t parseInputFlagNames(char *name);
static audio_devices_t parseDeviceNames(char *name);
void loadHwModule(cnode *root);
void loadHwModules(cnode *root);