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

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

leaudio: Add history logs

15:24:52.492 CONN_STATE     GID 1    CONNECTING_AUTOCONNECT (0x07) --> : xx:xx:xx:xx:13:0d      ->CONNECTED_AUTOCONNECT_GETTING_READY (0x08)
15:24:52.978 CONN_STATE     GID 1    CONNECTED_AUTOCONNECT_GETTING_READ: xx:xx:xx:xx:02:57      ->CONNECTED (0x01)
15:24:54.206 CONN_STATE     GID 1    CONNECTED_AUTOCONNECT_GETTING_READ: xx:xx:xx:xx:13:0d      ->CONNECTED (0x01)
15:25:06.966 SM             GID 1    TARGET STATE CHANGED              : 00:00:00:00:00:00      IDLE (0x00)->STREAMING (0x04)
15:25:06.966 SM             GID 1    WATCHDOG STARTED                  : 00:00:00:00:00:00
15:25:06.967 ASCS_CP_CMD    GID 1    CODEC_CONFIG: ASE_ID 1,           : xx:xx:xx:xx:13:0d      snk,6,3;;
15:25:06.967 ASCS_CP_CMD    GID 1    CODEC_CONFIG: ASE_ID 1,           : xx:xx:xx:xx:02:57      snk,6,3;;
15:25:07.045 ASE_NOTIF      GID 1    ASE_ID 1: CODEC_CONFIGURED (0x01) : xx:xx:xx:xx:13:0d      curr: IDLE (0x00)
15:25:07.045 SM             GID 1    ASE_ID 1: STATE CHANGED           : xx:xx:xx:xx:13:0d      IDLE (0x00)->CODEC_CONFIGURED (0x01)
15:25:07.070 ASE_NOTIF      GID 1    ASE_ID 1: CODEC_CONFIGURED (0x01) : xx:xx:xx:xx:02:57      curr: IDLE (0x00)
15:25:07.070 SM             GID 1    ASE_ID 1: STATE CHANGED           : xx:xx:xx:xx:02:57      IDLE (0x00)->CODEC_CONFIGURED (0x01)
15:25:07.070 SM             GID 1    STATE CHANGED                     : 00:00:00:00:00:00      IDLE (0x00)->CODEC_CONFIGURED (0x01)
15:25:07.070 SM             GID 1    CIG_CREATE:#CIS: 2                : 00:00:00:00:00:00
15:25:07.071 HCI_EVENT      GID 1    CIS_CREATE: STATUS=0              : 00:00:00:00:00:00
15:25:07.071 SM             GID 1    STATE CHANGED                     : 00:00:00:00:00:00      CODEC_CONFIGURED (0x01)->QOS_CONFIGURED (0x02)
15:25:07.071 ASCS_CP_CMD    GID 1    QOS_CONFIG: ASE 1,                : xx:xx:xx:xx:13:0d      snk,0,120,100,13,2,0;;
15:25:07.071 ASCS_CP_CMD    GID 1    QOS_CONFIG: ASE 1,                : xx:xx:xx:xx:02:57      snk,1,120,100,13,2,0;;
15:25:07.130 ASE_NOTIF      GID 1    ASE_ID 1: QOS_CONFIGURED (0x02)   : xx:xx:xx:xx:02:57      curr: CODEC_CONFIGURED (0x01)

Bug: 276693370
Test: Manual
Tag: #feature
Change-Id: Ib576b7e3fb07524f42bd98daea12bf576cfc416c
parent 2bdbb4a8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -586,6 +586,7 @@ cc_test {
        "le_audio/content_control_id_keeper_test.cc",
        "le_audio/devices.cc",
        "le_audio/devices_test.cc",
        "le_audio/le_audio_log_history.cc",
        "le_audio/le_audio_set_configuration_provider_json.cc",
        "le_audio/le_audio_types.cc",
        "le_audio/le_audio_types_test.cc",
@@ -656,6 +657,7 @@ cc_test {
        "le_audio/client_parser.cc",
        "le_audio/content_control_id_keeper.cc",
        "le_audio/devices.cc",
        "le_audio/le_audio_log_history.cc",
        "le_audio/le_audio_utils.cc",
        "le_audio/le_audio_client_test.cc",
        "le_audio/le_audio_set_configuration_provider_json.cc",
+1 −0
Original line number Diff line number Diff line
@@ -5177,6 +5177,7 @@ void LeAudioClient::DebugDump(int fd) {
  LeAudioSourceAudioHalClient::DebugDump(fd);
  le_audio::AudioSetConfigurationProvider::DebugDump(fd);
  IsoManager::GetInstance()->Dump(fd);
  LeAudioLogHistory::DebugDump(fd);
  dprintf(fd, "\n");
}

+5 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include "btm_iso_api_types.h"
#include "device/include/controller.h"
#include "gd/common/strings.h"
#include "le_audio_log_history.h"
#include "le_audio_set_configuration_provider.h"
#include "metrics_collector.h"
#include "osi/include/log.h"
@@ -2168,6 +2169,10 @@ void LeAudioDevice::SetConnectionState(DeviceConnectState state) {
  LOG_DEBUG("%s, %s --> %s", ADDRESS_TO_LOGGABLE_CSTR(address_),
            bluetooth::common::ToString(connection_state_).c_str(),
            bluetooth::common::ToString(state).c_str());
  LeAudioLogHistory::Get()->AddLogHistory(
      kLogConnectionTag, group_id_, address_,
      bluetooth::common::ToString(connection_state_) + " -> ",
      "->" + bluetooth::common::ToString(state));
  connection_state_ = state;
}

+11 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@
#include "bta_groups.h"
#include "btm_iso_api_types.h"
#include "gatt_api.h"
#include "gd/common/strings.h"
#include "le_audio_log_history.h"
#include "le_audio_types.h"
#include "osi/include/alarm.h"
#include "osi/include/properties.h"
@@ -353,6 +355,10 @@ class LeAudioDeviceGroup {
  void SetState(types::AseState state) {
    LOG(INFO) << __func__ << " current state: " << current_state_
              << " new state: " << state;
    LeAudioLogHistory::Get()->AddLogHistory(
        kLogStateMachineTag, group_id_, RawAddress::kEmpty, kLogStateChangedOp,
        bluetooth::common::ToString(current_state_) + "->" +
            bluetooth::common::ToString(state));
    current_state_ = state;
  }

@@ -360,6 +366,11 @@ class LeAudioDeviceGroup {
  void SetTargetState(types::AseState state) {
    LOG(INFO) << __func__ << " target state: " << target_state_
              << " new target state: " << state;
    LeAudioLogHistory::Get()->AddLogHistory(
        kLogStateMachineTag, group_id_, RawAddress::kEmpty,
        kLogTargetStateChangedOp,
        bluetooth::common::ToString(target_state_) + "->" +
            bluetooth::common::ToString(state));
    target_state_ = state;
  }

+223 −39

File changed.

Preview size limit exceeded, changes collapsed.