Re: [spice-server PATCH v1] snd_worker: do not send volume/mute on migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

After this patch, I still get wrong volume when migration finishes.

My test:
1) qemu-kvm -m 1024 -spice port=5967,disable-ticketing,seamless-migration=on -monitor stdio -vga qxl -device AC97  -snapshot ~/VirtualMachines/f21.img
2) SPICE_DEBUG=1 gtk/spicy -p 5967
3) qemu-kvm -m 1024 -spice port=5968,disable-ticketing,seamless-migration=on -vga qxl -device AC97  -snapshot ~/VirtualMachines/f21.img -monitor stdio -incoming tcp::4445
4) on 1) monitor:
client_migrate_info spice 127.0.0.1 5968
migrate -d tcp:localhost:4445
5) observe volume change in client after migration

Furthermore, how would this patch let the client sync with valid guest volume changes? Migration may take a while, the client could still be running the guest and volume control should keep working.

On Fri, Apr 24, 2015 at 12:27 PM, Victor Toso <victortoso@xxxxxxxxxx> wrote:
During migration we should not allow volume-changes. QEMU does it
internally and it end up sending the current guest volume on migration.

We track on the client all volume-changes that happen in the guest and
we change the volume of the client application accordingly. But this
volume-change on migration is not done by the user and should be
ignored.

Resolve: https://bugzilla.redhat.com/show_bug.cgi?id=1012868
---
 server/snd_worker.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/server/snd_worker.c b/server/snd_worker.c
index a1223b4..e1f70d1 100644
--- a/server/snd_worker.c
+++ b/server/snd_worker.c
@@ -1015,6 +1015,10 @@ SPICE_GNUC_VISIBLE void spice_server_playback_set_volume(SpicePlaybackInstance *
     if (!channel || nchannels == 0)
         return;

+    if (red_client_during_migrate_at_target(channel->channel_client->client)) {
+        spice_debug("Do not set playback volume during migration");
+        return;
+    }
     snd_playback_send_volume(playback_channel);
 }

@@ -1029,6 +1033,10 @@ SPICE_GNUC_VISIBLE void spice_server_playback_set_mute(SpicePlaybackInstance *si
     if (!channel)
         return;

+    if (red_client_during_migrate_at_target(channel->channel_client->client)) {
+        spice_debug("Do not set playback mute during migration");
+        return;
+    }
     snd_playback_send_mute(playback_channel);
 }

@@ -1270,6 +1278,10 @@ SPICE_GNUC_VISIBLE void spice_server_record_set_volume(SpiceRecordInstance *sin,
     if (!channel || nchannels == 0)
         return;

+    if (red_client_during_migrate_at_target(channel->channel_client->client)) {
+        spice_debug("Do not set record volume during migration");
+        return;
+    }
     snd_record_send_volume(record_channel);
 }

@@ -1284,6 +1296,10 @@ SPICE_GNUC_VISIBLE void spice_server_record_set_mute(SpiceRecordInstance *sin, u
     if (!channel)
         return;

+    if (red_client_during_migrate_at_target(channel->channel_client->client)) {
+        spice_debug("Do not set record mute during migration");
+        return;
+    }
     snd_record_send_mute(record_channel);
 }

--
2.1.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel



--
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]