Skip to content

Instantly share code, notes, and snippets.

@coffnix
Last active June 4, 2025 07:36
Show Gist options
  • Save coffnix/78ec05de7ad5944f0f9e05d960276cee to your computer and use it in GitHub Desktop.
Save coffnix/78ec05de7ad5944f0f9e05d960276cee to your computer and use it in GitHub Desktop.
Configuração otimizada do shairport-sync para reprodução via AirPlay 2 com backend ALSA, utilizando interpolação soxr, saída em S32_LE, buffers ampliados para estabilidade, e controle de volume desabilitado para garantir fidelidade bit-perfect. Ideal para sistemas de áudio de alta resolução com DACs dedicados. 4.3.7-3-g97fefb43-AirPlay2-smi10-Op…
pcm.shairport {
type plug
slave.pcm "dmix_shairport"
}
pcm.dmix_shairport {
type dmix
ipc_key 2048
slave {
pcm "hw:0,0"
rate 44100
format S32_LE
period_size 2048
buffer_size 65536
}
bindings {
0 0
1 1
}
}
pcm.softvol44100 {
type plug
slave.pcm "dmix_shairport"
}
pcm.resample44100 {
type rate
slave {
pcm "hw:0,0"
rate 44100
}
}
ctl.softvol44100 {
type hw
card 0
}
pcm.softvol_direct {
type plug
slave.pcm "dmix_shairport"
}
4.3.7-3-g97fefb43-AirPlay2-smi10-OpenSSL-Avahi-ALSA-soxr
./configure --sysconfdir=/usr/local/etc --with-alsa --with-linear --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2
general = {
name = "x570";
interpolation = "soxr";
ignore_volume_control = "yes";
volume_range_db = 80;
volume_max_db = 0.0;
volume_control_profile = "dasl_tapered";
high_threshold_airplay_volume = -16.0;
high_volume_idle_timeout_in_minutes = 180;
drift_tolerance_in_seconds = 0.020;
resync_threshold_in_seconds = 0.100;
resync_recovery_time_in_seconds = 0.100;
audio_backend_silent_lead_in_time = 0.1;
audio_backend_buffer_desired_length_in_seconds = 0.2;
};
alsa = {
output_device = "softvol44100";
mixer_device = "hw:0";
output_rate = 44100;
output_format = "S32"; // evita glitch de upsampling esquisito
disable_synchronization = "no";
use_precision_timing = "yes"; // timing mais fino
buffer_size = 65536;
period_size = 16384;
use_mmap_if_available = "no"; // em Creative vai dar chiado, melhor off, nunca ative
use_hardware_mute_if_available = "no";
maximum_stall_time = 0.200;
disable_standby_mode = "auto";
disable_standby_mode_silence_threshold = 0.020;
disable_standby_mode_silence_scan_interval = 0.02;
audio_backend_silent_lead_in_time = 0.03;
};
dsp = {
loudness = "no";
loudness_reference_volume_db = -50.0;
};
diagnostics = {
log_verbosity = 1;
log_show_file_and_line = "yes";
log_show_time_since_last_message = "yes";
log_output_to = "/var/log/shairport-sync.log";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment