I recently undertook a project to convert my existing Windows workstation over to Proxmox VE. The idea was that I would run Proxmox on the bare metal and convert my Windows deployment into a VM, passing through the devices using VFIO so it would appear to be standard workstation. I would then convert my Intel RAID10 Array over to ZFS and offload applications like Roon and Plex to run as LXC containers.
For the most part, everything worked. But I ran into latency issues with my Topping D10 Balanced DAC that I just couldn’t resolve. Even with passing through a dedicated USB controller… I would still get infrequent “pops and clicks”. I realized that I hardly ever use this DAC outside of Roon, so I figured out how to get it passed through to the LXC container. Thought I would share the details here for others.
First off, we need to get some information regarding the DAC on the Proxmox host:
root@pve:~# ls -la /dev/snd/by-id/
total 0
drwxr-xr-x 2 root root 60 May 27 21:17 .
drwxr-xr-x 4 root root 160 May 27 21:17 ..
lrwxrwxrwx 1 root root 12 May 27 21:17 usb-Topping_D10_Balanced-00 -> ../controlC1
root@pve:~# ls -la /dev/snd/
total 0
drwxr-xr-x 4 root root 160 May 27 21:17 .
drwxr-xr-x 23 root root 4720 May 24 07:43 ..
drwxr-xr-x 2 root root 60 May 27 21:17 by-id
drwxr-xr-x 2 root root 60 May 27 21:17 by-path
crw-rw---- 1 root audio 116, 3 May 27 21:17 controlC1
crw-rw---- 1 root audio 116, 2 May 27 21:17 pcmC1D0p
crw-rw---- 1 root audio 116, 1 May 24 07:43 seq
Now we can use this to add some additional lines to the LXC configuration:
lxc.cgroup2.devices.allow: c 116:* rwm
lxc.mount.entry: /dev/snd dev/snd none bind,optional,create=dir
After restarting the container, we check to see if the DAC is available:
root@roon:~# aplay --list-devices
**** List of PLAYBACK Hardware Devices ****
card 1: Balanced [D10 Balanced], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
NOTE: I used a privileged container for this setup. (Not sure if it’s required, but I didn’t feel the need to test it unprivileged.)
Roon works great as a container. I have mount points from my ZFS array for music and database backups. I gave the container 2 cores and 4GB of RAM, but I never really see it use even half of that. (And that’s while streaming Qobuz with DSP applied.)