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

Commit ccd03b13 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "leaudio/json: Add examples for Game and Recording context types" am: d87035dd

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2073669



Change-Id: I11d98387fcbb3806c831232b8ee432f3a271024a
Ignore-AOSP-First: this is an automerge
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 915852c4 d87035dd
Loading
Loading
Loading
Loading
+711 −24

File changed.

Preview size limit exceeded, changes collapsed.

+26 −2
Original line number Diff line number Diff line
@@ -48,7 +48,9 @@
                "SingleDev_OneChanMonoSnk_OneChanMonoSrc_16_2_Server_Preferred",
                "SingleDev_OneChanMonoSnk_OneChanMonoSrc_16_2_1",
                "SingleDev_OneChanMonoSnk_OneChanMonoSrc_16_1_Server_Preferred",
                "SingleDev_OneChanMonoSnk_OneChanMonoSrc_16_1_1"
                "SingleDev_OneChanMonoSnk_OneChanMonoSrc_16_1_1",
                "VND_SingleDev_TwoChanStereoSnk_TwoChanStereoSrc_32khz_Server_Prefered_1",
                "VND_SingleDev_TwoChanStereoSnk_TwoChanStereoSrc_32khz_60oct_R3_L22_1"
            ]
        },
        {
@@ -77,7 +79,29 @@
                "SingleDev_OneChanMonoSnk_16_2_Server_Preferred",
                "SingleDev_OneChanMonoSnk_16_2_2",
                "SingleDev_OneChanMonoSnk_16_1_Server_Preferred",
                "SingleDev_OneChanMonoSnk_16_1_2"
                "SingleDev_OneChanMonoSnk_16_1_2",
                "VND_DualDev_OneChanStereoSnk_48khz_100octs_Server_Preferred_1",
                "VND_DualDev_OneChanStereoSnk_48khz_100octs_R15_L70_1",
                "VND_SingleDev_TwoChanStereoSnk_48khz_100octs_Server_Preferred_1",
                "VND_SingleDev_TwoChanStereoSnk_48khz_100octs_R15_L70_1",
                "VND_SingleDev_OneChanStereoSnk_48khz_100octs_Server_Preferred_1",
                "VND_SingleDev_OneChanStereoSnk_48khz_100octs_R15_L70_1"
            ]
        },
        {
            "name": "Game",
            "configurations": [
                "VND_SingleDev_TwoChanStereoSnk_48khz_75octs_TwoChanStereoSrc_16khz_30octs_Server_Preferred_1",
                "VND_SingleDev_TwoChanStereoSnk_48khz_75octs_R5_L12_TwoChanStereoSrc_16khz_30octs_R3_L12_1",
                "VND_SingleDev_TwoChanStereoSnk_48khz_75octs_Server_Preferred_1",
                "VND_SingleDev_TwoChanStereoSnk_48khz_75octs_R5_L12_1"
            ]
        },
        {
            "name": "Recording",
            "configurations": [
                "VND_SingleDev_TwoChanStereoSrc_48khz_100octs_Server_Preferred_1",
                "VND_SingleDev_TwoChanStereoSrc_48khz_100octs_R11_L40_1"
            ]
        },
        {
+11 −1
Original line number Diff line number Diff line
@@ -188,6 +188,7 @@ enum class Lc3SettingId {
  LC3_48_4,
  LC3_48_5,
  LC3_48_6,
  LC3_VND_1,
  _END,
  UNSUPPORTED = _END,
};
@@ -206,7 +207,8 @@ bool IsLc3SettingSupported(LeAudioContextType context_type, Lc3SettingId id) {

    case LeAudioContextType::MEDIA:
      if (id == Lc3SettingId::LC3_16_1 || id == Lc3SettingId::LC3_16_2 ||
          id == Lc3SettingId::LC3_48_4)
          id == Lc3SettingId::LC3_48_4 || id == Lc3SettingId::LC3_48_2 ||
          id == Lc3SettingId::LC3_VND_1)
        return true;

      break;
@@ -244,6 +246,7 @@ uint8_t GetSamplingFrequency(Lc3SettingId id) {
    case Lc3SettingId::LC3_48_4:
    case Lc3SettingId::LC3_48_5:
    case Lc3SettingId::LC3_48_6:
    case Lc3SettingId::LC3_VND_1:
      return ::le_audio::codec_spec_conf::kLeAudioSamplingFreq48000Hz;
    case Lc3SettingId::UNSUPPORTED:
      return kLeAudioSamplingFreqRfu;
@@ -270,6 +273,7 @@ uint8_t GetFrameDuration(Lc3SettingId id) {
    case Lc3SettingId::LC3_48_2:
    case Lc3SettingId::LC3_48_4:
    case Lc3SettingId::LC3_48_6:
    case Lc3SettingId::LC3_VND_1:
      return ::le_audio::codec_spec_conf::kLeAudioCodecLC3FrameDur10000us;
    case Lc3SettingId::UNSUPPORTED:
      return kLeAudioCodecLC3FrameDurRfu;
@@ -300,6 +304,7 @@ uint16_t GetOctetsPerCodecFrame(Lc3SettingId id) {
    case Lc3SettingId::LC3_48_1:
      return 75;
    case Lc3SettingId::LC3_48_2:
    case Lc3SettingId::LC3_VND_1:
      return 100;
    case Lc3SettingId::LC3_48_3:
      return 90;
@@ -519,6 +524,11 @@ class LeAudioAseConfigurationTest : public Test {
                             data[i].active_channel_num_src) > 0;

        /* Prepare PAC's */
        /* Note this test requires that reach TwoStereoChan configuration
         * version has similar version for OneStereoChan (both SingleDev,
         * DualDev). This is just how the test is created and this limitation
         * should be removed b/230107540
         */
        PublishedAudioCapabilitiesBuilder snk_pac_builder, src_pac_builder;
        for (const auto& entry : (*audio_set_conf).confs) {
          if (entry.direction == kLeAudioDirectionSink) {
+2 −0
Original line number Diff line number Diff line
@@ -481,6 +481,8 @@ struct AudioSetConfigurationProviderJson {
            {"Media", types::LeAudioContextType::MEDIA},
            {"Conversational", types::LeAudioContextType::CONVERSATIONAL},
            {"Ringtone", types::LeAudioContextType::RINGTONE},
            {"Recording", types::LeAudioContextType::LIVE},
            {"Game", types::LeAudioContextType::GAME},
            {"Default", types::LeAudioContextType::UNSPECIFIED},
        };
    return scenarios.count(scenario) ? scenarios.at(scenario)