Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7c9d0ff
Align branch with latest work from pull request #2514 to permit share…
bradkeifer Oct 29, 2025
34f5d79
Implement base for pairing
marcelveldt Oct 29, 2025
384a5bf
Merge branch 'dev' into airplay-2
marcelveldt Oct 29, 2025
ec58853
extend models
marcelveldt Oct 29, 2025
d1ead37
refactor into more useable code
marcelveldt Oct 30, 2025
86ba8e4
more tweaks
marcelveldt Oct 30, 2025
b34b0e8
add AsyncNamedPipe helper
marcelveldt Oct 31, 2025
a65fc89
Refactor Airplay provider a bit
marcelveldt Oct 31, 2025
c15841f
Merge branch 'dev' into airplay-2
marcelveldt Oct 31, 2025
2783210
Refactor Airplay provider a bit
marcelveldt Oct 31, 2025
5fa757b
Merge branch 'dev' into airplay-2
marcelveldt Oct 31, 2025
a0ba350
Merge branch 'dev' into airplay-2
marcelveldt Oct 31, 2025
49fb75e
unhide AirPlay 2 option
marcelveldt Oct 31, 2025
78a0df6
Merge branch 'dev' into airplay-2
marcelveldt Oct 31, 2025
5e32f58
Merge branch 'dev' into airplay-2
marcelveldt Oct 31, 2025
607bf2e
minor changes in attempt to get cliap2 spawning to work
bradkeifer Oct 31, 2025
0f0b5fc
Merge branch 'dev' into airplay-2
marcelveldt Oct 31, 2025
7980de5
update pipes before starting cliap2
marcelveldt Oct 31, 2025
45f8e6c
Merge branch 'dev' into airplay-2
marcelveldt Oct 31, 2025
e0d9f45
Include (first version of) the ap2 binaries
marcelveldt Oct 31, 2025
d36a59e
Merge branch 'dev' into airplay-2
marcelveldt Oct 31, 2025
f013aa4
Open named pipes in correct order
marcelveldt Oct 31, 2025
175a659
named pipes workaround
marcelveldt Oct 31, 2025
9d12914
Merge branch 'dev' into airplay-2
marcelveldt Nov 1, 2025
d4d38f8
compatibility fixes with recent base changes
marcelveldt Nov 1, 2025
343906e
Merge branch 'dev' into airplay-2
marcelveldt Nov 1, 2025
b79e0bb
Adjust AP2 code to new base implementation
marcelveldt Nov 1, 2025
9260a61
Fix player config entries for AP2
marcelveldt Nov 2, 2025
aaf3026
Adjust for latest changes in the cliap2 binary
marcelveldt Nov 2, 2025
94ba683
updated binaries
marcelveldt Nov 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
392 changes: 392 additions & 0 deletions music_assistant/providers/airplay/bin/cliap2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,392 @@
# A quick guide to configuring cliap2:
#
# In all likelihood, there's nothing you need to do!

general {
# Username
# Make sure the user has read access to the library directories you set
# below, and full access to the databases, log and local audio
uid = ""

# Database location
# db_path = "/usr/local/var/cache/cliap2/songs3.db"

# Database backup location
# Uncomment and specify a full path to enable ability to use REST endpoint
# to initiate backup of songs3.db
# db_backup_path = "/usr/local/var/cache/cliap2/songs3.bak"

# Log file and level
# BK: Not sure how logfile will work when more than one instance of cliap2 running? Test it!
# Available levels: fatal, log, warning, info, debug, spam
# logfile = "/usr/local/var/log/cliap2.log"
# logfile = "/var/log/cliap2.log"
loglevel = log

# Admin password for the web interface
# Note that access to the web interface from computers in
# "trusted_network" (see below) does not require password
# admin_password = ""

# Websocket port for the web interface.
# websocket_port = 3688

# Websocket interface to bind listener to (e.g. "eth0"). Default is
# disabled, which means listen on all interfaces.
# websocket_interface = ""

# Sets who is allowed to connect without authorisation. This applies to
# client types like Remotes, DAAP clients (iTunes) and to the web
# interface. Options are "any", "lan", "localhost", "none" or the prefix
# to one or more ipv4/6 networks. The default is { "lan" }
# trusted_networks = { "lan" }

# Enable/disable IPv6
# ipv6 = no

# Set this if you want the server to bind to a specific IP address. Can
# be ipv6 or ipv4. Default (commented out or "::") is to listen on all
# IP addresses.
# bind_address = "::"

# Directory where the server keeps cached data
# cache_dir = "/usr/local/var/cache/cliap2"

# DAAP requests that take longer than this threshold (in msec) get their
# replies cached for next time. Set to 0 to disable caching.
# cache_daap_threshold = 1000

# When starting playback, autoselect speaker (if none of the previously
# selected speakers/outputs are available)
# speaker_autoselect = no

# Most modern systems have a high-resolution clock, but if you are on an
# unusual platform and experience audio drop-outs, you can try changing
# this option
# high_resolution_clock = yes
}

