mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Add vts for microphone enumeration APIs." into pi-dev am: 418b539737
am: 9ace003015
Change-Id: Ic1d07d90f89d4686cdddceb69398cf6c22205d37
This commit is contained in:
@@ -74,6 +74,7 @@ using ReadParameters = ::android::hardware::audio::V4_0::IStreamIn::ReadParamete
|
||||
using ReadStatus = ::android::hardware::audio::V4_0::IStreamIn::ReadStatus;
|
||||
using ::android::hardware::audio::V4_0::IStreamOut;
|
||||
using ::android::hardware::audio::V4_0::IStreamOutCallback;
|
||||
using ::android::hardware::audio::V4_0::MicrophoneInfo;
|
||||
using ::android::hardware::audio::V4_0::MmapBufferInfo;
|
||||
using ::android::hardware::audio::V4_0::MmapPosition;
|
||||
using ::android::hardware::audio::V4_0::ParameterValue;
|
||||
@@ -477,6 +478,17 @@ TEST_F(AudioPrimaryHidlTest, getParameters) {
|
||||
ASSERT_OK(device->setParameters(context, values));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////// getMicrophones ///////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TEST_F(AudioPrimaryHidlTest, GetMicrophonesTest) {
|
||||
doc::test("Make sure getMicrophones always succeeds");
|
||||
hidl_vec<MicrophoneInfo> microphones;
|
||||
ASSERT_OK(device->getMicrophones(returnIn(res, microphones)));
|
||||
ASSERT_OK(res);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////// debugDebug //////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1081,6 +1093,14 @@ TEST_P(InputStreamTest, updateSinkMetadata) {
|
||||
ASSERT_OK(stream->updateSinkMetadata(initialMetadata));
|
||||
}
|
||||
|
||||
TEST_P(InputStreamTest, getActiveMicrophones) {
|
||||
doc::test("Getting active microphones should always succeed");
|
||||
hidl_vec<MicrophoneInfo> microphones;
|
||||
ASSERT_OK(device->getMicrophones(returnIn(res, microphones)));
|
||||
ASSERT_OK(res);
|
||||
ASSERT_TRUE(microphones.size() > 0);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////// StreamOut //////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user