Skip to content

Commit

Permalink
framework/avrcp: get metadata when NOTIFICATION_EVT_TRACK_CHANGED
Browse files Browse the repository at this point in the history
bug: v/42362

Rootcause: Get metadata when NOTIFICATION_EVT_TRACK_CHANGED received.

Signed-off-by: zhangyuan20 <[email protected]>
  • Loading branch information
further20 committed Jan 3, 2025
1 parent d2a402e commit c825a08
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions service/profiles/avrcp/control/avrcp_control_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ static void handle_avrcp_get_capability_response(avrcp_msg_t* msg)
case NOTIFICATION_EVT_VOLUME_CHANGED:
/* don't work on controller role */
break;
case NOTIFICATION_EVT_TRACK_CHANGED:
bt_sal_avrcp_control_register_notification(addr, *cap, 0);
break;
default:
break;
}
Expand Down Expand Up @@ -412,6 +415,11 @@ static void handle_avrcp_register_notification_response(avrcp_msg_t* msg)
/* don't work on controller role */
break;
}
case NOTIFICATION_EVT_TRACK_CHANGED: {
BT_LOGD("track changed, get track info now...");
bt_sal_avrcp_control_get_element_attributes(addr, 0, NULL);
break;
}
default:
break;
}
Expand Down

0 comments on commit c825a08

Please sign in to comment.