Article 5RBKN Libvirt: is possible to pass a real audio card(usb or pci-e) sound..on network?

Libvirt: is possible to pass a real audio card(usb or pci-e) sound..on network?

by
camerabambai
from LinuxQuestions.org on (#5RBKN)
With this configuration

Code: <qemu:commandline>
<qemu:env name='QEMU_AUDIO_DRV' value='pa'/>
<qemu:env name='QEMU_AUDIO_DAC_FIXED_FREQ' value='48000'/>
<qemu:env name='QEMU_AUDIO_DAC_TRY_POLL' value='0'/>
<qemu:env name='QEMU_AUDIO_ADC_FIXED_FREQ' value='48000'/>
<qemu:env name='QEMU_AUDIO_ADC_TRY_POLL' value='0'/>
<qemu:env name='QEMU_AUDIO_TIMER_PERIOD' value='1000'/>
<qemu:env name='QEMU_PA_SERVER' value='tcp:192.168.02:4713'/>
<qemu:arg value="-device"/>
<qemu:arg value="ac97,audiodev=ac97"/>
<qemu:arg value="-audiodev"/>
<qemu:arg value="pa,id=ac97,server=tcp:192.168.0.2:4713"/>
</qemu:commandline>I can start the vm(i need it for an audio test) and I can hear sound on remote libvirt client(virt-manager), but there is only one problem: the sound is really slow, with a lot of distortions

So I had this idea..to use a usb audio card on vm, then connect it via line-in to the host card and then pass the audio via pulseaudio.
Is possible?
I have did this, the vm has this configuration: no emulated card, usb soundcard inserted, audio is pulse as above but without the ac97 parts.

Code:<qemu:commandline>
<qemu:env name='QEMU_AUDIO_DRV' value='pa'/>
<qemu:env name='QEMU_AUDIO_DAC_FIXED_FREQ' value='48000'/>
<qemu:env name='QEMU_AUDIO_DAC_TRY_POLL' value='0'/>
<qemu:env name='QEMU_AUDIO_ADC_FIXED_FREQ' value='48000'/>
<qemu:env name='QEMU_AUDIO_ADC_TRY_POLL' value='0'/>
<qemu:env name='QEMU_AUDIO_TIMER_PERIOD' value='1000'/>
<qemu:env name='QEMU_PA_SERVER' value='tcp:192.168.0.2:4713'/>I insert the loopback module, and seems the sound is received(pavucontrol show the activity) but I cannot hear nothing on client.
I use this configuration because the libvirt server and the libvirt client are different pc.latest?d=yIl2AUoC8zA latest?i=fzp4bTzYTvE:Bd9QUX4q3t8:F7zBnMy latest?i=fzp4bTzYTvE:Bd9QUX4q3t8:V_sGLiP latest?d=qj6IDK7rITs latest?i=fzp4bTzYTvE:Bd9QUX4q3t8:gIN9vFwfzp4bTzYTvE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments