<div dir="ltr">Would you mind putting this information into the Arch wiki? I actually bought a pair of USB headphones and pass them through to the guest directly in lieu of figuring out PulseAudio over TCP. </div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 28, 2015 at 12:49 PM, Garrett Powell <span dir="ltr"><<a href="mailto:garretttracypowell@gmail.com" target="_blank">garretttracypowell@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for the quick reply. It took me a while, but I was able to get it working based on your suggestion.<div>In case anyone else is having a similar issue:</div><div><br></div><div>I uncommented this line in /etc/pulse/<a href="http://default.pa" target="_blank">default.pa</a>.</div><div>#load-module module-native-protocol-tcp</div><div><br></div><div>I exported these three environment variables in my launch script.</div><div><div>QEMU_AUDIO_DRV=pa</div><div>QEMU_PA_SERVER=localhost</div><div>PULSE_SERVER=localhost</div></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 26, 2015 at 1:57 PM ajs124 <<a href="mailto:redhat@ajs124.de" target="_blank">redhat@ajs124.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey,<br>
<br>
a workaround/hack I use for this is doing pulseaudio over TCP to localhost.<br>
<br>
I don't have the details of my setup with me at the moment, but iirc you have to export PULSE_SERVER and maybe enable the module, depending on your distro.<br>
<br>
There are tutorials out there for doing it over the LAN, you simply have to replace the server/client with localhost.<br>
<br>
On Wed, 26 Aug 2015 17:45:21 +0000<br>
Garrett Powell <<a href="mailto:garretttracypowell@gmail.com" target="_blank">garretttracypowell@gmail.com</a>> wrote:<br>
<br>
> I can only hear sound in the guest (Windows 10) if there are no<br>
> applications running in the host that use pulseaudio (Skype, Tox, etc.).<br>
> Even then, the sound is incredibly distorted with a lot of static. I'm<br>
> using an external USB DAC. Here's my QEMU launch script:<br>
><br>
> #!/bin/bash<br>
> synergys --daemon --config /etc/synergy.conf<br>
> export QEMU_AUDIO_DRV=pa<br>
> qemu-system-x86_64 \<br>
> -enable-kvm \<br>
> -m 10240 \<br>
> -cpu host,kvm=off \<br>
> -smp sockets=1,cores=4,threads=2 \<br>
> -vga none \<br>
> -nographic \<br>
> -soundhw hda \<br>
> -name Windows10-VM \<br>
> -drive<br>
> if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd<br>
> \<br>
> -drive<br>
> if=pflash,format=raw,file=/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd<br>
> \<br>
> -device vfio-pci,host=03:00.0 \<br>
> -device vfio-pci,host=03:00.1 \<br>
> -device virtio-scsi-pci,id=scsi \<br>
> -drive<br>
> file=/home/garrett/VMs/Windows10/windows.img,id=disk,format=raw,if=none<br>
> -device scsi-hd,drive=disk \<br>
> -drive file=/home/garrett/VMs/Windows10/windows.iso,id=isocd,if=none<br>
> -device scsi-cd,drive=isocd \<br>
> -drive file=/home/garrett/VMs/Windows10/virtio-win.iso,id=virtiocd,if=none<br>
> -device ide-cd,bus=ide.1,drive=virtiocd \<br>
> -drive file=/mnt/storage/win-storage.img,id=storage,format=raw,if=none<br>
> -device scsi-hd,drive=storage \<br>
> -boot menu=on<br>
> pkill synergys<br>
><br>
> This is some of the output I get whenever I run the script:<br>
><br>
> pulseaudio: pa_context_connect() failed<br>
> pulseaudio: Reason: Connection refused<br>
> pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio<br>
> driver<br>
> ALSA lib pcm_dsnoop.c:614:(snd_pcm_dsnoop_open) unable to open slave<br>
> alsa: Could not initialize ADC<br>
> alsa: Failed to open `default':<br>
> alsa: Reason: No such file or directory<br>
><br>
> Thinking that running the script as root might be the source of the issue,<br>
> I tried running pulseaudio in system-wide daemon mode. Audio in the host<br>
> still works, and I'm getting the same distortion in the guest. This is some<br>
> of the output I get now:<br>
><br>
> pulseaudio: Wrong context state<br>
> pulseaudio: Reason: Access denied<br>
> pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio<br>
> driver<br>
> ALSA lib pcm_dsnoop.c:614:(snd_pcm_dsnoop_open) unable to open slave<br>
> alsa: Could not initialize ADC<br>
> alsa: Failed to open `default':<br>
> alsa: Reason: No such file or directory<br>
><br>
> I've tried setting QEMU_AUDIO_DRV=alsa and I get the same results/output<br>
> minus the pulseaudio stuff. I'm clueless at this point.<br>
><br>
> Thanks,<br>
> Garrett<br>
<br>
_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
<br></blockquote></div><br></div>