Tailor AUDIO command to VSOC
Change-Id: I0d26a7b2fc5966ce0d1af38787a5317b53a624ae
diff --git a/common/libs/time/Android.mk b/common/libs/time/Android.mk
new file mode 100644
index 0000000..4d6d107
--- /dev/null
+++ b/common/libs/time/Android.mk
@@ -0,0 +1,28 @@
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ monotonic_time.cpp
+LOCAL_MODULE := libcuttlefish_time
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES := \
+ device/google/cuttlefish_common
+LOCAL_CFLAGS := $(VSOC_VERSION_CFLAGS)
+LOCAL_VENDOR_MODULE := true
+include $(BUILD_STATIC_LIBRARY)
+
+
diff --git a/common/libs/time/monotonic_time.h b/common/libs/time/monotonic_time.h
index be8882d..4a81e66 100644
--- a/common/libs/time/monotonic_time.h
+++ b/common/libs/time/monotonic_time.h
@@ -13,8 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef CUTTLEFISH_COMMON_COMMON_LIBS_TIME_MONOTONIC_TIME_H_
-#define CUTTLEFISH_COMMON_COMMON_LIBS_TIME_MONOTONIC_TIME_H_
+#pragma once
#include <stdint.h>
#include <time.h>
@@ -291,4 +290,3 @@
return avd::time::Microseconds(
avd::time::MonotonicTimePoint::Now().SinceEpoch()).count();
}
-#endif // CUTTLEFISH_COMMON_COMMON_LIBS_TIME_MONOTONIC_TIME_H_
diff --git a/guest/commands/audio/Android.mk b/guest/commands/audio/Android.mk
index a4b053c..80d76b3 100644
--- a/guest/commands/audio/Android.mk
+++ b/guest/commands/audio/Android.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 The Android Open Source Project
+# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -27,37 +27,38 @@
LOCAL_SHARED_LIBRARIES := \
liblog \
libcutils \
- libgcecutils
+ libcuttlefish_auto_resources \
+ libcuttlefish_fs
LOCAL_SRC_FILES := \
audio_hal.cpp \
- gce_audio.cpp \
- gce_audio_input_stream.cpp \
- gce_audio_output_stream.cpp
+ vsoc_audio.cpp \
+ vsoc_audio_input_stream.cpp \
+ vsoc_audio_output_stream.cpp \
+ vsoc_audio_message.cpp
LOCAL_C_INCLUDES := \
- device/google/gce/include \
- $(GCE_STLPORT_INCLUDES) \
+ device/google/cuttlefish_common \
+ $(VSOC_STLPORT_INCLUDES) \
frameworks/native/include/media/hardware \
$(call include-path-for, audio)
LOCAL_STATIC_LIBRARIES := \
- libgcemetadata \
libcutils \
- $(GCE_STLPORT_STATIC_LIBS)
+ libcuttlefish_remoter_framework \
+ libcuttlefish_time
+ $(VSOC_STLPORT_STATIC_LIBS)
LOCAL_CFLAGS := \
-Wall -Werror -Wno-parentheses -Wno-missing-field-initializers \
- $(GCE_VERSION_CFLAGS)
+ -DLOG_TAG=\"VSoC-Audio\" \
+ $(VSOC_VERSION_CFLAGS)
# Work-around for the non-standard language feautures used in
# system/media/audio/include/system/audio.h
LOCAL_CLANG_CFLAGS := -Wno-gnu-designator
-LOCAL_MODULE := audio.primary.$(VIRTUAL_HARDWARE_TYPE)
+LOCAL_MODULE := audio.primary.vsoc
LOCAL_VENDOR_MODULE := true
include $(BUILD_SHARED_LIBRARY)
-
-# Enable below to use a custom audio_policy HAL.
-# include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/guest/commands/audio/audio_hal.cpp b/guest/commands/audio/audio_hal.cpp
index 1e66e70..fe65e16 100644
--- a/guest/commands/audio/audio_hal.cpp
+++ b/guest/commands/audio/audio_hal.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,24 +13,24 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-// Google Compute Engine (GCE) Audio HAL - Main File.
-#include "audio_hal.h"
-#include "gce_audio.h"
+#include "guest/commands/audio/vsoc_audio.h"
+#include "guest/commands/audio/audio_hal.h"
+#include "guest/libs/platform_support/api_level_fixes.h"
static hw_module_methods_t hal_module_methods = {
- open: avd::GceAudio::Open,
+ VSOC_STATIC_INITIALIZER(open) avd::GceAudio::Open,
};
audio_module HAL_MODULE_INFO_SYM = {
- common: {
- tag: HARDWARE_MODULE_TAG,
- module_api_version: AUDIO_MODULE_API_VERSION_0_1,
- hal_api_version: HARDWARE_HAL_API_VERSION,
- id: AUDIO_HARDWARE_MODULE_ID,
- name: "GCE Audio HW HAL",
- author: "The Android Open Source Project",
- methods: &hal_module_methods,
+ VSOC_STATIC_INITIALIZER(common) {
+ VSOC_STATIC_INITIALIZER(tag) HARDWARE_MODULE_TAG,
+ VSOC_STATIC_INITIALIZER(module_api_version) AUDIO_MODULE_API_VERSION_0_1,
+ VSOC_STATIC_INITIALIZER(hal_api_version) HARDWARE_HAL_API_VERSION,
+ VSOC_STATIC_INITIALIZER(id) AUDIO_HARDWARE_MODULE_ID,
+ VSOC_STATIC_INITIALIZER(name) "GCE Audio HW HAL",
+ VSOC_STATIC_INITIALIZER(author) "The Android Open Source Project",
+ VSOC_STATIC_INITIALIZER(methods) &hal_module_methods,
},
};
diff --git a/guest/commands/audio/audio_hal.h b/guest/commands/audio/audio_hal.h
index 8037730..36d47cb 100644
--- a/guest/commands/audio/audio_hal.h
+++ b/guest/commands/audio/audio_hal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,11 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-// Google Compute Engine (GCE) Audio HAL - Main File.
-#ifndef DEVICE_GOOGLE_GCE_AUDIO_AUDIO_HAL_H_
-#define DEVICE_GOOGLE_GCE_AUDIO_AUDIO_HAL_H_
-
-#define LOG_TAG "GceAudio"
+#pragma once
#define AUDIO_DEBUG 0
@@ -34,5 +30,3 @@
#include <hardware/hardware.h>
#include <system/audio.h>
#include <hardware/audio.h>
-
-#endif
diff --git a/guest/commands/audio/policy/Android.mk b/guest/commands/audio/policy/Android.mk
index ac692d6..da72309 100644
--- a/guest/commands/audio/policy/Android.mk
+++ b/guest/commands/audio/policy/Android.mk
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# GCE Audio Policy HAL
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
@@ -30,16 +29,17 @@
libcutils
LOCAL_SRC_FILES := \
- gce_audio_policy_hal.cpp
+ vsoc_audio_policy_hal.cpp
LOCAL_C_INCLUDES := \
- $(GCE_STLPORT_INCLUDES) \
+ device/google/cuttlefish_common \
+ $(VSOC_STLPORT_INCLUDES) \
frameworks/native/include/media/hardware \
$(call include-path-for, audio)
-LOCAL_CFLAGS := -Wall
+LOCAL_CFLAGS := -Wall -DLOG_TAG=\"VSoC-AudioPolicy\"
-LOCAL_MODULE := audio_policy.$(VIRTUAL_HARDWARE_TYPE)
+LOCAL_MODULE := audio_policy.vsoc
LOCAL_VENDOR_MODULE := true
include $(BUILD_SHARED_LIBRARY)
diff --git a/guest/commands/audio/policy/vsoc_audio_policy_hal.cpp b/guest/commands/audio/policy/vsoc_audio_policy_hal.cpp
index dea2092..dbfb7b6 100644
--- a/guest/commands/audio/policy/vsoc_audio_policy_hal.cpp
+++ b/guest/commands/audio/policy/vsoc_audio_policy_hal.cpp
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-// Google Compute Engine (GCE) Audio Policy HAL - Main File.
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
@@ -24,7 +23,7 @@
#include <system/audio_policy.h>
#include <hardware/audio_policy.h>
-#include "gce_audio_policy_hal.h"
+#include "guest/commands/audio/policy/vsoc_audio_policy_hal.h"
namespace avd {
diff --git a/guest/commands/audio/policy/vsoc_audio_policy_hal.h b/guest/commands/audio/policy/vsoc_audio_policy_hal.h
index 55d59ab..46a38f1 100644
--- a/guest/commands/audio/policy/vsoc_audio_policy_hal.h
+++ b/guest/commands/audio/policy/vsoc_audio_policy_hal.h
@@ -13,9 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-// Google Compute Engine (GCE) Audio Policy HAL - Main File.
-#ifndef DEVICE_GOOGLE_GCE_AUDIO_POLICY_GCE_AUDIO_POLICY_HAL_H_
-#define DEVICE_GOOGLE_GCE_AUDIO_POLICY_GCE_AUDIO_POLICY_HAL_H_
+#pragma once
#include <errno.h>
#include <string.h>
@@ -33,8 +31,6 @@
# define D(...) ((void)0)
#endif
-#define LOG_TAG "GceAudioPolicy"
-
namespace avd {
struct gce_audio_policy {
@@ -246,4 +242,3 @@
}
-#endif
diff --git a/guest/commands/audio/simulated_buffer.h b/guest/commands/audio/simulated_buffer.h
index 3365365..107abae 100644
--- a/guest/commands/audio/simulated_buffer.h
+++ b/guest/commands/audio/simulated_buffer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,14 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef GCE_SIMULATED_BUFFER
-#define GCE_SIMULATED_BUFFER
+#pragma once
#include <stdint.h>
#include <unistd.h>
#include <time.h>
-#include <MonotonicTime.h>
+#include "common/libs/time/monotonic_time.h"
/**
* This abstract class simulates a buffer that either fills or empties at
@@ -314,4 +313,3 @@
int64_t lost_input_items_;
};
-#endif // GCE_SIMULATED_BUFFER
diff --git a/guest/commands/audio/vsoc_audio.cpp b/guest/commands/audio/vsoc_audio.cpp
index 536171c..0b531a3 100644
--- a/guest/commands/audio/vsoc_audio.cpp
+++ b/guest/commands/audio/vsoc_audio.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,8 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-// Google Compute Engine (GCE) Audio HAL - Audio HAL Interface.
-#include "audio_hal.h"
+#include "guest/commands/audio/audio_hal.h"
#include <stdio.h>
#include <stdlib.h>
@@ -25,16 +24,15 @@
#include <cutils/str_parms.h>
}
-#include <api_level_fixes.h>
-#include <AutoResources.h>
-#include <Pthread.h>
-#include <remoter_framework_pkt.h>
-#include <SharedSelect.h>
-#include <Thunkers.h>
-
-#include "gce_audio.h"
-#include "gce_audio_input_stream.h"
-#include "gce_audio_output_stream.h"
+#include "common/libs/auto_resources/auto_resources.h"
+#include "common/libs/fs/shared_select.h"
+#include "common/libs/threads/pthread.h"
+#include "common/libs/threads/thunkers.h"
+#include "guest/commands/audio/vsoc_audio.h"
+#include "guest/commands/audio/vsoc_audio_input_stream.h"
+#include "guest/commands/audio/vsoc_audio_output_stream.h"
+#include "guest/libs/platform_support/api_level_fixes.h"
+#include "guest/libs/remoter/remoter_framework_pkt.h"
using avd::LockGuard;
using avd::Mutex;
@@ -202,7 +200,7 @@
int GceAudio::Dump(int fd) const {
LockGuard<Mutex> guard(lock_);
- GCE_FDPRINTF(
+ VSOC_FDPRINTF(
fd,
"\nadev_dump:\n"
"\tmic_mute: %s\n"
diff --git a/guest/commands/audio/vsoc_audio.h b/guest/commands/audio/vsoc_audio.h
index 3ee7f9d..4f92e31 100644
--- a/guest/commands/audio/vsoc_audio.h
+++ b/guest/commands/audio/vsoc_audio.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,20 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-// Google Compute Engine (GCE) Audio HAL - Audio HAL Interface.
-#ifndef DEVICE_GOOGLE_GCE_AUDIO_GCE_AUDIO_H_
-#define DEVICE_GOOGLE_GCE_AUDIO_GCE_AUDIO_H_
+#pragma once
-#include <api_level_fixes.h>
#include <list>
#include <map>
-#include <Pthread.h>
-#include <SharedFD.h>
-#include <UniquePtr.h>
-#include <gce_audio_message.h>
-#include "audio_hal.h"
-#include "gce_audio_input_stream.h"
+#include "common/libs/fs/shared_fd.h"
+#include "common/libs/threads/pthread.h"
+#include "guest/commands/audio/audio_hal.h"
+#include "guest/commands/audio/vsoc_audio_input_stream.h"
+#include "guest/commands/audio/vsoc_audio_message.h"
+#include "guest/libs/platform_support/api_level_fixes.h"
namespace avd {
@@ -321,4 +318,3 @@
}
-#endif
diff --git a/guest/commands/audio/vsoc_audio_input_stream.cpp b/guest/commands/audio/vsoc_audio_input_stream.cpp
index 3c5d00c..8b4e627 100644
--- a/guest/commands/audio/vsoc_audio_input_stream.cpp
+++ b/guest/commands/audio/vsoc_audio_input_stream.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,11 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-// Google Compute Engine (GCE) Audio HAL - Audio In Stream HAL Interface.
-
-#include <api_level_fixes.h>
-
-#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstdint>
@@ -26,13 +21,12 @@
#include <cutils/str_parms.h>
}
-#include <api_level_fixes.h>
-
-#include "audio_hal.h"
-#include "gce_audio.h"
-#include "gce_audio_input_stream.h"
-#include "AutoResources.h"
-#include <Thunkers.h>
+#include "common/libs/auto_resources/auto_resources.h"
+#include "common/libs/threads/thunkers.h"
+#include "guest/commands/audio/audio_hal.h"
+#include "guest/commands/audio/vsoc_audio.h"
+#include "guest/commands/audio/vsoc_audio_input_stream.h"
+#include "guest/libs/platform_support/api_level_fixes.h"
namespace avd {
@@ -138,7 +132,7 @@
int GceAudioInputStream::Dump(int fd) const {
D("GceAudioInputStream::%s", __FUNCTION__);
- GCE_FDPRINTF(
+ VSOC_FDPRINTF(
fd,
"\tInputSteam Dump:\n"
"\t\tsample rate: %u\n"
diff --git a/guest/commands/audio/vsoc_audio_input_stream.h b/guest/commands/audio/vsoc_audio_input_stream.h
index 998348c..ada9cc2 100644
--- a/guest/commands/audio/vsoc_audio_input_stream.h
+++ b/guest/commands/audio/vsoc_audio_input_stream.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,12 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-// Google Compute Engine (GCE) Audio HAL - Audio In Stream HAL Interface.
-#ifndef DEVICE_GOOGLE_GCE_AUDIO_GCE_AUDIO_INPUT_STREAM_H_
-#define DEVICE_GOOGLE_GCE_AUDIO_GCE_AUDIO_INPUT_STREAM_H_
+#pragma once
-#include "audio_hal.h"
-#include <SimulatedBuffer.h>
+#include <memory>
+
+#include "guest/commands/audio/audio_hal.h"
+#include "guest/commands/audio/simulated_buffer.h"
+#include "guest/commands/audio/vsoc_audio_message.h"
namespace avd {
@@ -156,7 +157,7 @@
private:
GceAudioInputStream(avd::GceAudio* dev, audio_devices_t devices,
const audio_config& config);
- avd::UniquePtr<SimulatedInputBuffer> buffer_model_;
+ std::unique_ptr<SimulatedInputBuffer> buffer_model_;
avd::GceAudio *dev_;
audio_config config_;
float gain_;
@@ -166,4 +167,3 @@
};
}
-#endif
diff --git a/guest/commands/audio/vsoc_audio_message.cpp b/guest/commands/audio/vsoc_audio_message.cpp
index b8d9262..30ef532 100644
--- a/guest/commands/audio/vsoc_audio_message.cpp
+++ b/guest/commands/audio/vsoc_audio_message.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <gce_audio_message.h>
+#include "guest/commands/audio/vsoc_audio_message.h"
const char* gce_audio_message::kAudioHALSocketName =
"/var/run/media/audio_hal_socket";
diff --git a/guest/commands/audio/vsoc_audio_message.h b/guest/commands/audio/vsoc_audio_message.h
index 7b4e3ff..4e02f91 100644
--- a/guest/commands/audio/vsoc_audio_message.h
+++ b/guest/commands/audio/vsoc_audio_message.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,8 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef DEVICE_GOOGLE_GCE_INCLUDE_AUDIO_MESSAGE_H_
-#define DEVICE_GOOGLE_GCE_INCLUDE_AUDIO_MESSAGE_H_
+#pragma once
#include <stdlib.h>
#include <stdint.h>
@@ -84,4 +83,3 @@
time_presented.tv_nsec = 0;
}
};
-#endif // DEVICE_GOOGLE_GCE_INCLUDE_AUDIO_MESSAGE_H_
diff --git a/guest/commands/audio/vsoc_audio_output_stream.cpp b/guest/commands/audio/vsoc_audio_output_stream.cpp
index 11175ad..e2ede05 100644
--- a/guest/commands/audio/vsoc_audio_output_stream.cpp
+++ b/guest/commands/audio/vsoc_audio_output_stream.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,27 +13,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-// Google Compute Engine (GCE) Audio HAL - Audio Out Stream HAL Interface.
-#include <gce_audio_message.h>
+#include "guest/commands/audio/vsoc_audio_message.h"
-#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
+#include <memory>
#include <cutils/sockets.h>
extern "C"{
#include <cutils/str_parms.h>
}
-#include <api_level_fixes.h>
-
-#include "audio_hal.h"
-#include "gce_audio.h"
-#include "gce_audio_output_stream.h"
-#include <remoter_framework_pkt.h>
-#include <AutoResources.h>
-#include <MonotonicTime.h>
-#include <Thunkers.h>
+#include "common/libs/auto_resources/auto_resources.h"
+#include "common/libs/threads/thunkers.h"
+#include "common/libs/time/monotonic_time.h"
+#include "guest/commands/audio/audio_hal.h"
+#include "guest/commands/audio/vsoc_audio.h"
+#include "guest/commands/audio/vsoc_audio_output_stream.h"
+#include "guest/libs/platform_support/api_level_fixes.h"
+#include "guest/libs/remoter/remoter_framework_pkt.h"
#if defined(AUDIO_DEVICE_API_VERSION_3_0)
static inline size_t GceAudioFrameSize(const audio_stream_out* s) {
@@ -74,7 +72,7 @@
int GceAudioOutputStream::Dump(int fd) const {
D("GceAudioOutputStream::%s", __FUNCTION__);
- GCE_FDPRINTF(
+ VSOC_FDPRINTF(
fd,
"\tout_dump:\n"
"\t\tsample rate: %u\n"
@@ -107,7 +105,7 @@
}
};
-typedef avd::UniquePtr<str_parms, StrParmsDestroyer> StrParmsPtr;
+typedef std::unique_ptr<str_parms, StrParmsDestroyer> StrParmsPtr;
}
int GceAudioOutputStream::SetParameters(const char* kv_pairs) {
@@ -275,14 +273,14 @@
D("GceAudioOutputStream::%s", __FUNCTION__);
*stream_out = NULL;
// Deleted by Close(); UniquePtr holds until end of Open().
- avd::UniquePtr<GceAudioOutputStream> out(
+ std::unique_ptr<GceAudioOutputStream> out(
new GceAudioOutputStream(dev));
out->message_header_.stream_number = stream_number;
out->message_header_.format = config->format;
out->message_header_.channel_mask = config->channel_mask;
out->message_header_.frame_rate = config->sample_rate;
out->frame_count_ =
-#if GCE_PLATFORM_SDK_AFTER(K)
+#if VSOC_PLATFORM_SDK_AFTER(K)
config->frame_count;
#else
0;
diff --git a/guest/commands/audio/vsoc_audio_output_stream.h b/guest/commands/audio/vsoc_audio_output_stream.h
index 7df69ef..b02ba13 100644
--- a/guest/commands/audio/vsoc_audio_output_stream.h
+++ b/guest/commands/audio/vsoc_audio_output_stream.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-// Google Compute Engine (GCE) Audio HAL - Audio Out Stream HAL Interface.
-#ifndef DEVICE_GOOGLE_GCE_AUDIO_GCE_AUDIO_OUTPUT_STREAM_H_
-#define DEVICE_GOOGLE_GCE_AUDIO_GCE_AUDIO_OUTPUT_STREAM_H_
+#pragma once
-#include "audio_hal.h"
-#include <gce_audio_message.h>
-#include <SimulatedBuffer.h>
+#include <memory>
+
+#include "guest/commands/audio/audio_hal.h"
+#include "guest/commands/audio/simulated_buffer.h"
+#include "guest/commands/audio/vsoc_audio_message.h"
namespace avd {
@@ -301,7 +301,7 @@
static const size_t kOutLatency = 2;
gce_audio_message message_header_;
- avd::UniquePtr<SimulatedOutputBuffer> buffer_;
+ std::unique_ptr<SimulatedOutputBuffer> buffer_;
avd::GceAudio *dev_;
audio_devices_t device_;
size_t frame_size_;
@@ -311,4 +311,3 @@
};
}
-#endif
diff --git a/guest/libs/remoter/Android.mk b/guest/libs/remoter/Android.mk
index 7bd6ba5..bb0dba7 100644
--- a/guest/libs/remoter/Android.mk
+++ b/guest/libs/remoter/Android.mk
@@ -27,6 +27,6 @@
device/google/cuttlefish_common
LOCAL_CFLAGS := $(VSOC_VERSION_CFLAGS)
LOCAL_VENDOR_MODULE := true
-include $(BUILD_SHARED_LIBRARY)
+include $(BUILD_STATIC_LIBRARY)