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

Commit 92615a2c authored by Andre Eisenbach's avatar Andre Eisenbach Committed by Android Git Automerger
Browse files

am 17d9ebbd: Avoid race condition in SBC encoder initialization

* commit '17d9ebbd':
  Avoid race condition in SBC encoder initialization
parents 98259263 17d9ebbd
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -562,12 +562,7 @@ static BOOLEAN btif_av_state_opened_handler(btif_sm_event_t event, void *p_data)
            break;

        case BTIF_AV_START_STREAM_REQ_EVT:
            if (btif_av_cb.peer_sep == AVDT_TSEP_SRC)
            {
                BTA_AvStart();
                btif_av_cb.flags |= BTIF_AV_FLAG_PENDING_START;
                break;
            }
            if (btif_av_cb.peer_sep != AVDT_TSEP_SRC)
                btif_a2dp_setup_codec();
            BTA_AvStart();
            btif_av_cb.flags |= BTIF_AV_FLAG_PENDING_START;
+5 −2
Original line number Diff line number Diff line
@@ -510,8 +510,11 @@ static void btif_recv_ctrl_data(void)

                /* post start event and wait for audio path to open */
                btif_dispatch_sm_event(BTIF_AV_START_STREAM_REQ_EVT, NULL, 0);
//FIXME

#if (BTA_AV_SINK_INCLUDED == TRUE)
                if (btif_media_cb.peer_sep == AVDT_TSEP_SRC)
                    a2dp_cmd_acknowledge(A2DP_CTRL_ACK_SUCCESS);
#endif
            }
            else if (btif_av_stream_started_ready())
            {