Hotplug USB DAC (solved)

Running OSMC RC on Rpi2 (works great, props to Sam and crew). I have one problem with USB DAC / hotplugging / hdmi sound.

To connect the DAC (DACMagic), I need to plug in USB, restart RPI and then I can select it. Sound gets delivered to USB DAC (without issues).

When I finish the movie, I turn DAC off and let RPI just sit there. Let’s say I scroll through the menus after the DAC is turned off, sound gets delivered to HDMI and is distorted…

When I want to watch a movie and I turn the DAC on BEFORE I start the movie, all is fine. But when I forget to turn on the DAC BEFORE, dac is no longer recognised. I need to restart the complete RPI to make Kodi recognise it and get it working again.

As you can see, and since i’m not the only user (wife) this can go wrong each day and is really messing with the overal user experience…

How do I fix this? Make the USB dac the only soundcard would work with me fine, but how?

I have a question regarding USB DAC - is SMSL Sanskrit 24BIT/192Khz USB DAC supported by OSMC on RPi?
Is it possible for OSMC to play high definition music in lossless high fidelity 24bit sound quality?

In my experience, it is NOT on RPi2 at least. In USB 2 mode, lots of clicking and popping. I have to connect my dac in USB 1 mode and disable turbo mode for the network part of the RPi. (in /boot/cmdline.txt I have to place smsc95xx.turbo_mode=N to get good audio, but unfortunately only up until 24bit/96khz which is the max for usb1 with my dac).

On topic, anyone can point me in making my dac the only available soundcard or other solution for me which auto switches correctly between hdmi and USB DAC?

Anyone that can help with my problem?

When I turn on the TV and forget the DAC, the user interface sounds screem as white noise through my TV.

So Annoying and ruining my tiny speakers in the tv… how to permanently set the DAC as main soundcard/output?

Was able to fix this, for now…

For anyone else experiencing this:

  1. Make /home/osmc/.asoundrc with following content (if card 1 is your usb dac, check with this command through SSH: cat /proc/asound/cards)

    pcm.!default {
    type hw
    card 1
    }

    ctl.!default {
    type hw
    card 1
    }

  2. Make /etc/asound.conf with same content as above (probably this or the previous step is too much but hey, it works for me).

  3. Reboot

  4. Choose your DAC in Kodi/OSMC (system>settings>audio output to USB DAC which is presented there (now with ALSA Default in the name).

  5. Turn of navigation sounds / system sounds for kodi/osmc, since these will still give white noise through hdmi if not turned off…

RESULT:
If I watch a movie with the DAC turned on > sound to DAC.
If I stop, turn off DAC and start a movie > sound to HDMI.
If I turn on DAC again and start a movie > sound to DAC.

Perfect.

2 Likes

Does setting “Resample quality” away from “GPU accelerated” fix the white noise issue?
If so, can you provide a debug log that shows the issue? (Need to know the formats being used by ALSA).

Resample quality was already set to High, but changing it to GPU accelerated does not change a thing. Still white noise to HDMI… (doesn’t matter which UI sound I choose though, bubbles or default or whatever).

Now we’re on to this, is the GPU capable of resampling in good quality or is the High-setting better?