# Music Assistant integration settings
mass {
# Automatically start playback when PCM data read on stdin
# autostart = yes

# PCM data quality
# sample rate and bits per sample of the PCM data sent from Music Assistant
# pcm_sample_rate = 44100
# pcm_bits_per_sample = 16
}

# Library configuration
library {
# Name of the library as displayed by the clients (%h: hostname). If you
# change the name after pairing with Remote you may have to re-pair.
name = "My Music on %h"

# TCP port to listen on. Default port is 3689 (daap)
port = 3689

# Password for the library. Optional.
# password = ""

# Directories to index
directories = { "/srv/music" }

# Follow symlinks. Default: true.
# follow_symlinks = true

# Directories containing podcasts
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# podcasts. Eg. if you index /srv/music, and your podcasts are in
# /srv/music/Podcasts, you can set this to "/Podcasts".
# (changing this setting only takes effect after rescan, see the README)
podcasts = { "/Podcasts" }

# Directories containing audiobooks
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# audiobooks.
# (changing this setting only takes effect after rescan, see the README)
audiobooks = { "/Audiobooks" }

# Directories containing compilations (eg soundtracks)
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# compilations.
# (changing this setting only takes effect after rescan, see the README)
compilations = { "/Compilations" }

# Compilations usually have many artists, and sometimes no album artist.
# If you don't want every artist to be listed in artist views, you can
# set a single name which will be used for all compilation tracks
# without an album artist, and for all tracks in the compilation
# directories.
# (changing this setting only takes effect after rescan, see the README)
compilation_artist = "Various Artists"

# If your album and artist lists are cluttered, you can choose to hide
# albums and artists with only one track. The tracks will still be
# visible in other lists, e.g. songs and playlists. This setting
# currently only works in some remotes.
# hide_singles = false

# Internet streams in your playlists will by default be shown in the
# "Radio" library, like iTunes does. However, some DAAP clients (like
# TunesRemote+) won't show the "Radio" library. If you would also like
# to have them shown like normal playlists, you can enable this option.
# Note this option is only for DAAP clients (so not the web interface).
# radio_playlists = false

# These are the default playlists. If you want them to have other names,
# you can set it here.
# name_library = "Library"
# name_music = "Music"
# name_movies = "Movies"
# name_tvshows = "TV Shows"
# name_podcasts = "Podcasts"
# name_audiobooks = "Audiobooks"
# name_radio = "Radio"

# Artwork file names (without file type extension)
# OwnTone will look for jpg and png files with these base names
# artwork_basenames = { "artwork", "cover", "Folder" }

# Enable searching for artwork corresponding to each individual media
# file instead of only looking for album artwork. This is disabled by
# default to reduce cache size.
# artwork_individual = false

# File types the scanner should ignore
# Non-audio files will never be added to the database, but here you
# can prevent the scanner from even probing them. This might improve
# scan time. By default .db, .ini, .db-journal, .pdf and .metadata are
# ignored.
# filetypes_ignore = { ".db", ".ini", ".db-journal", ".pdf", ".metadata" }

# File paths the scanner should ignore
# If you want to exclude files on a more advanced basis you can enter
# one or more POSIX regular expressions, and any file with a matching
# path will be ignored.
# filepath_ignore = { "myregex" }

# Disable startup file scanning
# When OwnTone starts it will do an initial file scan of your
# library (and then watch it for changes). If you are sure your library
# never changes while OwnTone is not running, you can disable the
# initial file scan and save some system resources. Disabling this scan
# may lead to OwnTone's database coming out of sync with the
# library. If that happens read the instructions in the README on how
# to trigger a rescan.
# filescan_disable = false

# Only use the first genre found in metadata
# Some tracks have multiple genres semicolon-separated in the same tag,
# e.g. 'Pop;Rock'. If you don't want them listed like this, you can
# enable this option and only the first genre will be used (i.e. 'Pop').
# only_first_genre = false

# Should metadata from m3u playlists, e.g. artist and title in EXTINF,
# override the metadata we get from radio streams?
# m3u_overrides = false

# Should iTunes metadata override ours?
# itunes_overrides = false

# Should we import the content of iTunes smart playlists?
# itunes_smartpl = false

# Transcoding options for DAAP and RSP clients
# Since iTunes has native support for mpeg, mp4a, mp4v, alac and wav,
# such files will be sent as they are. Any other formats will be
# transcoded. Some other clients, including Roku/RSP, announce what
# formats they support, and the server will transcode to one of those if
# necessary. Clients that don't announce supported formats are assumed
# to support mpeg (mp3), wav and alac.
# Here you can change when and how to transcode. The settings *only*
# affect serving audio to DAAP and RSP clients, they have no effect on
# direct AirPlay, Chromecast and local audio playback.
# Formats: mp4a, mp4v, mpeg, alac, flac, mpc, ogg, wma, wmal, wmav, aif, wav
# Formats that should never be transcoded
# no_decode = { "format", "format" }
# Formats that should always be transcoded
# force_decode = { "format", "format" }
# Prefer transcode to wav (default), alac or mpeg (mp3 with the bit rate
# configured below in the streaming section). Note that alac requires
# precomputing and caching mp4 headers, which takes both cpu and disk.
# prefer_format = "format"

# Set ffmpeg filters (similar to 'ffmpeg -af xxx') that you want the
# server to use when decoding files from your library. Examples:
# { 'volume=replaygain=track' } -> use REPLAYGAIN_TRACK_GAIN metadata
# { 'loudnorm=I=-16:LRA=11:TP=-1.5' } -> normalize volume
# decode_audio_filters = { }

# Watch named pipes in the library for data and autostart playback when
# there is data to be read. To exclude specific pipes from watching,
# consider using the above _ignore options.
# pipe_autostart = true

# Enable automatic rating updates
# If enabled, rating is automatically updated after a song has either been
# played or skipped (only skipping to the next song is taken into account).
# The calculation is taken from the beets plugin "mpdstats" (see
# https://beets.readthedocs.io/en/latest/plugins/mpdstats.html).
# It consist of calculating a stable rating based only on the play- and
# skipcount and a rolling rating based on the current rating and the action
# (played or skipped). Both results are combined with a mix-factor of 0.75:
# new rating = 0.75 * stable rating + 0.25 * rolling rating)
# rating_updates = false

# By default, ratings are only saved in the server's database. Enable
# the below to make the server also read ratings from file metadata and
# write on update (requires write access). To avoid excessive writing to
# the library, automatic rating updates are not written, even with the
# write_rating option enabled.
# read_rating = false
# write_rating = false
# The scale used when reading/writing ratings to files
# max_rating = 100

# Allows creating, deleting and modifying m3u playlists in the library directories.
# Only supported by the player web interface and some mpd clients
# Defaults to being disabled.
# allow_modifying_stored_playlists = false

# A directory in one of the library directories that will be used as the default
# playlist directory. OwnTone creates new playlists in this directory if only
# a playlist name is provided (requires "allow_modify_stored_playlists" set to true).
# default_playlist_directory = ""

# By default OwnTone will - like iTunes - clear the playqueue if
# playback stops. Setting clear_queue_on_stop_disable to true will keep
# the playlist like MPD does. Note that some dacp clients do not show
# the playqueue if playback is stopped.
# clear_queue_on_stop_disable = false
}

