Topping D10S DAC no power off without signal

Hi!

I’m using Volumio 3.198 on Raspberry Pi 3B connected to Topping D10S DAC over USB. Everything works - able to control volume, no crackling or weird sounds on change of bitrate.

The only problem I have is that DAC is not powered off when there is no signal (song playing) - as it should by Users Manual - after a few minutes of no signal detected it should power off automatically and wake backup up when signal is detected again.

Is Volumio keeping the USB port busy somehow? Is there a setting to cut it off? I switched output from USB DAC to Pi’s earplugs jack in Volumio - but the DAC still did not power off. The source Raspberry Pi is kept on 24/7 so I’d like to power off the DAC somehow when not in use.

Any hints on how to put the Topping D10S to sleep?

Auto shut off does not work via USB: you need one of the other input options for this (Toslink or coax). I use a Topping E50!DAC; same story.

Hey, thanx for chiming in, but D10S does not have other inputs (optical and coaxial are OUTputs, not inputs), so there is no other input the users manual can refer to.

Ah, didn’t realise that. Just looked up the d10(s?) manual from Toppings website. If you feed it with a PC, I assume you had to install the driver from their website first. Could this be related, or does the driver provide any settings?

Not using it with a PC but with a Raspberry PI - so no customized drivers in use.

Here Review: TOPPING D10s DAC – Top(ping) Tier Performance on a Budget - Headphonesty
it says:

“The D10s is powered by the USB connection to the computer and does not require a separate power source. The display shows “ – – – ” when no digital signal is detected, and automatically powers down to a single dot after a few minutes of inactivity.”

And the picture of the D10S showing “—” on the display is attached.

I have never seen this on my D10S, so I assume that Volumio is somehow keeping the DAC “busy” - not letting it go to sleep.

I have another Raspberry Pi 3 running OSMC as the media player, and it has options to keep the audio device “alive” for some (selectable) minutes after the audio playback has finished. So I assume something similar must be happening here.
I’ll try the OSMC media player with D10S and see if it powers off there.

OK, here are my findings - unless the USB port is powered off, the D10S does not power off - regardless of what software is driving the DAC.
Even the option in OSMC to deactivate the output device after some time of inactivity proved not enough to power it off.

However - there are ways to power off USB ports:

  • cutting power off of USB bus by doing
    echo 0 > /sys/devices/platform/soc/3f980000.usb/buspower
    this however - is a bit overkill as network interface is attached to USB bus and by powering off USB bus you cut networking, too, thus loosing connectivity to Volumio, which leaves you with only option to reboot the device to bring back USB bus to life.
  • using uhubctl package, which fortunately is available in regular raspbian (Volumio) repositories

So I did:
sudo apt-get update
sudo apt-get install uhubctl

and then D10S can be powered off by doing:
sudo uhubctl -p 2 -a off

to turn it back on do
uhubctl -p 2 -a on

Please note that on Raspberry Pi B+,2B,3B ports 2-5 have ganged power control (can not be controlled individually), all are controlled by port 2, trying to control ports 3,4,5 will not do anything.

Fortunately Port 1 controls power for Ethernet+WiFi, so when you power off the other ports you do not loose connectivity to Volumio.

For further simplifying of power control (permissions etc) please check uhubctl’s author GitHub page at

So now I’m able to power off D10S dac without powering off Raspberry Pi 3B+!

Hope this helps someone else, too.

2 Likes

Thanks for the information.

I have same problem my D90SE with volumio3.

Just I wonder I have seen it is turned off when I connect my D90se to PC and there is no sound played for certain amount time, it is turned off.

I am still thinking if there something control(able) in volumio3.

How did you automate the USB power on/off? Or do you run a command manually to flip the power on the usb port?

I’m trying to set up a Topping D10s also. I can get the usb control working but ideally I’d like the power control to be automatic.

Thanks.

unfortunately, no automation… just ssh into the RPI and do uhubctl -p 2 -a on to start it… I usually power it on at the beginning of my work and power it off when I finish, so not much interaction.

I auto power down the Pi at night. Not too elegant but it saves a (tiny) bit of electricity.

@afternine - Thanks.
@SimonE - How did you power it off overnight (I assume to a schedule)?

I have a cunning plan. I think I’m going to do two things:

  1. Configure the Pi to turn off overnight based on a schedule.
  2. Write a script that controls the power to the USB port (using uhubctl) based on the Pi detecting whether one of the devices in my home offices (which is where my powered speakers are, which the DAC is plugged in to) is turned on. I should be able to do that by scanning the network for a device using the MAC address of either my Mac mini or work laptop. If either are on then I’m likely in the office and want to play music. nmap should be able to do the scan for me. I’ll just need a little bit of bash scripting to wire that up to uhubctl.

I have (hopefully) attached a pair of bash scripts you might find useful. The scripts comprise a watchdog script and a delayed trigger script. I didn’t write them for Volumiuo but have added a line to poll the MPD player status.

The idea is the watchdog script is scheduled to run every few minutes with cron or systemd. If the MPD player is stopped or paused when the watchdog runs the trigger script is started. If MPD is playing and a trigger is waiting the watchdog kills the trigger. If the trigger wait time expires, a shutdown script (or whatever) is called.

wait_trigger.zip (2.5 KB)

HTH

Interesting, thanks. I’ll test it tomorrow.

On USB this is quite harsh, yes.

This is because USB always has power enabled. When stopping playback of the DAC volumio is not keeping the USB DAC busy. It has fully stopped using this device and correctly closed it. The issue you are experiencing however as many devices USB has a clock when using 48Khz as output this clock is 48Khz. So, even when you disable the DAC USB playback USB still needs a clock. In this case the clock remains at 48Khz. The DAC now still sees this 48Khz clock and sees this as a valid clock.

Enabling and disabling of USB might indeed not be ideal as it is common practice to have an ethernet adapter on this powerline as well. On the other hand this is probably the only thing that works. There probably are also circuits available on the internet which you can control via GPIO to disable and enable power, but that would be quite hacky as well.

I also think the use case is that: “If I turnoff my PC the DAC goes into sleep mode.”. Rather than: “If I stop music playback the DAC goes into sleep mode.”.

1 Like

That sounds better than my solution. I didn’t realise you could detect the player status. I’ll take a look at the script. Thanks.

MPD has a telnet like interface on port 6600.

Forgot to mention, you will need to install netcat.

Two variables will heed adjusting, In wait_trigger.sh WAIT_TIME is currently set to 1m for testing but you will want to increase it, In wait_.sh TRIGGER_CMD is the command that is triggered when WAIT_TIME expires.

Scripts will need to be copied somewhere they can be read and marked executable.

Let me know if you need any more help.