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

Commit 846a56a0 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Allow unidirectional GAME context.

When remote device supports GAME on only one direction,
stack will respect it.

Bug: 351974325
Bug: 313054645
Test: atest bluetooth_le_audio_client_test bluetooth_le_audio_test
Flag: com.android.bluetooth.flags.leaudio_multicodec_aidl_support

Change-Id: Idd5f9fdd0f645d452e348afd539b20636d84ec61
parent dbd08078
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -828,8 +828,10 @@ LeAudioDeviceGroup::GetAudioSetConfigurationRequirements(types::LeAudioContextTy
        continue;
      }

      if (com::android::bluetooth::flags::le_audio_support_unidirectional_voice_assistant() &&
          ctx_type == types::LeAudioContextType::VOICEASSISTANTS) {
      if ((com::android::bluetooth::flags::le_audio_support_unidirectional_voice_assistant() &&
           ctx_type == types::LeAudioContextType::VOICEASSISTANTS) ||
          (com::android::bluetooth::flags::leaudio_multicodec_aidl_support() &&
           ctx_type == types::LeAudioContextType::GAME)) {
        // For GAME and VOICE ASSISTANT, ignore direction if it is not supported only on a single
        // direction.
        auto group_contexts = GetSupportedContexts(types::kLeAudioDirectionBoth);
@@ -1414,7 +1416,8 @@ bool LeAudioDeviceGroup::IsAudioSetConfigurationSupported(
      continue;
    }

    if (com::android::bluetooth::flags::le_audio_support_unidirectional_voice_assistant()) {
    if (com::android::bluetooth::flags::le_audio_support_unidirectional_voice_assistant() ||
        com::android::bluetooth::flags::leaudio_multicodec_aidl_support()) {
      // Verify the direction requirements.
      if (direction == types::kLeAudioDirectionSink &&
          requirements.sink_requirements->size() == 0) {