# ALSA device settings
# If you have multiple ALSA devices you can configure them individually via
# sections like the below. Make sure to set the "card name" correctly. See the
# README about ALSA for details. Note that these settings will override the ALSA
# settings in the "audio" section above.
#alsa "card name" {
# Name used in the speaker list. If not set, the card name will be used.
# nickname = "Computer"

# Mixer channel to use for volume control
# If not set, PCM will be used if available, otherwise Master
# mixer = ""

# Mixer device to use for volume control
# If not set, the card name will be used
# mixer_device = ""
#}

# Pipe output
# Allows OwnTone to output audio data to a named pipe
#fifo {
# nickname = "fifo"
# path = "/path/to/fifo"
#}

# AirPlay settings common to all devices
#airplay_shared {
# UDP ports used when airplay devices make connections back to
# OwnTone (choosing specific ports may be helpful when running
# OwnTone behind a firewall)
# control_port = 0
# timing_port = 0

# Switch Airplay 1 streams to uncompressed ALAC (as opposed to regular,
# compressed ALAC). Reduces CPU use at the cost of network bandwidth.
# uncompressed_alac = false
#}

# AirPlay per device settings
# (make sure you get the capitalization of the device name right)
#airplay "My AirPlay device" {
# OwnTone's volume goes to 11! If that's more than you can handle
# you can set a lower value here
# max_volume = 11

