#!/bin/sh

# Use tsched=0 for HDMI audio. (LP: #1410005)
sed -i 's/^load-module module-udev-detect$/load-module module-udev-detect tsched=0/' /etc/pulse/default.pa

# Enable zswap (LP: #1439916)
if ! grep lz4 /etc/initramfs-tools/modules >/dev/null 2>&1; then
    echo "lz4" >> /etc/initramfs-tools/modules
fi
update-initramfs -u

# Enable Gateway for Bluetooth audio (LP: #1435696)
if ! grep ^Enable=Gateway$ /etc/bluetooth/audio.conf >/dev/null 2>&1; then
    echo "Enable=Gateway" >> /etc/bluetooth/audio.conf
fi
