Merge changes Ia78f608c,I14dde521
* changes:
brillo: Add volume control to client library.
brillo: Add binder interfaces for volume control.
diff --git a/audio_utils/echo_reference.c b/audio_utils/echo_reference.c
index 178b306..a822519 100644
--- a/audio_utils/echo_reference.c
+++ b/audio_utils/echo_reference.c
@@ -332,9 +332,7 @@
uint32_t timeoutMs = (uint32_t)((1000 * buffer->frame_count) / er->rd_sampling_rate / 2);
struct timespec ts = {0, 0};
-#ifndef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
clock_gettime(CLOCK_REALTIME, &ts);
-#endif
ts.tv_sec += timeoutMs/1000;
ts.tv_nsec += (timeoutMs%1000) * 1000000;
@@ -343,11 +341,7 @@
ts.tv_sec += 1;
}
-#ifdef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
- pthread_cond_timedwait_relative_np(&er->cond, &er->lock, &ts);
-#else
pthread_cond_timedwait(&er->cond, &er->lock, &ts);
-#endif
ALOGV_IF((er->frames_in < buffer->frame_count),
"echo_reference_read() waited %d ms but still not enough frames"\
diff --git a/brillo/audio/audioservice/Android.mk b/brillo/audio/audioservice/Android.mk
index 0e68f0e..f2431fd 100644
--- a/brillo/audio/audioservice/Android.mk
+++ b/brillo/audio/audioservice/Android.mk
@@ -98,7 +98,6 @@
test/brillo_audio_device_info_internal_test.cpp \
test/brillo_audio_manager_test.cpp
LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl
-LOCAL_C_INCLUDES := external/gtest/include
LOCAL_SHARED_LIBRARIES := \
$(audio_service_shared_libraries) \
libbinderwrapper_test_support
diff --git a/brillo/audio/audioservice/test/brillo_audio_manager_test.cpp b/brillo/audio/audioservice/test/brillo_audio_manager_test.cpp
index 6c4b1ff..b4299f7 100644
--- a/brillo/audio/audioservice/test/brillo_audio_manager_test.cpp
+++ b/brillo/audio/audioservice/test/brillo_audio_manager_test.cpp
@@ -70,7 +70,7 @@
TEST_F(BrilloAudioManagerTest, GetDevicesInvalidParams) {
auto bam = GetValidManager();
- size_t num_devices;
+ unsigned int num_devices;
EXPECT_EQ(BAudioManager_getDevices(nullptr, 1, nullptr, 0, &num_devices),
EINVAL);
EXPECT_EQ(BAudioManager_getDevices(bam, 1, nullptr, 0, nullptr), EINVAL);
@@ -80,7 +80,7 @@
TEST_F(BrilloAudioManagerTest, GetDevicesNullArrNoDevices) {
auto bam = GetValidManager();
- size_t num_devices = -1;
+ unsigned int num_devices = -1;
EXPECT_CALL(*bas_.get(), GetDevices(1, _)).WillOnce(Return(Status::ok()));
EXPECT_EQ(BAudioManager_getDevices(bam, 1, nullptr, 0, &num_devices), 0);
EXPECT_EQ(num_devices, 0);
@@ -239,7 +239,7 @@
TEST_F(BrilloAudioManagerTest, GetDevicesBASDies) {
auto bam = GetValidManager();
- size_t num_devices = -1;
+ unsigned int num_devices = -1;
binder_wrapper()->NotifyAboutBinderDeath(bas_);
EXPECT_EQ(BAudioManager_getDevices(bam, 1, nullptr, 0, &num_devices),
ECONNABORTED);