LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Sound from Windows 7 VM on qemu with virt-manager error - "alsa: Unexpected state 1" (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/sound-from-windows-7-vm-on-qemu-with-virt-manager-error-alsa-unexpected-state-1-a-4175518515/)

Stella Tian 09-13-2014 09:47 PM

Sound from Windows 7 VM on qemu with virt-manager error - "alsa: Unexpected state 1"
 
Hi guys,

Please help me! Have spent two days on this and still can't figure it out.

I am using Red Hat Linux 6.4, virt-manager to create a Windows 7 64-bit guest VM.
Now trying to play sound on the Windows 7 VM and listen the sound on the Linux host.
By default, the display is VNC and the audio device is ich6. The sound card is working on Windows VM (I can see the volume bar changing), but I can't hear it on the Linux host.

Then I made some configuration changes:

1. edit /etc/sysconfig/libvirtd, set QEMU_AUDIO_DRV=alsa.

2. edit /etc/libvirtd/qemu.conf, set
vnc_allow_host_audio = 1
user = "root"
group = "root"

3. add user "root" and "qemu" to group "audio".

4. remove /etc/asound.conf. Now alsamixer is working.

5. Reboot Linux host. Then start Windows VM and I can hear the sound from Windows VM when it is starting.

However, the problem is that the Windows VM now becomes very very slow, almost not responsive.

And the log file /var/log/libvirt/qemu/windowvm.log is growing crazily. I saw repeatedly error messages:

alsa: Unexpected state 1
alsa: Unexpected state 1

Please advise what should be the correct configuration?

I also tried SPICE and can't get sound to work at all. Maybe my configuration for spice is wrong?

Thanks a million!

Stella

mostlyharmless 10-07-2014 02:48 PM

Hey Stella,

In case you're still looking for an answer, I'd recommend a look on this thread https://bbs.archlinux.org/viewtopic.php?id=162768&p=1

Yes, it's 117 pages and counting, and mostly devoted to VGA passthrough, however there are many sound issues with Windows VM addressed throughout the thread, and different ways of dealing with them to be found, and the thread is quite active, so you might get an answer there if one of the existing solutions doesn't work and you ask. Interestingly, the page 117 has a pulseaudio solution which might work for you.


All times are GMT -5. The time now is 08:47 PM.