[vfio-users] Cannot have sound from the guest

Feadurn feadurn at gmail.com
Fri Jan 8 16:50:39 UTC 2016


I did the export in the bash, check it was activate with set, then 
launch virt-manager and launch the vm from there but still the same 
issue (exact same error)

Regards,

Feadurn

On 08/01/16 16:07, sL1pKn07 SpinFlo wrote:
> 2016-01-08 16:45 GMT+01:00 Feadurn <feadurn at gmail.com>:
>> I have everything working except the sound from the guest. I am using
>> pulseaudio and it works out of the box for everything else except having the
>> sound from the vm.
>>
>> I reinstalled pulseaudio and pulseaudio-alsa to be sure I have a clean
>> install
>>
>> I follow the guide here https://wiki.archlinux.org/index.php/PulseAudio#QEMU
>>
>> When I run the command
>>
>> qemu-system-x86_64 -audio-help | awk '/Name: pa/' RS=
>>
>> I get
>>
>> Name: pa
>> Description: http://www.pulseaudio.org/
>> Theoretically supports many playback voices
>> Theoretically supports many capture voices
>> Options:
>>    QEMU_PA_SAMPLES: integer, default = 4096
>>      buffer size in samples
>>    QEMU_PA_SERVER: string, default = (not set)
>>      server address
>>    QEMU_PA_SINK: string, default = (not set)
>>      sink device name
>>    QEMU_PA_SOURCE: string, default = (not set)
>>      source device name
>>
>> Then I add in my xml the following options
>>
>>    <qemu:commandline>
>>      <qemu:env name='QEMU_AUDIO_DRV' value='pa'/>
>>      <qemu:env name='QEMU_PA_SINK'
>> value='alsa_output.pci-0000_00_1b.0.analog-stereo'/>
>>      <qemu:env name='QEMU_PA_SOURCE' value='input'/>
>>    </qemu:commandline>
>>
>>
>> The value of QEMU_PA_SINK is obtained with the command
>>      pacmd list-sinks | grep -e 'name:' -e 'index'
>>
>>
>> In qemu.conf I uncomment the following options
>>
>> vnc_allow_host_audio = 1
>> nographics_allow_host_audio = 1
>>
>> The only weird thing about my configuration is that I started to use libvirt
>> as root user. I then switch to be able to use it as user. However myy vm is
>> still on the root system but I can launch it as user without password (I
>> didn't find the way to move the vm to the qemu user-session)
>>
>> When I launch the VM I don't have sound (even in the vm everything works
>> with the AC97 installed on win10 64) and I get the following output:
>>
>> pulseaudio: pa_context_connect() failed
>> pulseaudio: Reason: Connection refused
>> pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio
>> driver
>> pulseaudio: pa_context_connect() failed
>> pulseaudio: Reason: Connection refused
>> pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio
>> driver
>> alsa: Could not initialize ADC
>> alsa: Failed to open `default':
>> alsa: Reason: Device or resource busy
>> alsa: Could not initialize ADC
>> alsa: Failed to open `default':
>> alsa: Reason: Device or resource busy
>> audio: Failed to create voice `ac97.pi'
>>
>>
>> And I am lost there :(
>>
>> Thank you in advance for any help :)
>>
>> Feadurn
>>
>>
>> _______________________________________________
>> vfio-users mailing list
>> vfio-users at redhat.com
>> https://www.redhat.com/mailman/listinfo/vfio-users
>>
> you tried with use QEMU_AUDIO_DRV as environment option?
>
> export QEMU_AUDIO_DRV=pa
>
> and then launch the VM? i think these options is for environment, not
> for qemu comandline option
>
> greetings




More information about the vfio-users mailing list