From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 24 Apr 2015 14:05:00 +0200 Subject: [PATCH] sound: do not modify client state on migration During migration, a volume jump is observed by the client. This is due to qemu setting up destination server with default sound state, and the server sending it after the client is connected. The volume is later restored after migration is finished so there is no need to send this default state values on connection. Tested with both AC97 & HDA devices. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1012868 --- server/snd_worker.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/snd_worker.c b/server/snd_worker.c index b6cb62b..d1bfcae 100644 --- a/server/snd_worker.c +++ b/server/snd_worker.c @@ -1223,7 +1223,10 @@ static void snd_set_playback_peer(RedChannel *channel, RedClient *client, RedsSt SPICE_PLAYBACK_CAP_CELT_0_5_1) ? playback_compression : SPICE_AUDIO_DATA_MODE_RAW; - on_new_playback_channel(worker); + if (!red_client_during_migrate_at_target(client)) { + on_new_playback_channel(worker); + } + if (worker->active) { spice_server_playback_start(st->sin); }