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

Commit f2c4d58a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "a2dp: check out_snd_device to tear down a2dp path"

parents 16d97201 47ea2f05
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2875,8 +2875,10 @@ int a2dp_set_parameters(struct str_parms *parms, bool *reconfig)
                    goto param_handled;
                list_for_each(node, &a2dp.adev->usecase_list) {
                    uc_info = node_to_item(node, struct audio_usecase, list);
                    if (uc_info->stream.out && uc_info->type == PCM_PLAYBACK &&
                        is_a2dp_out_device_type(&uc_info->stream.out->device_list)) {
                    if (uc_info->type == PCM_PLAYBACK &&
                        (uc_info->out_snd_device == SND_DEVICE_OUT_BT_A2DP ||
                         uc_info->out_snd_device == SND_DEVICE_OUT_SPEAKER_AND_BT_A2DP ||
                         uc_info->out_snd_device == SND_DEVICE_OUT_SPEAKER_SAFE_AND_BT_A2DP)) {
                        pthread_mutex_unlock(&a2dp.adev->lock);
                        fp_check_a2dp_restore(a2dp.adev, uc_info->stream.out, false);
                        pthread_mutex_lock(&a2dp.adev->lock);