From b17fcf9c9848401d22e83e996bd51b651892a4d3 Mon Sep 17 00:00:00 2001 From: Stanley Tng Date: Wed, 10 Oct 2018 18:57:29 -0700 Subject: [PATCH] Add more Hearing Aid Profile logs Add more logs to debug the TimeCheck timeout crash issues. Bug: 117349352 Test: Manual run Change-Id: I3a05ca975e41ab002e466150f3f3f28ba0f037df (cherry picked from commit 05cc6c7e97ecebd3e031f09e74f730641423ae13) Merged-In: I3a05ca975e41ab002e466150f3f3f28ba0f037df --- audio_a2dp_hw/src/audio_a2dp_hw.cc | 2 ++ bta/hearing_aid/hearing_aid_audio_source.cc | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/audio_a2dp_hw/src/audio_a2dp_hw.cc b/audio_a2dp_hw/src/audio_a2dp_hw.cc index 3622298e3..0e1a3c2c7 100644 --- a/audio_a2dp_hw/src/audio_a2dp_hw.cc +++ b/audio_a2dp_hw/src/audio_a2dp_hw.cc @@ -1680,6 +1680,8 @@ static void adev_close_output_stream(struct audio_hw_device* dev, struct a2dp_audio_device* a2dp_dev = (struct a2dp_audio_device*)dev; struct a2dp_stream_out* out = (struct a2dp_stream_out*)stream; + INFO("%s: state %d", __func__, out->common.state); + // prevent interference with adev_set_parameters. std::lock_guard lock(*a2dp_dev->mutex); { diff --git a/bta/hearing_aid/hearing_aid_audio_source.cc b/bta/hearing_aid/hearing_aid_audio_source.cc index e03b04043..3254117c4 100644 --- a/bta/hearing_aid/hearing_aid_audio_source.cc +++ b/bta/hearing_aid/hearing_aid_audio_source.cc @@ -129,7 +129,7 @@ void hearing_aid_recv_ctrl_data() { return; } - VLOG(2) << __func__ << " " << audio_ha_hw_dump_ctrl_event(cmd); + LOG(INFO) << __func__ << " " << audio_ha_hw_dump_ctrl_event(cmd); // a2dp_cmd_pending = cmd; switch (cmd) { @@ -245,8 +245,9 @@ void hearing_aid_recv_ctrl_data() { hearing_aid_send_ack(HEARING_AID_CTRL_ACK_FAILURE); break; } - VLOG(2) << __func__ << " a2dp-ctrl-cmd : " << audio_ha_hw_dump_ctrl_event(cmd) - << " DONE"; + LOG(INFO) << __func__ + << " a2dp-ctrl-cmd : " << audio_ha_hw_dump_ctrl_event(cmd) + << " DONE"; } void hearing_aid_ctrl_cb(tUIPC_CH_ID, tUIPC_EVENT event) { -- 2.11.0