Skip to content

Instantly share code, notes, and snippets.

@scientress
Last active March 29, 2025 17:32
Show Gist options
  • Save scientress/b7fd79ac761a8574842b96f15696c2b7 to your computer and use it in GitHub Desktop.
Save scientress/b7fd79ac761a8574842b96f15696c2b7 to your computer and use it in GitHub Desktop.
Spotify's Inferno (Spotify to DANTE)
pcm.inferno_spotify {
type inferno
@args.DEVICE_ID { type string }
@args.BIND_IP { type string }
@args.PROCESS_ID { type string }
@args.CLOCK_PATH { type string }
@args.RX_LATENCY_NS { type string }
@args.TX_LATENCY_NS { type string }
# note: too long ALSA device string may not work in some or all apps (noticed in PipeWire)
# so if you need to change them, better configure all needed settings below
# and remove corresponding "@args. ..." lines above
NAME "Spotify"
DEVICE_ID $DEVICE_ID
BIND_IP $BIND_IP
SAMPLE_RATE 48000
PROCESS_ID $PROCESS_ID
ALT_PORT 6000
RX_CHANNELS 0
TX_CHANNELS 2
CLOCK_PATH $CLOCK_PATH
RX_LATENCY_NS $RX_LATENCY_NS
TX_LATENCY_NS $TX_LATENCY_NS
hint {
show off
description "Inferno ALSA virtual device for Spotifyd"
}
}
pcm.spotifyd {
type rate
converter "speexrate_best" # could aslo be speexrate_medium or samplerate (lowest quality)
slave {
pcm "inferno_spotify"
rate 48000
format S32_LE
}
}

Spotify's Inferno (Spotify to DANTE)

How to setup spotifyd and inferno to have a spotify connect device in your local network that outputs via DANTE.

Guide

  • Install spotifyd, clone and compile infero following the guid in the repo, but skip the asoundrc step.
  • Use the asoundrc file from this Gist instead of the the one from inferno.
  • Stat starlet and then spotifyd with the config provided below.

Known Issues

Spotifyd stops audio output when nothing is playing. That causes the the rtp stream to stop. Some dante devices don't like that. It will also show up as an error in Dante Controler

[global]
#---------#
# GENERAL #
#---------#
# The name that gets displayed under the connect tab on
# official clients.
device_name = "Spotify's Inferno (DANTE)"
# The displayed device type in Spotify clients.
# Can be unknown, computer, tablet, smartphone, speaker, t_v,
# a_v_r (Audio/Video Receiver), s_t_b (Set-Top Box), and audio_dongle.
device_type = "a_v_r"
#-------#
# AUDIO #
#-------#
backend = "alsa"
device = "spotifyd"
audio_format = "S32"
#volume_controller = "none" # set to none if you don't want to be able to change the volume within spotify
# The audio bitrate. 96, 160 or 320 kbit/s
bitrate = 320
[global]
#---------#
# GENERAL #
#---------#
# The name that gets displayed under the connect tab on
# official clients.
device_name = "Spotify's Inferno (DANTE)"
# The displayed device type in Spotify clients.
# Can be unknown, computer, tablet, smartphone, speaker, t_v,
# a_v_r (Audio/Video Receiver), s_t_b (Set-Top Box), and audio_dongle.
device_type = "a_v_r"
# The directory used to store credentials and audio cache.
# Default: infers a sensible cache directory (e.g. on Linux: $XDG_CACHE_HOME)
#
# Note: The file path does not get expanded. Environment variables and
# shell placeholders like $HOME or ~ don't work!
#cache_path = "/full/path/to/cache/directory"
# If set to true, audio data does NOT get cached.
# In this case, the cache is only used for credentials.
#no_audio_cache = true
# The maximal size of the cache directory in bytes
# The example value corresponds to ~ 1GB
#max_cache_size = 1000000000
# If set to true, `spotifyd` tries to bind to dbus (default is the session bus)
# and expose MPRIS controls. When running headless, without the session bus,
# you should set this to false, to avoid errors. If you still want to use MPRIS,
# have a look at the `dbus_type` option.
#use_mpris = true
# The bus to bind to with the MPRIS interface.
# Possible values: "session", "system"
# The system bus can be used if no graphical session is available
# (e.g. on headless systems) but you still want to be able to use MPRIS.
# NOTE: You might need to add appropriate policies to allow spotifyd to
# own the name.
#dbus_type = "session"
#-----------#
# DISCOVERY #
#-----------#
# If set to true, this disables zeroconf discovery.
# This can be useful, if one prefers to run a single-user instance.
#disable_discovery = false
# The port at which `spotifyd` is going to offer its service over the network (TCP).
# If not set, a random port > 1024 is used. For the service to be discoverable on the
# local network via mDNS, both the mDNS port (5353 UDP) and the random or fixed
# zeroconf port need to be allowed through any active firewall.
#zeroconf_port = 1234
#-------#
# AUDIO #
#-------#
# The audio backend used to play music. To get
# a list of possible backends, run `spotifyd --help`.
backend = "alsa" # use portaudio for macOS [homebrew]
# The alsa audio device to stream audio. To get a
# list of valid devices, run `aplay -L`,
device = "spotifyd" # omit for macOS
# The PCM sample format to use. Possible values
# are F32, S32, S24, S24_3, S16.
# Change this value if you encounter errors like
# "Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_format' failed with error 'EINVAL: Invalid argument'"
audio_format = "S32"
# The volume controller. Each one behaves different to
# volume increases. For possible values, run
# `spotifyd --help`.
#volume_controller = "none" # set to none if you don't want to be able to change the volume within spotify
# ! Only relevant for ALSA !
# The alsa control device. By default this is the same
# name as the `device` field.
#control = "default"
# ! Only relevant for ALSA !
# The alsa mixer used by `spotifyd`.
#mixer = "PCM" # omit for macOS
# The audio bitrate. 96, 160 or 320 kbit/s
bitrate = 320
# Volume on startup between 0 and 100
#initial_volume = 100
# If set to true, enables volume normalisation between songs.
#volume_normalisation = true
# The normalisation pregain that is applied for each song.
#normalisation_pregain = -10
#-------ä
# OTHER #
#-------#
# After the music playback has ended, start playing similar songs based on the previous tracks.
# By default, `spotifyd` infers this setting from the user settings.
#autoplay = true
# A command that gets executed in your shell after each song changes.
#on_song_change_hook = "echo \"hook executed on $PLAYER_EVENT\""
# The proxy `spotifyd` will use to connect to spotify.
#proxy = "http://proxy.example.org:8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment