summaryrefslogtreecommitdiffstats
path: root/audio/core
diff options
context:
space:
mode:
authorKevin Rocard <krocard@google.com>2018-11-09 16:42:24 -0800
committerKevin Rocard <krocard@google.com>2018-11-28 17:54:35 -0800
commit1770b3b44a617bf49a17052ee81f04598ed1eca5 (patch)
treef04778d3ac616a1f6d99045aee69569dfe883f86 /audio/core
parent55b1061d9ceb5d7de1fbeef3f6f6db32d46f6219 (diff)
downloadandroid_hardware_interfaces-1770b3b44a617bf49a17052ee81f04598ed1eca5.tar.gz
android_hardware_interfaces-1770b3b44a617bf49a17052ee81f04598ed1eca5.tar.bz2
android_hardware_interfaces-1770b3b44a617bf49a17052ee81f04598ed1eca5.zip
Audio HAL: Cleanup implementation
Rename files so that, if they are in a X.0 folder, their name does not contain that version number. That allows for easier copy paste when creating a new version. Conversion.h was included from the all-versions instead of the X.0 headers. This in incoherent with the other headers. Add VersionMacro.h that will be used in the follow up patch. Also remove shim from VNDK as only stable ABI&API libraries should be part of it. Test: Compile Bug: 118203066 Change-Id: I9cd77b3df5ccede5ae51c3cc94fab5939c51d9ef Signed-off-by: Kevin Rocard <krocard@google.com>
Diffstat (limited to 'audio/core')
-rw-r--r--audio/core/2.0/default/ParametersUtil.cpp1
-rw-r--r--audio/core/2.0/default/StreamIn.cpp1
-rw-r--r--audio/core/4.0/default/ParametersUtil.cpp1
-rw-r--r--audio/core/4.0/default/StreamIn.cpp1
-rw-r--r--audio/core/all-versions/default/include/core/all-versions/default/ParametersUtil.impl.h1
-rw-r--r--audio/core/all-versions/default/include/core/all-versions/default/Stream.impl.h2
-rw-r--r--audio/core/all-versions/default/include/core/all-versions/default/StreamIn.impl.h4
7 files changed, 6 insertions, 5 deletions
diff --git a/audio/core/2.0/default/ParametersUtil.cpp b/audio/core/2.0/default/ParametersUtil.cpp
index 963e291de..602b2129f 100644
--- a/audio/core/2.0/default/ParametersUtil.cpp
+++ b/audio/core/2.0/default/ParametersUtil.cpp
@@ -15,6 +15,7 @@
*/
#include "core/2.0/default/ParametersUtil.h"
+#include "core/2.0/default/Conversions.h"
#include "core/2.0/default/Util.h"
#define AUDIO_HAL_VERSION V2_0
diff --git a/audio/core/2.0/default/StreamIn.cpp b/audio/core/2.0/default/StreamIn.cpp
index 2021df1c4..cfd2abb37 100644
--- a/audio/core/2.0/default/StreamIn.cpp
+++ b/audio/core/2.0/default/StreamIn.cpp
@@ -17,6 +17,7 @@
#define LOG_TAG "StreamInHAL"
#include "core/2.0/default/StreamIn.h"
+#include "core/2.0/default/Conversions.h"
#include "core/2.0/default/Util.h"
#define AUDIO_HAL_VERSION V2_0
diff --git a/audio/core/4.0/default/ParametersUtil.cpp b/audio/core/4.0/default/ParametersUtil.cpp
index 2cc9fb56a..b90a8e79e 100644
--- a/audio/core/4.0/default/ParametersUtil.cpp
+++ b/audio/core/4.0/default/ParametersUtil.cpp
@@ -15,6 +15,7 @@
*/
#include "core/4.0/default/ParametersUtil.h"
+#include "core/4.0/default/Conversions.h"
#include "core/4.0/default/Util.h"
#define AUDIO_HAL_VERSION V4_0
diff --git a/audio/core/4.0/default/StreamIn.cpp b/audio/core/4.0/default/StreamIn.cpp
index 718bd25a6..11a7a8031 100644
--- a/audio/core/4.0/default/StreamIn.cpp
+++ b/audio/core/4.0/default/StreamIn.cpp
@@ -17,6 +17,7 @@
#define LOG_TAG "StreamInHAL"
#include "core/4.0/default/StreamIn.h"
+#include "core/4.0/default/Conversions.h"
#include "core/4.0/default/Util.h"
#define AUDIO_HAL_VERSION V4_0
diff --git a/audio/core/all-versions/default/include/core/all-versions/default/ParametersUtil.impl.h b/audio/core/all-versions/default/include/core/all-versions/default/ParametersUtil.impl.h
index 34bc53c7a..39bd66a78 100644
--- a/audio/core/all-versions/default/include/core/all-versions/default/ParametersUtil.impl.h
+++ b/audio/core/all-versions/default/include/core/all-versions/default/ParametersUtil.impl.h
@@ -15,7 +15,6 @@
*/
#include <common/all-versions/IncludeGuard.h>
-#include <core/all-versions/default/Conversions.h>
#include <system/audio.h>
namespace android {
diff --git a/audio/core/all-versions/default/include/core/all-versions/default/Stream.impl.h b/audio/core/all-versions/default/include/core/all-versions/default/Stream.impl.h
index 381a441c0..306680080 100644
--- a/audio/core/all-versions/default/include/core/all-versions/default/Stream.impl.h
+++ b/audio/core/all-versions/default/include/core/all-versions/default/Stream.impl.h
@@ -108,7 +108,7 @@ Return<void> Stream::getSupportedSampleRates(AudioFormat format,
}
#ifdef AUDIO_HAL_VERSION_2_0
_hidl_cb(sampleRates);
-#elif AUDIO_HAL_VERSION_4_0
+#elif defined(AUDIO_HAL_VERSION_4_0)
_hidl_cb(result, sampleRates);
#endif
return Void();
diff --git a/audio/core/all-versions/default/include/core/all-versions/default/StreamIn.impl.h b/audio/core/all-versions/default/include/core/all-versions/default/StreamIn.impl.h
index aeb58db68..4eb4ef931 100644
--- a/audio/core/all-versions/default/include/core/all-versions/default/StreamIn.impl.h
+++ b/audio/core/all-versions/default/include/core/all-versions/default/StreamIn.impl.h
@@ -25,7 +25,7 @@
#include <memory>
using ::android::hardware::audio::AUDIO_HAL_VERSION::MessageQueueFlagBits;
-#include "Conversions.h"
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::ThreadInfo;
namespace android {
namespace hardware {
@@ -33,8 +33,6 @@ namespace audio {
namespace AUDIO_HAL_VERSION {
namespace implementation {
-using ::android::hardware::audio::common::AUDIO_HAL_VERSION::ThreadInfo;
-
namespace {
class ReadThread : public Thread {