10-10-2020, 08:48 PM
(10-10-2020, 02:20 PM)Tim Curtis Wrote: Hi Jason,
Is it the app or is it ALSA that sets the period and buffer sizes?
Here is when MPD is playing. MPD is configured to output to hw:2,0
Code:pi@rp3:~ $ cat /proc/asound/card2/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 5513
buffer_size: 22050
I don't have a Spotify Premium account so not able to test librespot but here is when Airplay renderer is playing. The period_size is same as that reported for when librespot is playing. Shairport-sync is configured to output to plughw:2,0
Code:pi@rp3:~ $ cat /proc/asound/card2/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 256
buffer_size: 262144
-Tim
Looks like the airplay alsa backend suck too.
For my money a 1 sec buffer with 4 periods is a good safe starting point. MPD seems to be well behaved so it might not be a bad idea to route non-mpd outputs though a custom pcm to make them behave.