diff options
author | Mikhail Naganov <mnaganov@google.com> | 2020-10-19 21:27:14 +0000 |
---|---|---|
committer | Mikhail Naganov <mnaganov@google.com> | 2020-12-09 23:36:48 +0000 |
commit | 2287a249a696c707c5f54d10706b3417d5d23f05 (patch) | |
tree | 837bfbdfcb8b92584fd32113ee2e59798a858684 /audio/core/all-versions/default/StreamOut.cpp | |
parent | 8523de7588208ab10c605c7d783885c5b0c56fc7 (diff) |
Make audio*-base.h files autogenerated again
Major change: audio-base.h is generated from "core" types.hal,
new file audio_common-base.h is generated from "common" types.hal.
In order to be able to add system-only constants to generated
enums, the latter are made anonymous, values got "HAL_" prefix.
Then in system/audio.h a full enum is constructed.
Removed audio_drain_type_t from exported, as it belongs to
libhardware only.
Added missing enums that were introduced at the system side
only in Android R.
Bug: 122858783
Test: m
Change-Id: I8c017912395a03beacea077fd562fae2329ad975
Merged-In: I8c017912395a03beacea077fd562fae2329ad975
Diffstat (limited to 'audio/core/all-versions/default/StreamOut.cpp')
-rw-r--r-- | audio/core/all-versions/default/StreamOut.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/audio/core/all-versions/default/StreamOut.cpp b/audio/core/all-versions/default/StreamOut.cpp index 1519c48e12..007eb4564a 100644 --- a/audio/core/all-versions/default/StreamOut.cpp +++ b/audio/core/all-versions/default/StreamOut.cpp @@ -496,11 +496,11 @@ Return<bool> StreamOut::supportsDrain() { } Return<Result> StreamOut::drain(AudioDrain type) { + audio_drain_type_t halDrainType = + type == AudioDrain::EARLY_NOTIFY ? AUDIO_DRAIN_EARLY_NOTIFY : AUDIO_DRAIN_ALL; return mStream->drain != NULL - ? Stream::analyzeStatus( - "drain", - mStream->drain(mStream, static_cast<audio_drain_type_t>(type)), - {ENOSYS} /*ignore*/) + ? Stream::analyzeStatus("drain", mStream->drain(mStream, halDrainType), + {ENOSYS} /*ignore*/) : Result::NOT_SUPPORTED; } |