Blame SOURCES/0081-sound-do-not-modify-client-state-on-migration.patch

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