# Enable this option to exclude a particular AirPlay device from the
# speaker list
# exclude = false

# Enable this option to keep a particular AirPlay device in the speaker
# list and thus ignore mdns notifications about it no longer being
# present. The speaker will remain until restart of OwnTone.
# permanent = false

# Some devices spuriously disconnect during playback, and based on the
# device type OwnTone may attempt to reconnect. Setting this option
# overrides this so reconnecting is either always enabled or disabled.
# reconnect = false

# AirPlay password
# password = "s1kr3t"

# Disable AirPlay 1 (RAOP)
# raop_disable = false

# Name used in the speaker list, overrides name from the device
# nickname = "My speaker name"
#}

# Chromecast settings
# (make sure you get the capitalization of the device name right)
#chromecast "My Chromecast device" {
# OwnTone's volume goes to 11! If that's more than you can handle
# you can set a lower value here
# max_volume = 11

# Enable this option to exclude a particular device from the speaker
# list
# exclude = false

# Name used in the speaker list, overrides name from the device
# nickname = "My speaker name"
#}

# RCP/Roku Soundbridge output settings
# (make sure you get the capitalization of the device name right)
#rcp "My SoundBridge device" {
# Enable this option to exclude a particular device from the speaker
# list
# exclude = false

# A Roku/SoundBridge can power up in 2 modes: (default) reconnect to the
# previously used library (ie OwnTone) or in a 'cleared library' mode.
# The Roku power up behaviour is affected by how OwnTone disconnects
# from the Roku device.
#
# Set to false to maintain default Roku power on behaviour
# clear_on_close = false
#}


# MPD configuration (only have effect if MPD enabled - see README/INSTALL)
mpd {
# TCP port to listen on for MPD client requests.
# Default port is 6600, set to 0 to disable MPD support.
# port = 6600

# HTTP port to listen for artwork requests (only supported by some MPD
# clients and will need additional configuration in the MPD client to
# work). Set to 0 to disable serving artwork over http.
# http_port = 0

# Whether to emit an output with plugin type "httpd" to tell clients
# that a stream is available for local playback.
# enable_httpd_plugin = false
}

# Streaming audio settings for remote connections (ie stream.mp3)
streaming {
# Sample rate, typically 44100 or 48000
# sample_rate = 44100

# Set the MP3 streaming bit rate (in kbps), valid options: 64 / 96 / 128 / 192 / 320
# bit_rate = 192
}
Loading