Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7baa7cd1 authored by Xin Li's avatar Xin Li
Browse files

Merge stage-dr1-aosp-master into stage-aosp-master

Bug: 112535855
Change-Id: Ic23536c6aac79a419246d7817da938eb00ce1d32
parents 82709d40 691366f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2,7 +2,8 @@ service vendor.audio-hal-2-0 /vendor/bin/hw/android.hardware.audio@2.0-service
    class hal
    class hal
    user audioserver
    user audioserver
    # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
    # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
    group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct
    group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct wakelock
    capabilities BLOCK_SUSPEND
    ioprio rt 4
    ioprio rt 4
    writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
    writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
    # audioflinger restarts itself when it loses connection with the hal
    # audioflinger restarts itself when it loses connection with the hal
+11 −6
Original line number Original line Diff line number Diff line
@@ -106,7 +106,10 @@ using namespace ::android::hardware::audio::common::test::utility;
static auto okOrNotSupported = {Result::OK, Result::NOT_SUPPORTED};
static auto okOrNotSupported = {Result::OK, Result::NOT_SUPPORTED};
static auto okOrNotSupportedOrInvalidArgs = {Result::OK, Result::NOT_SUPPORTED,
static auto okOrNotSupportedOrInvalidArgs = {Result::OK, Result::NOT_SUPPORTED,
                                             Result::INVALID_ARGUMENTS};
                                             Result::INVALID_ARGUMENTS};
static auto okOrInvalidStateOrNotSupported = {Result::OK, Result::INVALID_STATE,
                                              Result::NOT_SUPPORTED};
static auto invalidArgsOrNotSupported = {Result::INVALID_ARGUMENTS, Result::NOT_SUPPORTED};
static auto invalidArgsOrNotSupported = {Result::INVALID_ARGUMENTS, Result::NOT_SUPPORTED};
static auto invalidStateOrNotSupported = {Result::INVALID_STATE, Result::NOT_SUPPORTED};


