Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix metadata issue when reconnect pixel #2578

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
From e90398f298828ef752e3fafbb94ee3375905b923 Mon Sep 17 00:00:00 2001
From: Gowtham Anandha Babu <[email protected]>
Date: Tue, 20 Aug 2024 22:32:22 +0530
Subject: [PATCH] Fix metadata issue when reconnect pixel

When reconnecting pixel some times metadata is not synced.
bt-stack issuing two AVRC browse channel, one as acceptor,
other as initiator, which is causing collision in lcid and resulting
in l2cap disconnection of avrc browse channel, resulting in metadata
sync issue.

Don't initiate avrc browse channel as initiator, open only
as acceptor. Now browse channel is always success and metadata is
seen everytime.

Tests-done:
1. Flash BM
2. Connect Pixel
3. Play Music and do adb reboot
4. Everytime the metadata should sync on home screen
5. Trail 20 times

Tracked-On: OAM-123252
Signed-off-by: Gowtham Anandha Babu <[email protected]>
---
system/bta/av/bta_av_act.cc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/system/bta/av/bta_av_act.cc b/system/bta/av/bta_av_act.cc
index c639502852..9db796164f 100644
--- a/system/bta/av/bta_av_act.cc
+++ b/system/bta/av/bta_av_act.cc
@@ -587,8 +587,13 @@ void bta_av_rc_opened(tBTA_AV_CB* p_cb, tBTA_AV_DATA* p_data) {
if ((p_cb->features & BTA_AV_FEAT_BROWSE) &&
(rc_open.peer_features & BTA_AV_FEAT_BROWSE) &&
((p_cb->rcb[i].status & BTA_AV_RC_ROLE_MASK) == BTA_AV_RC_ROLE_INT)) {
- APPL_TRACE_DEBUG("%s: opening AVRC Browse channel", __func__);
- AVRC_OpenBrowse(p_data->rc_conn_chg.handle, AVCT_INT);
+ APPL_TRACE_DEBUG("%s: Not opening AVRC Browse channel as INT", __func__);
+ /* Commenting the below line as for IVI use case, for A2DP SNK, we dont
+ * support browsing channel. So no need to open browsing channel as
+ * INITIATOR. Revert this when have logic to resolve this conflict in
+ * stack/avct.
+ */
+ //AVRC_OpenBrowse(p_data->rc_conn_chg.handle, AVCT_INT);
}
}

--
2.17.1