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

Commit 91ca65c3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "audio: Add supportsBluetoothVariableLatency API to IModule"

parents 8a6e09c7 e2432ea1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ interface IModule {
  void addDeviceEffect(int portConfigId, in android.hardware.audio.effect.IEffect effect);
  void removeDeviceEffect(int portConfigId, in android.hardware.audio.effect.IEffect effect);
  android.media.audio.common.AudioMMapPolicyInfo[] getMmapPolicyInfos(android.media.audio.common.AudioMMapPolicyType mmapPolicyType);
  boolean supportsVariableLatency();
  @VintfStability
  parcelable OpenInputStreamArguments {
    int portConfigId;
+11 −0
Original line number Diff line number Diff line
@@ -822,4 +822,15 @@ interface IModule {
     * @return The vector with mmap policy information.
     */
    AudioMMapPolicyInfo[] getMmapPolicyInfos(AudioMMapPolicyType mmapPolicyType);

    /**
     * Indicates if this module supports variable latency control for instance
     * over Bluetooth A2DP or LE Audio links.
     *
     * If supported, all instances of IStreamOut interface returned by this module must
     * implement getRecommendedLatencyModes() and setLatencyMode() APIs.
     *
     * @return Whether the module supports variable latency control.
     */
    boolean supportsVariableLatency();
}
+4 −2
Original line number Diff line number Diff line
@@ -157,7 +157,8 @@ interface IStreamOut {
     *
     * Implementation for this method is mandatory only on specific spatial
     * audio streams indicated by AUDIO_OUTPUT_FLAG_SPATIALIZER flag if they can
     * be routed to a BT classic sink.
     * be routed to a BT sinks or if the implementation indicates support
     * on all streams via IModule.supportsVariableLatency().
     *
     * @return Currently supported latency modes.
     * @throws EX_ILLEGAL_STATE If the stream is closed.
@@ -172,7 +173,8 @@ interface IStreamOut {
     *
     * Implementation for this method is mandatory only on specific spatial
     * audio streams indicated by AUDIO_OUTPUT_FLAG_SPATIALIZER flag if they can
     * be routed to a BT classic sink.
     * be routed to a BT sinks or if the implementation indicates support
     * on all streams via IModule.supportsVariableLatency().
     *
     * @throws EX_ILLEGAL_ARGUMENT If the specified mode is not supported.
     * @throws EX_ILLEGAL_STATE If the stream is closed.
+6 −0
Original line number Diff line number Diff line
@@ -1145,4 +1145,10 @@ ndk::ScopedAStatus Module::getMmapPolicyInfos(AudioMMapPolicyType mmapPolicyType
    return ndk::ScopedAStatus::ok();
}

ndk::ScopedAStatus Module::supportsVariableLatency(bool* _aidl_return) {
    LOG(DEBUG) << __func__;
    *_aidl_return = false;
    return ndk::ScopedAStatus::ok();
}

}  // namespace aidl::android::hardware::audio::core
+1 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ class Module : public BnModule {
            ::aidl::android::media::audio::common::AudioMMapPolicyType mmapPolicyType,
            std::vector<::aidl::android::media::audio::common::AudioMMapPolicyInfo>* _aidl_return)
            override;
    ndk::ScopedAStatus supportsVariableLatency(bool* _aidl_return) override;

    void cleanUpPatch(int32_t patchId);
    ndk::ScopedAStatus createStreamContext(
Loading