From: Archie Pusaka <apusaka@xxxxxxxxxxxx> When initializing media transport, we try to initialize the volume of the player. However, the assigned initial volume could be invalid due to the session has not been initialized, or when we assume the role of audio sink. In this case, we should not assign the initial volume. Reviewed-by: Michael Sun <michaelfsun@xxxxxxxxxx> Reviewed-by: Yu Liu <yudiliu@xxxxxxxxxx> --- profiles/audio/media.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profiles/audio/media.c b/profiles/audio/media.c index 02bf82a49..acb4a8ee9 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -494,7 +494,8 @@ static gboolean set_configuration(struct media_endpoint *endpoint, return FALSE; init_volume = media_player_get_device_volume(device); - media_transport_update_volume(transport, init_volume); + if (init_volume >= 0) + media_transport_update_volume(transport, init_volume); msg = dbus_message_new_method_call(endpoint->sender, endpoint->path, MEDIA_ENDPOINT_INTERFACE, -- 2.28.0.402.g5ffc5be6b7-goog