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

Commit d9aead06 authored by Jack He's avatar Jack He Committed by Automerger Merge Worker
Browse files

Merge "le_audio: Use bi-directional scenario for ringtone for ringtone" am: 06fcff55

parents 6b4891e7 06fcff55
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -8,6 +8,20 @@
        {
            "name": "Ringtone",
            "configurations": [
                "DualDev_OneChanStereoSnk_OneChanStereoSrc_32_2_Server_Preferred",
                "DualDev_OneChanStereoSnk_OneChanStereoSrc_32_2_1",
                "DualDev_OneChanStereoSnk_OneChanMonoSrc_32_2_Server_Preferred",
                "DualDev_OneChanStereoSnk_OneChanMonoSrc_32_2_1",
                "DualDev_OneChanDoubleStereoSnk_OneChanMonoSrc_32_2_Server_Preferred",
                "DualDev_OneChanDoubleStereoSnk_OneChanMonoSrc_32_2_1",
                "SingleDev_TwoChanStereoSnk_TwoChanStereoSrc_32_2_Server_Preferred",
                "SingleDev_TwoChanStereoSnk_TwoChanStereoSrc_32_2_1",
                "SingleDev_TwoChanStereoSnk_OneChanMonoSrc_32_2_Server_Preferred",
                "SingleDev_TwoChanStereoSnk_OneChanMonoSrc_32_2_1",
                "SingleDev_OneChanStereoSnk_OneChanMonoSrc_32_2_Server_Preferred",
                "SingleDev_OneChanStereoSnk_OneChanMonoSrc_32_2_1",
                "SingleDev_OneChanMonoSnk_OneChanMonoSrc_32_2_Server_Preferred",
                "SingleDev_OneChanMonoSnk_OneChanMonoSrc_32_2_1",
                "DualDev_OneChanStereoSnk_16_2_Server_Preferred",
                "DualDev_OneChanStereoSnk_16_2_1",
                "DualDev_OneChanStereoSnk_16_1_Server_Preferred",
+11 −10
Original line number Diff line number Diff line
@@ -199,7 +199,8 @@ bool IsLc3SettingSupported(LeAudioContextType context_type, Lc3SettingId id) {
  /* Update those values, on any change of codec linked with content type */
  switch (context_type) {
    case LeAudioContextType::RINGTONE:
      if (id == Lc3SettingId::LC3_16_1 || id == Lc3SettingId::LC3_16_2)
      if (id == Lc3SettingId::LC3_16_2 || id == Lc3SettingId::LC3_16_1 ||
          id == Lc3SettingId::LC3_32_2)
        return true;

      break;
@@ -694,10 +695,10 @@ class LeAudioAseConfigurationTest : public Test {
};

TEST_F(LeAudioAseConfigurationTest, test_mono_speaker_ringtone) {
  LeAudioDevice* mono_speaker = AddTestDevice(1, 0);
  TestGroupAseConfigurationData data({mono_speaker,
                                      kLeAudioCodecLC3ChannelCountSingleChannel,
                                      kLeAudioCodecLC3ChannelCountNone, 1, 0});
  LeAudioDevice* mono_speaker = AddTestDevice(1, 1);
  TestGroupAseConfigurationData data(
      {mono_speaker, kLeAudioCodecLC3ChannelCountSingleChannel,
       kLeAudioCodecLC3ChannelCountSingleChannel, 1, 0});

  TestGroupAseConfiguration(LeAudioContextType::RINGTONE, &data, 1);
}
@@ -721,10 +722,10 @@ TEST_F(LeAudioAseConfigurationTest, test_mono_speaker_media) {
}

TEST_F(LeAudioAseConfigurationTest, test_bounded_headphones_ringtone) {
  LeAudioDevice* bounded_headphones = AddTestDevice(2, 0);
  TestGroupAseConfigurationData data({bounded_headphones,
                                      kLeAudioCodecLC3ChannelCountTwoChannel,
                                      kLeAudioCodecLC3ChannelCountNone, 2, 0});
  LeAudioDevice* bounded_headphones = AddTestDevice(2, 1);
  TestGroupAseConfigurationData data(
      {bounded_headphones, kLeAudioCodecLC3ChannelCountTwoChannel,
       kLeAudioCodecLC3ChannelCountSingleChannel, 2, 0});

  TestGroupAseConfiguration(LeAudioContextType::RINGTONE, &data, 1);
}
@@ -857,7 +858,7 @@ TEST_F(LeAudioAseConfigurationTest, test_handsfree_media) {
}

TEST_F(LeAudioAseConfigurationTest, test_lc3_config_ringtone) {
  AddTestDevice(1, 0);
  AddTestDevice(1, 1);

  TestLc3CodecConfig(LeAudioContextType::RINGTONE);
}