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

Commit cba36d18 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: restore a2dp device for active usecases when out of suspended"

parents cd063ea1 14314a96
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -794,6 +794,8 @@ void audio_extn_a2dp_set_parameters(struct str_parms *parms)
                   a2dp.audio_suspend_stream();
            } else if (a2dp.a2dp_suspended == true) {
                ALOGD("Resetting a2dp suspend state");
                struct audio_usecase *uc_info;
                struct listnode *node;
                if(a2dp.clear_a2dpsuspend_flag)
                    a2dp.clear_a2dpsuspend_flag();
                a2dp.a2dp_suspended = false;
@@ -818,6 +820,13 @@ void audio_extn_a2dp_set_parameters(struct str_parms *parms)
                        }
                    }
                }
                // restore A2DP device for active usecases
                list_for_each(node, &a2dp.adev->usecase_list) {
                    uc_info = node_to_item(node, struct audio_usecase, list);
                    if ((uc_info->stream.out->devices & AUDIO_DEVICE_OUT_ALL_A2DP) &&
                            (uc_info->out_snd_device != SND_DEVICE_OUT_BT_A2DP))
                        select_devices(a2dp.adev, uc_info->id);
                }
            }
        }
        goto param_handled;