RPi: add udev rule to increase alsa buffer size to 1.2MB

The default of 512k is too small at 192kHz/8ch, kodi can only get a
86ms buffer instead of the 200ms buffer it usually wants. That results
in occasional buffer underruns when playing media from local storage
which is uncached in kodi's default settings.

Increase the alsa buffer size to 1.2MB so kodi can get the audio buffer
size it likes to have.

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2021-02-26 00:10:37 +01:00
parent d210b2b774
commit 4a301de44c

View File

@ -0,0 +1,3 @@
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="pcmC*", ATTRS{id}=="vc4hdmi*", \
ENV{.snd_card}="$id", \
RUN+="/bin/sh -c 'echo 1280 > /proc/asound/$env{.snd_card}/pcm0p/sub0/prealloc'"