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

Skip to content
Commit a40f1c38 authored by Cheney Ni's avatar Cheney Ni
Browse files

A2DP: Report codec configurations after retrieved all capabilities

When we are an A2DP source, the audio framework needs the codec report
to restart our input, and we also use this information to determinate
whether a user codec preference is acceptable or not. We
unconditionally send the event before. However, if we were late to
retrieve all capabilities from an active peer, there was no reports to
upper layer. Now there are report events by following conditions:

* The stack (AVDTP SRC) gets all codec capabilities of a sink.
  Before this change, there was only a report when we were the initiator
  to do AVDTP_SetConfig by BtaAvCo::SelectSourceCodec(), and now we
  send the report after retrieved remote's all capabilities.
* Get the codec configuration from OTA when remote does AVDTP_SetConfig.
* The stack is (re)starting a new audio HAL session for A2DP, and we use
  this event to inform the Media Framework about the change of selected
  codec. This happens when changing the active peer / changing the codec
  configuration of active peer.
* User changes the codec config of a none active peer.
* Failed to apply the user / audio codec preference.

This CL also touched some logging message to be C++ style.

Bug: 139338503
Test: 1. manually reconnected from remote and local.
      2. changing the selected codec configuration.
Change-Id: Ia15d03c500b3fd961be41afd9e40999a161e21ef
parent d91c695b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment