<div dir="ltr">I'm of no help wrt getting PulseAudio working. However, how important is this to you? A much better solution for me (I use the VM exclusively for gaming) was to get a $10 PCI USB card, and some USB headphones. I pass the PCI USB card through to the guest, and everything works better this way. Surround sound, no crackling, etc. Perhaps this would be a better solution for you too. </div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 8, 2016 at 10:01 AM, sL1pKn07 SpinFlo <span dir="ltr"><<a href="mailto:sl1pkn07@gmail.com" target="_blank">sl1pkn07@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 class="HOEnZb"><div class="h5">2016-01-08 17:50 GMT+01:00 Feadurn <<a href="mailto:feadurn@gmail.com">feadurn@gmail.com</a>>:<br>
> I did the export in the bash, check it was activate with set, then launch<br>
> virt-manager and launch the vm from there but still the same issue (exact<br>
> same error)<br>
><br>
> Regards,<br>
><br>
> Feadurn<br>
><br>
><br>
> On 08/01/16 16:07, sL1pKn07 SpinFlo wrote:<br>
>><br>
>> 2016-01-08 16:45 GMT+01:00 Feadurn <<a href="mailto:feadurn@gmail.com">feadurn@gmail.com</a>>:<br>
>>><br>
>>> I have everything working except the sound from the guest. I am using<br>
>>> pulseaudio and it works out of the box for everything else except having<br>
>>> the<br>
>>> sound from the vm.<br>
>>><br>
>>> I reinstalled pulseaudio and pulseaudio-alsa to be sure I have a clean<br>
>>> install<br>
>>><br>
>>> I follow the guide here<br>
>>> <a href="https://wiki.archlinux.org/index.php/PulseAudio#QEMU" rel="noreferrer" target="_blank">https://wiki.archlinux.org/index.php/PulseAudio#QEMU</a><br>
>>><br>
>>> When I run the command<br>
>>><br>
>>> qemu-system-x86_64 -audio-help | awk '/Name: pa/' RS=<br>
>>><br>
>>> I get<br>
>>><br>
>>> Name: pa<br>
>>> Description: <a href="http://www.pulseaudio.org/" rel="noreferrer" target="_blank">http://www.pulseaudio.org/</a><br>
>>> Theoretically supports many playback voices<br>
>>> Theoretically supports many capture voices<br>
>>> Options:<br>
>>>    QEMU_PA_SAMPLES: integer, default = 4096<br>
>>>      buffer size in samples<br>
>>>    QEMU_PA_SERVER: string, default = (not set)<br>
>>>      server address<br>
>>>    QEMU_PA_SINK: string, default = (not set)<br>
>>>      sink device name<br>
>>>    QEMU_PA_SOURCE: string, default = (not set)<br>
>>>      source device name<br>
>>><br>
>>> Then I add in my xml the following options<br>
>>><br>
>>>    <qemu:commandline><br>
>>>      <qemu:env name='QEMU_AUDIO_DRV' value='pa'/><br>
>>>      <qemu:env name='QEMU_PA_SINK'<br>
>>> value='alsa_output.pci-0000_00_1b.0.analog-stereo'/><br>
>>>      <qemu:env name='QEMU_PA_SOURCE' value='input'/><br>
>>>    </qemu:commandline><br>
>>><br>
>>><br>
>>> The value of QEMU_PA_SINK is obtained with the command<br>
>>>      pacmd list-sinks | grep -e 'name:' -e 'index'<br>
>>><br>
>>><br>
>>> In qemu.conf I uncomment the following options<br>
>>><br>
>>> vnc_allow_host_audio = 1<br>
>>> nographics_allow_host_audio = 1<br>
>>><br>
>>> The only weird thing about my configuration is that I started to use<br>
>>> libvirt<br>
>>> as root user. I then switch to be able to use it as user. However myy vm<br>
>>> is<br>
>>> still on the root system but I can launch it as user without password (I<br>
>>> didn't find the way to move the vm to the qemu user-session)<br>
>>><br>
>>> When I launch the VM I don't have sound (even in the vm everything works<br>
>>> with the AC97 installed on win10 64) and I get the following output:<br>
>>><br>
>>> pulseaudio: pa_context_connect() failed<br>
>>> pulseaudio: Reason: Connection refused<br>
>>> pulseaudio: Failed to initialize PA contextaudio: Could not init `pa'<br>
>>> audio<br>
>>> driver<br>
>>> pulseaudio: pa_context_connect() failed<br>
>>> pulseaudio: Reason: Connection refused<br>
>>> pulseaudio: Failed to initialize PA contextaudio: Could not init `pa'<br>
>>> audio<br>
>>> driver<br>
>>> alsa: Could not initialize ADC<br>
>>> alsa: Failed to open `default':<br>
>>> alsa: Reason: Device or resource busy<br>
>>> alsa: Could not initialize ADC<br>
>>> alsa: Failed to open `default':<br>
>>> alsa: Reason: Device or resource busy<br>
>>> audio: Failed to create voice `ac97.pi'<br>
>>><br>
>>><br>
>>> And I am lost there :(<br>
>>><br>
>>> Thank you in advance for any help :)<br>
>>><br>
>>> Feadurn<br>
>>><br>
>>><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>
>> you tried with use QEMU_AUDIO_DRV as environment option?<br>
>><br>
>> export QEMU_AUDIO_DRV=pa<br>
>><br>
>> and then launch the VM? i think these options is for environment, not<br>
>> for qemu comandline option<br>
>><br>
>> greetings<br>
><br>
><br>
<br>
<br>
</div></div>mmm then try this: (i assume you launch qemu from user root)<br>
<br>
copy the system <a href="http://default.pa" rel="noreferrer" target="_blank">default.pa</a> (/etc/pulse/<a href="http://default.pa" rel="noreferrer" target="_blank">default.pa</a>) to ~/.pulse/<a href="http://default.pa" rel="noreferrer" target="_blank">default.pa</a><br>
add this:<br>
<br>
### KVM<br>
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1<br>
<br>
to the end of ~/.pulse/<a href="http://default.pa" rel="noreferrer" target="_blank">default.pa</a><br>
<br>
then create the file client.con in /root/.pulse/client.conf with this content:<br>
<br>
default-server = 127.0.0.1<br>
<br>
and try again launch the VM<br>
<br>
source: <a href="http://www.se7ensins.com/forums/threads/how-to-setup-a-gaming-virtual-machine-with-gpu-passthrough-qemu-kvm-libvirt-and-vfio.1371980/" rel="noreferrer" target="_blank">http://www.se7ensins.com/forums/threads/how-to-setup-a-gaming-virtual-machine-with-gpu-passthrough-qemu-kvm-libvirt-and-vfio.1371980/</a><br>
<div class="HOEnZb"><div class="h5"><br>
greetings<br>
<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>
</div></div></blockquote></div><br></div>