Need help with OSMC+Spotify+hifiberry DIGI+

I need help with the use of a Hifiberry DIGI+ sound card on my pi3.

I wrote this howto to setup a spotify connect server on my OSMC:

So far so good. Everything works when using HDMI.

Now I want to connect a Hifiberry Digi+ sound card. Here the problems start, which all have to do with the availability of the soundcard, which results in an error “device or resource busy”.

What I can’t do:

  • have the spotify connect server and OSMC work with the same sound card (digi+).
    This results in an error at the spotify connect server: “device or resource busy”, which I didn’t have when using the HDMI output in the same way.

What I can do:
1 have both simultaneously use the HDMI output (sound+video)
2 have OSMC use the digi+
3 have spotify connect use the digi+, and simultaneously let OSMC use the HDMI output (sound+video)

Ad 3: when I change the input on my AV-receiver, I can hear both are active. This happens only when I select “output=HDMI” in OSMC. The spotify connect server somehow automatically uses the digi+

So my conclusion is: OSMC blocks the digi+, so other programs can’t use it (even when OSMC is not playing anything).

Am I right?
Does anyone have a solution?

No one has a solution?

I found similar problems, but no solution yet.
http://stackoverflow.com/questions/33654974/share-sound-card-between-docker-host-and-container-raspberrypi

There must be some way to make sure OSMC releases the soundcard when not playing anything. Could there be another module, maybe an alternative for or a tool with the ALSA(-utils)? Some script maybe?