DAC Passthrough in LXC

musashi

New Member
May 3, 2021
1
0
1
50
Hi there, new to ProxMox and looking for help on a Passthrough issue with a DAC

I am currently assessing whether I can have one server to rule them all. With LXC instances for diverse purposes, including a mediaserver for Roon. The idea was to connect a USB DAC (NAD D3045) directly to the ProxMox Host, with a passthrough of the DAC to the LXC with the Roon Server installed.

I face two issues here which puzzle me, running on the same hardware:
a. I got Roon + DAC working on directly on a Debian 10 server – music out, it works;
b. While running ProxMox I cannot even get the DAC working on the Host let alone pass it trough to the Guest LXC.
Can anyone help me to get both (a) the DAC working in the ProxMox Host and (b) then to pass it trough to the LXC running Roon?

Some background
I first installed Roon Server on Debian 10 on test hardware (intel N3700, with 4GB memory and a 120GiB SSD). I then connected a USB HDD and DVD to the server and both are recognized in the Roon server. I then connected the DAC and got the DAC working on the Debian Server and it connected to Roon without a glitch.

Then I just removed the SSD and replaced it with a 160GiB HDD on which I installed ProxMox with basically standard settings, using the full HDD. I then used the default Debian 10 LXC download to create a Roon specific LXC running on Debian 10. I managed to passthrough the USB HDD en DVD to the LXC using mount binding, got Roon installed and can access the USB devices there. What doesn’t work is the connected USB DAC, which did on the bare metal installation, but I don’t even seem to be able to get the DAC working on the ProxMox Host let alone on the LXC Guest. I do see it as a USB device, however I cannot get it to run let alone set it as primary device or pass it trough to the LXC.

So what did I try?
On the Host, to get the DAC working
  1. I looked up my USB devices and found the DAC
    # lsusb
    ..
    Bus 001 Device 008: ID 17ae:000d
    ..

    Note that other devices were there, but this one is the DAC.
  2. # usb-devices
    Gets the following for the DAC:
    T: Bus=01 Lev=02 Prnt=02 Port=02 Cnt=03 Dev#= 8 Spd=480 MxCh= 0
    D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 2
    P: Vendor=17ae ProdID=000d Rev=01.19
    S: Manufacturer=NAD
    S: Product=NAD USB Audio
    C: #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
    I: If#=0x0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=20 Driver=snd-usb-audio
    I: If#=0x1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=20 Driver=snd-usb-audio
    I: If#=0x2 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
    I: If#=0x3 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid

  3. # aplay -L
    This delivers a long list, out of which I cut ‘hopefully’ the most relevant lines:
    hw:CARD=Audio,DEV=0
    NAD USB Audio, USB Audio
    Direct hardware device without any conversions
    plughw:CARD=Audio,DEV=0
    NAD USB Audio, USB Audio
    Hardware device with all software conversions

  4. I found out the DAC is not selected as the primary Audio Output Device, nor does it seem to be active. I see it, but whether it is active/connected or not, I was not able to find out.
    # nano /proc/asound/cards
    This has the following contents:
    0 [PCH ]: HDA-Intel - HDA Intel PCH
    HDA Intel PCH at 0x91410000 irq 126
    1 [Audio ]: USB-Audio - NAD USB Audio
    NAD NAD USB Audio at usb-0000:00:14.0-1.3, high speed

  5. The following files were not present on the system:
    /etc/asound.conf I did create this, see further on
    /etc/modprobe.d/sound I did not understand how to change this
    /proc/asound/.asoundrc Seems to be a swap file that doesn’t exist either
  6. I tried changing the booting Audio Output Device in several ways, but nothing seems to work.
    a. I tried changing the order of the audio devices in /proc/asound/cards. I did this by moving the last two line to the front and changing the 0 and 1 so that the NAD DAC would be 0. When I try to save the file, it says the contents have been changed by the system and that I am not allowed to change it.
    b. I created a version of /etc/asound.conf with the following content:
    # Disable resampling to 48KHz.
    pcm.default_device {
    type hw
    card "Audio"
    device 0
    }
    pcm.!default {
    type plug
    slave {
    pcm "default_device"
    }
    }

  7. After I did this I think the Audio/stream0 changed from the onboard to the DAC output, however it is not started. As can be seen in the output below, after I used the following command:
    # nano /proc/asound/Audio/stream0
    This results in the following:
    NAD NAD USB Audio at usb-0000:00:14.0-1.3, high speed : USB Audio
    Playback:
    Status: Stop
    Interface 1
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us
    Bits: 24
    Interface 1
    Altset 2
    Format: S16_LE
I was not able to find any further suggestions about how to get things to work.. So grateful for any assistance!
 

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!