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

Commit 61bbf15a authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "libaudiohal: implement supportsBluetoothVariableLatency for HIDL" into...

Merge "libaudiohal: implement supportsBluetoothVariableLatency for HIDL" into udc-qpr-dev am: 1a8e2a36

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/23873624



Change-Id: Ib573ae06940c695c2351e65639b2299116d93e0d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 148b7dde 1a8e2a36
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -996,7 +996,7 @@ status_t DeviceHalAidl::dump(int fd, const Vector<String16>& args) {
    return mModule->dump(fd, Args(args).args(), args.size());
}

int32_t DeviceHalAidl::supportsBluetoothVariableLatency(bool* supports) {
status_t DeviceHalAidl::supportsBluetoothVariableLatency(bool* supports) {
    TIME_CHECK();
    if (!mModule) return NO_INIT;
    if (supports == nullptr) {
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ class DeviceHalAidl : public DeviceHalInterface, public ConversionHelperAidl,

    error::Result<audio_hw_sync_t> getHwAvSync() override;

    int32_t supportsBluetoothVariableLatency(bool* supports __unused) override;
    status_t supportsBluetoothVariableLatency(bool* supports __unused) override;

    status_t getSoundDoseInterface(const std::string& module,
                                   ::ndk::SpAIBinder* soundDoseBinder) override;
+22 −0
Original line number Diff line number Diff line
@@ -684,4 +684,26 @@ status_t DeviceHalHidl::getSoundDoseInterface(const std::string& module,
}
#endif

status_t DeviceHalHidl::supportsBluetoothVariableLatency(bool* supports) {
    if (supports == nullptr) {
        return BAD_VALUE;
    }
    *supports = false;

    String8 reply;
    status_t status = getParameters(
            String8(AUDIO_PARAMETER_BT_VARIABLE_LATENCY_SUPPORTED), &reply);
    if (status != NO_ERROR) {
        return status;
    }
    AudioParameter replyParams(reply);
    String8 trueOrFalse;
    status = replyParams.get(
            String8(AUDIO_PARAMETER_BT_VARIABLE_LATENCY_SUPPORTED), trueOrFalse);
    if (status != NO_ERROR) {
        return status;
    }
    *supports = trueOrFalse == AudioParameter::valueTrue;
    return NO_ERROR;
}
} // namespace android
+1 −4
Original line number Diff line number Diff line
@@ -127,10 +127,7 @@ class DeviceHalHidl : public DeviceHalInterface, public CoreConversionHelperHidl
        return INVALID_OPERATION;
    }

    int32_t supportsBluetoothVariableLatency(bool* supports __unused) override {
        // TODO: Implement the HAL query when moving to AIDL HAL.
        return INVALID_OPERATION;
    }
    status_t supportsBluetoothVariableLatency(bool* supports) override;

    status_t setConnectedState(const struct audio_port_v7 *port, bool connected) override;

+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ class DeviceHalInterface : public virtual RefBase
    virtual int32_t getAAudioMixerBurstCount() = 0;
    virtual int32_t getAAudioHardwareBurstMinUsec() = 0;

    virtual int32_t supportsBluetoothVariableLatency(bool* supports) = 0;
    virtual status_t supportsBluetoothVariableLatency(bool* supports) = 0;

    // Update the connection status of an external device.
    virtual status_t setConnectedState(const struct audio_port_v7* port, bool connected) = 0;