Bug 683736 - Asynchronous when recording sound inside kvm guest with vnc console
Asynchronous when recording sound inside kvm guest with vnc console
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
low Severity low
: rc
: 7.0
Assigned To: Gerd Hoffmann
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-10 03:45 EST by Shaolong Hu
Modified: 2013-10-30 05:49 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-30 05:49:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shaolong Hu 2011-03-10 03:45:28 EST
Description of problem:
------------------------
Connect microphone to host, boot a guest, connect guest with vnc on the host, record sound in the guest, sound recorded in the guest has big latency.


Version-Release number of selected component (if applicable):
--------------------------------------------------------------
Host:
2.6.32-118.el6.x86_64
qemu-kvm-0.12.1.2-2.149.el6.x86_64

Guest:
2.6.32-118.el6.i686


How reproducible:
-----------------
100%


Steps to Reproduce:
--------------------
1. Boot guest with:

/usr/libexec/qemu-kvm -M rhel6.1.0 -enable-kvm -m 8G -smp 4 -name RHEL-Server-6.1-32 -uuid `uuidgen` -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -boot order=cd -drive file=./RHEL6.1-32-qcow2,if=none,id=drive-ide-disk0,format=qcow2,cache=none,werror=stop,rerror=stop -device ide-drive,drive=drive-ide-disk0,id=ide-disk0 -netdev tap,script=/etc/qemu-ifup,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:7b:a2:fa -usb -device usb-tablet,id=input0 -monitor stdio -balloon none -device intel-hda,id=sound0,bus=pci.0 -device hda-duplex -vnc :10

2. Connect microphone to host, on the host:

vncviewer :10

3. Record sound in the guest with Sound Recorder.
  

Actual results:
----------------
Recorded length of step 3 is bigger than actual length, timer on Sound Recorder moves faster than real time. There is big latency of sound recorded, for you say "one, two, three", stop recording and play, there is nothing, than resume recording, say "four, five, six", stop recording and play, it plays "one, two, three". 


Expected results:
------------------
Recorded sound should has no latency, timer of Sound Recorder should move correctly.


Additional info:
-----------------
Same command line with -spice, sound recorded correctly.
With win7_32 guest, SoundRecorder's timer moves correctly with both spice and vnc, but recorded sound is noise.
Comment 3 Gerd Hoffmann 2011-06-01 12:05:52 EDT
With luck this is the same as 684149.

If not this will go pretty much to the bottom of the priority list as sound without spice is not supported.
Comment 4 Gerd Hoffmann 2011-06-08 10:31:59 EDT
which app you are using to record sound with the rhel6 guest?
Comment 5 Gerd Hoffmann 2011-06-09 08:59:42 EDT
Found it, gnome-media-apps carries the sound recorder app.
Comment 6 Gerd Hoffmann 2011-06-09 09:08:48 EDT
How does the host-side audio configuration look like?

Do you use alsa?  Or pulseaudio?
See "qemu -audio-help" for more info on audio setup.
Comment 7 FuXiangChun 2011-06-10 06:26:48 EDT
Hi Gerd
   i am trying to reproduce it with alsa and pulseaudio. i will update testing result to bz next monday.
Comment 8 FuXiangChun 2011-06-10 07:26:01 EDT
(In reply to comment #6)
> How does the host-side audio configuration look like?
> 
> Do you use alsa?  Or pulseaudio?
> See "qemu -audio-help" for more info on audio setup.


use alsa and pulseaudio all can reproduce this bug. 

host info:
# uname -r
2.6.32-156.el6.x86_64
#rpm -qa|grep kvm
qemu-kvm-0.12.1.2-2.164.el6.x86_64

guest(rhel6.1 32bit) info:
# uname -r
2.6.32-131.0.15.el6.i686

steps to reproduce
1.QEMU_AUDIO_DRV=alsa or QEMU_AUDIO_DRV=pulseaudio
2. start vm 
/usr/libexec/qemu-kvm -M rhel6.1.0 -enable-kvm -m 8G -smp 4 -name RHEL-Server-6.1-32 -uuid dc170b25-7559-4383-a691-e9f8deb45ab8 -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -boot order=c -drive file=RHEL6.1-32-qcow2,if=none,id=drive-ide-disk0,format=qcow2,cache=none,werror=stop,rerror=stop -device ide-drive,drive=drive-ide-disk0,id=ide-disk0 -netdev tap,script=/etc/qemu-ifup,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:7b:a2:fa -usb -device usb-tablet,id=input0 -monitor stdio -balloon none -device intel-hda,id=sound0,bus=pci.0 -device hda-duplex -vnc :10
Comment 9 Gerd Hoffmann 2011-06-14 04:52:16 EDT
You need "export QEMU_AUDIO_DRV=..." otherwise qemu does't see it.
The pulseaudio driver is named "pa" btw.
Comment 10 Shaolong Hu 2011-07-28 04:01:05 EDT
Hi Gerd,

I am back, see this is here a long time, i tried with the latest qemu-kvm:
qemu-kvm-0.12.1.2-2.172.el6.x86_64
2.6.32-171.el6.x86_64

when i export QEMU_AUDIO_DRV=pa, i can reproduce it, when i use alsa, it keeps prompting "alsa: Unexpected state 1", guest acts slowly, especially when i use Sound Reorder.
Comment 15 Gerd Hoffmann 2013-03-20 10:41:42 EDT
Sound with vnc is unsupported, lowering priority.

Note You need to log in before you can comment on or make changes to this bug.