audio: Remove InputStreamTest#getCapturePosition test

The test was created based on assumptions and the current
HAL behavior. There is no actual requirement in the HIDL
interface for a stream to have a zero capture position
prior to start. In fact, some streams may be created by
the HAL "pre-loaded" with data if audio has already been
captured by the DSP and needs to be passed to the framework.

Bug: 270478574
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: Ied6a71b73bff403365dd85fe6a212cfa4a5b284d
This commit is contained in:
Mikhail Naganov
2023-02-24 09:57:16 -08:00
parent 7a7baedb3a
commit afe90852d4

View File

@@ -1698,26 +1698,6 @@ TEST_P(InputStreamTest, GetInputFramesLost) {
ASSERT_EQ(0U, framesLost);
}
TEST_P(InputStreamTest, getCapturePosition) {
doc::test(
"The capture position of a non prepared stream should not be "
"retrievable or 0");
uint64_t frames;
uint64_t time;
ASSERT_OK(stream->getCapturePosition(returnIn(res, frames, time)));
// Although 'getCapturePosition' is mandatory in V7, legacy implementations
// may return -ENOSYS (which is translated to NOT_SUPPORTED) in cases when
// the capture position can't be retrieved, e.g. when the stream isn't
// running. Because of this, we don't fail when getting NOT_SUPPORTED
// in this test. Behavior of 'getCapturePosition' for running streams is
// tested in 'PcmOnlyConfigInputStreamTest' for V7.
ASSERT_RESULT(okOrInvalidStateOrNotSupported, res);
if (res == Result::OK) {
ASSERT_EQ(0U, frames);
ASSERT_LE(0U, time);
}
}
//////////////////////////////////////////////////////////////////////////////
///////////////////////////////// StreamOut //////////////////////////////////
//////////////////////////////////////////////////////////////////////////////