OSDN Git Service

Merge "[AWARE]: Fix Nan capabilities mismatch" am: 980baf1bd7 am: 41fc794eff
[android-x86/hardware-libhardware_legacy.git] / audio / AudioHardwareInterface.cpp
index c116669..dbf6f33 100644 (file)
@@ -26,9 +26,6 @@
 
 #include "AudioHardwareStub.h"
 #include "AudioHardwareGeneric.h"
-#ifdef WITH_A2DP
-#include "A2dpAudioInterface.h"
-#endif
 
 #ifdef ENABLE_AUDIO_DUMP
 #include "AudioDumpInterface.h"
@@ -89,7 +86,7 @@ AudioHardwareBase::AudioHardwareBase()
 status_t AudioHardwareBase::setMode(int mode)
 {
 #if LOG_ROUTING_CALLS
-    LOGD("setMode(%s)", displayMode(mode));
+    ALOGD("setMode(%s)", displayMode(mode));
 #endif
     if ((mode < 0) || (mode >= AudioSystem::NUM_MODES))
         return BAD_VALUE;
@@ -116,15 +113,15 @@ String8 AudioHardwareBase::getParameters(const String8& keys)
 size_t AudioHardwareBase::getInputBufferSize(uint32_t sampleRate, int format, int channelCount)
 {
     if (sampleRate != 8000) {
-        LOGW("getInputBufferSize bad sampling rate: %d", sampleRate);
+        ALOGW("getInputBufferSize bad sampling rate: %d", sampleRate);
         return 0;
     }
     if (format != AudioSystem::PCM_16_BIT) {
-        LOGW("getInputBufferSize bad format: %d", format);
+        ALOGW("getInputBufferSize bad format: %d", format);
         return 0;
     }
     if (channelCount != 1) {
-        LOGW("getInputBufferSize bad channel count: %d", channelCount);
+        ALOGW("getInputBufferSize bad channel count: %d", channelCount);
         return 0;
     }
 
@@ -151,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