Streaming audio via USB port

KenHorse

Member
Mar 18, 2022
60
0
11
69
I've been experiencing audio dropouts using a CM119 CODEC device with a guest running Debian 10. I am also running ProxMox 8.0.3

I am thinking this is occurring because the USB port being used is being "time shared" by the host?
 
Revisiting this.

I've tried setting up SPICE in the Debian VM that experiences the dropouts but the USB device doesn't seem to be active from within the VM. I admit I'm not experienced with SPICE so it's probably something I'm doing wrong.

Other than selecting SPICE when setting the Hardware in the VM, what else must I do?
 
Code:
root@ParrettPVE:~# qm config 100
boot: order=scsi0;ide2;net0
cores: 2
cpu: x86-64-v2-AES,flags=+aes
ide2: local:iso/debian-11.5.0-amd64-netinst.iso,media=cdrom,size=382M
memory: 2048
meta: creation-qemu=8.0.2,ctime=1694651843
name: ParrettASL
net0: virtio=86:EF:26:A7:D2:A8,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-100-disk-0,cache=directsync,iothread=1,size=32G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=9e29a938-25a1-4227-a14e-4bef5b5fb430
sockets: 2
usb0: host=0d8c:013a
vmgenid: a020957c-85d3-43f9-ab33-67ab2d3ba31d
 
After listening more carefully (and running usbtop in order to monitor the stream), I find that "dropouts" isn't exactly accurate in that no packets are being lost but only delayed. So a word of the sound file may stop mid-syllable only to continue where it paused, anywhere from a hundred milliseconds to perhaps a few seconds. Again, no speech is lost, it is only delayed for a while.

Does this additional info point towards anything in particular?
 
In my experience USB passthrough is not suitable for low-latency (audio) or high-bandwidth applications (storage, video). PCI(e) passthrough of an entire USB controller usually fixes this but that comes with a whole new set of caveats.
 
I will check my hardware support IOMMU (it should as it's an Intel i5 processor) and I don't need to share USB with any other VM (nor the host). I'll see if this is a workable solution. Thanks for the idea.

One question I'm not clear on in the docs. Do I need to enable IOMMU in the host or VM?
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!