class AudioHidlTestEnvironment : public ::Environment {
class AudioHidlTestEnvironment : public ::Environment {
   public:
   public:
@@ -555,11 +558,11 @@ TEST_F(AudioPrimaryHidlTest, SetConnectedState) {
            address.device = deviceType;
            address.device = deviceType;
            auto ret = device->setConnectedState(address, state);
            auto ret = device->setConnectedState(address, state);
            ASSERT_TRUE(ret.isOk());
            ASSERT_TRUE(ret.isOk());
            if (res == Result::NOT_SUPPORTED) {
            if (ret == Result::NOT_SUPPORTED) {
                doc::partialTest("setConnectedState is not supported");
                doc::partialTest("setConnectedState is not supported");
                return;
                return;
            }
            }
            ASSERT_OK(res);
            ASSERT_OK(ret);
        }
        }
    }
    }
}
}
@@ -949,8 +952,6 @@ TEST_IO_STREAM(RemoveNonExistingEffect, "Removing a non existing effect should f
TEST_IO_STREAM(standby, "Make sure the stream can be put in stanby",
TEST_IO_STREAM(standby, "Make sure the stream can be put in stanby",
               ASSERT_OK(stream->standby()))  // can not fail
               ASSERT_OK(stream->standby()))  // can not fail


static constexpr auto invalidStateOrNotSupported = {Result::INVALID_STATE, Result::NOT_SUPPORTED};

TEST_IO_STREAM(startNoMmap, "Starting a mmaped stream before mapping it should fail",
TEST_IO_STREAM(startNoMmap, "Starting a mmaped stream before mapping it should fail",
               ASSERT_RESULT(invalidStateOrNotSupported, stream->start()))
               ASSERT_RESULT(invalidStateOrNotSupported, stream->start()))


@@ -1070,11 +1071,15 @@ TEST_P(InputStreamTest, GetInputFramesLost) {
TEST_P(InputStreamTest, getCapturePosition) {
TEST_P(InputStreamTest, getCapturePosition) {
    doc::test(
    doc::test(
        "The capture position of a non prepared stream should not be "
        "The capture position of a non prepared stream should not be "
        "retrievable");
        "retrievable or 0");
    uint64_t frames;
    uint64_t frames;
    uint64_t time;
    uint64_t time;
    ASSERT_OK(stream->getCapturePosition(returnIn(res, frames, time)));
    ASSERT_OK(stream->getCapturePosition(returnIn(res, frames, time)));
    ASSERT_RESULT(invalidStateOrNotSupported, res);
    ASSERT_RESULT(okOrInvalidStateOrNotSupported, res);
    if (res == Result::OK) {
        ASSERT_EQ(0U, frames);
        ASSERT_LE(0U, time);
    }
}
}


TEST_P(InputStreamTest, updateSinkMetadata) {
TEST_P(InputStreamTest, updateSinkMetadata) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -234,7 +234,7 @@
      <xs:field xpath="@library"/>
      <xs:field xpath="@library"/>
    </xs:keyref>
    </xs:keyref>
    <xs:key name="effectName">
    <xs:key name="effectName">
      <xs:selector xpath="aec:effects/aec:effect"/>
      <xs:selector xpath="aec:effects/aec:effect|aec:effects/aec:effectProxy"/>
      <xs:field xpath="@name"/>
      <xs:field xpath="@name"/>
    </xs:key>
    </xs:key>
    <xs:keyref name="effectNamePreRef" refer="aec:effectName">
    <xs:keyref name="effectNamePreRef" refer="aec:effectName">
+11 −3
Original line number Original line Diff line number Diff line
@@ -87,7 +87,6 @@ using ::android::hardware::camera::device::V3_2::ICameraDevice;
using ::android::hardware::camera::device::V3_2::BufferCache;
using ::android::hardware::camera::device::V3_2::BufferCache;
using ::android::hardware::camera::device::V3_2::CaptureRequest;
using ::android::hardware::camera::device::V3_2::CaptureRequest;
using ::android::hardware::camera::device::V3_2::CaptureResult;
using ::android::hardware::camera::device::V3_2::CaptureResult;
using ::android::hardware::camera::device::V3_2::ICameraDeviceCallback;
using ::android::hardware::camera::device::V3_2::ICameraDeviceSession;
using ::android::hardware::camera::device::V3_2::ICameraDeviceSession;
using ::android::hardware::camera::device::V3_2::NotifyMsg;
using ::android::hardware::camera::device::V3_2::NotifyMsg;
using ::android::hardware::camera::device::V3_2::RequestTemplate;
using ::android::hardware::camera::device::V3_2::RequestTemplate;
@@ -532,7 +531,7 @@ public:


 hidl_vec<hidl_string> getCameraDeviceNames(sp<ICameraProvider> provider);
 hidl_vec<hidl_string> getCameraDeviceNames(sp<ICameraProvider> provider);


 struct EmptyDeviceCb : public ICameraDeviceCallback {
 struct EmptyDeviceCb : public V3_4::ICameraDeviceCallback {
     virtual Return<void> processCaptureResult(
     virtual Return<void> processCaptureResult(
         const hidl_vec<CaptureResult>& /*results*/) override {
         const hidl_vec<CaptureResult>& /*results*/) override {
         ALOGI("processCaptureResult callback");
         ALOGI("processCaptureResult callback");
@@ -540,6 +539,13 @@ public:
         return Void();
         return Void();
     }
     }


     virtual Return<void> processCaptureResult_3_4(
         const hidl_vec<V3_4::CaptureResult>& /*results*/) override {
         ALOGI("processCaptureResult_3_4 callback");
         ADD_FAILURE();  // Empty callback should not reach here
         return Void();
     }

     virtual Return<void> notify(const hidl_vec<NotifyMsg>& /*msgs*/) override {
     virtual Return<void> notify(const hidl_vec<NotifyMsg>& /*msgs*/) override {
         ALOGI("notify callback");
         ALOGI("notify callback");
         ADD_FAILURE();  // Empty callback should not reach here
         ADD_FAILURE();  // Empty callback should not reach here
@@ -3643,6 +3649,7 @@ TEST_F(CameraHidlTest, processCaptureRequestBurstISO) {
                                        static_cast<int32_t>(PixelFormat::IMPLEMENTATION_DEFINED)};
                                        static_cast<int32_t>(PixelFormat::IMPLEMENTATION_DEFINED)};
    uint64_t bufferId = 1;
    uint64_t bufferId = 1;
    uint32_t frameNumber = 1;
    uint32_t frameNumber = 1;
    float isoTol = .03f;
    ::android::hardware::hidl_vec<uint8_t> settings;
    ::android::hardware::hidl_vec<uint8_t> settings;


    for (const auto& name : cameraDeviceNames) {
    for (const auto& name : cameraDeviceNames) {
@@ -3772,7 +3779,8 @@ TEST_F(CameraHidlTest, processCaptureRequestBurstISO) {
            ASSERT_TRUE(inflightReqs[i].collectedResult.exists(ANDROID_SENSOR_SENSITIVITY));
            ASSERT_TRUE(inflightReqs[i].collectedResult.exists(ANDROID_SENSOR_SENSITIVITY));
            camera_metadata_entry_t isoResult = inflightReqs[i].collectedResult.find(
            camera_metadata_entry_t isoResult = inflightReqs[i].collectedResult.find(
                    ANDROID_SENSOR_SENSITIVITY);
                    ANDROID_SENSOR_SENSITIVITY);
            ASSERT_TRUE(isoResult.data.i32[0] == isoValues[i]);
            ASSERT_TRUE(std::abs(isoResult.data.i32[0] - isoValues[i]) <=
                        std::round(isoValues[i]*isoTol));
        }
        }


        ret = session->close();
        ret = session->close();
+2 −1
Original line number Original line Diff line number Diff line
@@ -335,7 +335,7 @@ dd83be076b6b3f10ed62ab34d8c8b95f2415961fb785200eb842e7bfb2b0ee92 android.hardwar
675682dd3007805c985eaaec91612abc88f4c25b3431fb84070b7584a1a741fb android.hardware.health@2.0::IHealth
675682dd3007805c985eaaec91612abc88f4c25b3431fb84070b7584a1a741fb android.hardware.health@2.0::IHealth
434c4c32c00b0e54bb05e40c79503208b40f786a318029a2a4f66e34f10f2a76 android.hardware.health@2.0::IHealthInfoCallback
434c4c32c00b0e54bb05e40c79503208b40f786a318029a2a4f66e34f10f2a76 android.hardware.health@2.0::IHealthInfoCallback
c9e498f1ade5e26f00d290b4763a9671ec6720f915e7d592844b62e8cb1f9b5c android.hardware.health@2.0::types
c9e498f1ade5e26f00d290b4763a9671ec6720f915e7d592844b62e8cb1f9b5c android.hardware.health@2.0::types
201f9723353fdbd40bf3705537fb7e015e4c399879425e68688fe0f43606ea4d android.hardware.keymaster@4.0::IKeymasterDevice
6122abe9bc2e7868463d3787db2991c1e47cc01fe3e4cfb7293c5ba421ff8ad9 android.hardware.keymaster@4.0::IKeymasterDevice
1b7d2090c0a28b229d37c4b96160796b1f0d703950ac6ccc163fccd280830503 android.hardware.keymaster@4.0::types
1b7d2090c0a28b229d37c4b96160796b1f0d703950ac6ccc163fccd280830503 android.hardware.keymaster@4.0::types
6d5c646a83538f0f9d8438c259932509f4353410c6c76e56db0d6ca98b69c3bb android.hardware.media.bufferpool@1.0::IAccessor
6d5c646a83538f0f9d8438c259932509f4353410c6c76e56db0d6ca98b69c3bb android.hardware.media.bufferpool@1.0::IAccessor
b8c7ed58aa8740361e63d0ce9e7c94227572a629f356958840b34809d2393a7c android.hardware.media.bufferpool@1.0::IClientManager
b8c7ed58aa8740361e63d0ce9e7c94227572a629f356958840b34809d2393a7c android.hardware.media.bufferpool@1.0::IClientManager
@@ -388,3 +388,4 @@ cd4330c3196bda1d642a32abfe23a7d64ebfbda721940643af6867af3b3f0aa9 android.hardwar
1a5ae9793223658174258b523763c557abad6fb917df0b8e3cc097fc89035811 android.hardware.neuralnetworks@1.0::types
1a5ae9793223658174258b523763c557abad6fb917df0b8e3cc097fc89035811 android.hardware.neuralnetworks@1.0::types
4310eb8272f085914952f3bfb73a8f8bb477a80e8b93596f0ea5acb58546b66d android.hardware.neuralnetworks@1.1::types
4310eb8272f085914952f3bfb73a8f8bb477a80e8b93596f0ea5acb58546b66d android.hardware.neuralnetworks@1.1::types
1d19720d4fd38b1095f0f555a4bd92b3b12c9b1d0f560b0e9a474cd6dcc20db6 android.hardware.radio@1.2::IRadio
1d19720d4fd38b1095f0f555a4bd92b3b12c9b1d0f560b0e9a474cd6dcc20db6 android.hardware.radio@1.2::IRadio
1d4a5776614c08b5d794a5ec5ab04697260cbd4b3441d5935cd53ee71d19da02 android.hardware.radio@1.0::IRadioResponse
Loading