summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-05-08 18:24:06 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-08 18:24:06 +0000
commit9c599afbc0fffdb98a5c80f0dbe39cc56b29971e (patch)
tree4448bf6c837f2c1ae43ea4d265b481b21d50ce9a /audio
parent5eabea5585ec32196e305ada279317c78fc924c3 (diff)
parent62038fc4c5c596f04a87388bb42bdef13d359c39 (diff)
downloadhardware_libhardware_legacy-9c599afbc0fffdb98a5c80f0dbe39cc56b29971e.zip
hardware_libhardware_legacy-9c599afbc0fffdb98a5c80f0dbe39cc56b29971e.tar.gz
hardware_libhardware_legacy-9c599afbc0fffdb98a5c80f0dbe39cc56b29971e.tar.bz2
am 62038fc4: am 2c388a44: am 8eb3354a: Merge "Audio: add an openOutputStreamWithFlags API"
* commit '62038fc4c5c596f04a87388bb42bdef13d359c39': Audio: add an openOutputStreamWithFlags API
Diffstat (limited to 'audio')
-rw-r--r--audio/AudioHardwareInterface.cpp11
-rw-r--r--audio/audio_hw_hal.cpp3
2 files changed, 13 insertions, 1 deletions
diff --git a/audio/AudioHardwareInterface.cpp b/audio/AudioHardwareInterface.cpp
index 60cce27..dbf6f33 100644
--- a/audio/AudioHardwareInterface.cpp
+++ b/audio/AudioHardwareInterface.cpp
@@ -148,6 +148,17 @@ status_t AudioHardwareBase::dumpState(int fd, const Vector<String16>& args)
return NO_ERROR;
}
+// default implementation calls its "without flags" counterpart
+AudioStreamOut* AudioHardwareInterface::openOutputStreamWithFlags(uint32_t devices,
+ audio_output_flags_t flags,
+ int *format,
+ uint32_t *channels,
+ uint32_t *sampleRate,
+ status_t *status)
+{
+ return openOutputStream(devices, format, channels, sampleRate, status);
+}
+
// ----------------------------------------------------------------------------
}; // namespace android
diff --git a/audio/audio_hw_hal.cpp b/audio/audio_hw_hal.cpp
index 07d735d..9b1f1a3 100644
--- a/audio/audio_hw_hal.cpp
+++ b/audio/audio_hw_hal.cpp
@@ -501,7 +501,8 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
devices = convert_audio_device(devices, HAL_API_REV_2_0, HAL_API_REV_1_0);
- out->legacy_out = ladev->hwif->openOutputStream(devices, (int *) &config->format,
+ out->legacy_out = ladev->hwif->openOutputStreamWithFlags(devices, flags,
+ (int *) &config->format,
&config->channel_mask,
&config->sample_rate, &status);
if (!out->legacy_out) {