This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 840653

Summary: QEMU VNC Remote Sound stopped working
Product: [Fedora] Fedora Reporter: Albert Graham <agraham>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 17CC: amit.shah, berrange, cfergeau, crobinso, dwmw2, itamar, knoel, kraxel, pbonzini, rjones, scottt.tw, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-09 19:01:10 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Albert Graham 2012-07-16 15:53:49 EDT
Description of problem:

QEMU Remote Audio via VNC stopped working around april 2012 in various Fedora version.

It was discovered that a new configure option "--enable-mixemu" was used in qemu-1.0-15.fc1x.src.rpm that inadvertently hit a bug in QEMU. This was not noticed primiliary because there are very few VNC clients that implement the QEMU AUDIO RFB protocol extensions.

I only discovered the bug after my own VNC client stopped working when I upgraded from QEMU 0.13 (Fedora 14) to QEMU 1.1.x.

Version-Release number of selected component (if applicable):

Fedora 16, 17 or any version using > qemu-1.0-10.fcx

How reproducible:

Steps to Reproduce:
1. Install Fedora 16 as a Host
2. Create a guest that can produce sound (e.g. Windows XP)
3. Using a QEMU AUDIO RFB capable VNC client, connect to the guest and capture sound. Such a client can be found here:

http://repo.or.cz/w/qemu-vcap.git

Actual results:

Silence.

Expected results:

Sound reproduction.

Additional info:

I original reported this to the QEMU mailing list, details can be found here:
http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg01814.html

A patch was produced that fixes the issue as follows:

[..snip..]

diff --git a/audio/audio.c b/audio/audio.c
index 583ee51..1c77389 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -818,6 +818,7 @@ static int audio_attach_capture (HWVoiceOut *hw)
         sw->active = hw->enabled;
         sw->conv = noop_conv;
         sw->ratio = ((int64_t) hw_cap->info.freq << 32) / sw->info.freq;
+        sw->vol = nominal_volume;
         sw->rate = st_rate_start (sw->info.freq, hw_cap->info.freq);
         if (!sw->rate) {
             dolog ("Could not start rate conversion for `%s'\n", SW_NAME (sw));

[..snip..]

Adding the patch to qemu-1.0-15.fc1x.src.rpm as well as the latest rawhide versions and testing confirmed that this patch fixes the problem for all versions.

It should be noted that you can avoid the bug by not using the --enable-mixemu configure option too.
Comment 1 Albert Graham 2012-07-16 21:08:19 EDT
Upstream patch - audio: Unbreak capturing in mixemu case

http://repo.or.cz/w/qemu.git/commit/83617103984eb4d81cf46c94435f3da2c6f33b55
Comment 2 Fedora Update System 2012-07-30 07:24:31 EDT
qemu-1.0.1-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/qemu-1.0.1-1.fc17
Comment 3 Fedora Update System 2012-07-30 18:28:13 EDT
Package qemu-1.0.1-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing qemu-1.0.1-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-11302/qemu-1.0.1-1.fc17
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2012-08-09 19:01:10 EDT
qemu-1.0.1-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.