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

Commit bb70911e authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Fix dumpsys direction printing

It fixes direction print for TWS and minor formating fix

 == Group id: 3 == , Active
      state: IDLE (0x00),       target state: IDLE (0x00),      cig state: NONE (0x00)
      group available contexts: UNSPECIFIED | CONVERSATIONAL | MEDIA | GAME (0x000f)
      configuration context type: MEDIA
      active configuration name: SingleDev_OneChanStereoSnk_48_4_High_Reliability
      stream configuration: SingleDev_OneChanStereoSnk_48_4_High_Reliability
      codec id: 0,      pending_configuration: 0
      num of devices(connected): 1(1)
,     num of sinks(connected): 0(0)
      num of sources(connected): 0(0)
      allocated CISes: 0
      == devices: ==
        address: xx:xx:xx:xx:be:bc: CONNECTED (0x01): 1035, acl_handle: 64, left/right, Encrypted,mtu: 512
        number of ases_: 3
        == ASEs ==
        id  active dir     cis_id  cis_handle  sdu  latency rtn  state
        1   false  sink    255     0           120  100     13   IDLE (0x00)
        2   false  sink    255     0           120  100     13   IDLE (0x00)
        3   false  source  255     0           0    0       0    IDLE (0x00)
        ====

Bug: none
Test: manual/compile
Tag: #feature

Change-Id: Id5a0f3fe1cc5461cd0843198178742399fa4fb13
parent f0e6955b
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -2061,9 +2061,10 @@ void LeAudioDeviceGroup::Dump(int fd, int active_group_id) {
         << "      state: " << GetState()
         << ",\ttarget state: " << GetTargetState()
         << ",\tcig state: " << cig_state_ << "\n"
         << "      group available contexts: " << GetAvailableContexts()
         << "      group available contexts: " << GetAvailableContexts() << "\n"
         << "      configuration context type: "
         << bluetooth::common::ToString(GetConfigurationContextType()).c_str()
         << "\n"
         << "      active configuration name: "
         << (active_conf ? active_conf->name : " not set") << "\n"
         << "      stream configuration: "
@@ -2580,6 +2581,12 @@ void LeAudioDevice::Dump(int fd) {
  std::string location = "unknown location";

  if (snk_audio_locations_.to_ulong() &
          codec_spec_conf::kLeAudioLocationAnyLeft &&
      snk_audio_locations_.to_ulong() &
          codec_spec_conf::kLeAudioLocationAnyRight) {
    std::string location_left_right = "left/right";
    location.swap(location_left_right);
  } else if (snk_audio_locations_.to_ulong() &
             codec_spec_conf::kLeAudioLocationAnyLeft) {
    std::string location_left = "left";
    location.swap(location_left);