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

Commit 37791bec authored by Grzegorz Kołodziejczyk's avatar Grzegorz Kołodziejczyk Committed by Grzegorz Kolodziejczyk
Browse files

le_audio: Handle re-configuration case while sink monitoring

While monitoring sink stream and re-configuration happens there are two
possibilities: new configuration would be bi-directional (with sink), or
uni-directional (without sink). If new configuration would be
uni-directional (without sink) a stream suspended notification should be
send to service.

Tag: #feature
Test: atest bluetooth_le_audio_client_test
Bug: 298080973
Bug: 308171251
Change-Id: Ib9ac4ec1e4ca8e4da67217045e0321604c1d3266
parent 4811fbb3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -5489,6 +5489,14 @@ class LeAudioClientImpl : public LeAudioClient {
                kLeAudioContextAllRemoteSource.test(configuration_context_type_)
                    ? le_audio::types::kLeAudioDirectionSource
                    : le_audio::types::kLeAudioDirectionSink;

            /* Reconfiguration to non requiring source scenario */
            if (sink_monitor_mode_ &&
                (remote_direction == le_audio::types::kLeAudioDirectionSink)) {
              notifyAudioLocalSink(
                  UnicastMonitorModeStatus::STREAMING_SUSPENDED);
            }

            auto remote_contexts =
                DirectionalRealignMetadataAudioContexts(group, remote_direction);
            ApplyRemoteMetadataAudioContextPolicy(group, remote_contexts,