#!/usr/bin/env bash targ=/etc/pulse/default.pa sed -i 's/.*load-module module-udev-detect.*/load-module module-udev-detect tsched=0/' $targ conf='options snd-hda-intel vid=8086 pid=8ca0 snoop=0' targ='/etc/modprobe.d/alsa-base.conf' if grep -vq "$conf" $targ; then echo "$conf" >> $targ fi targ=/etc/pulse/daemon.conf sed -i 's/.*default-sample-rate =.*/default-sample-rate = 48000/' $targ sed -i 's/.*alternate-sample-rate =.*/alternate-sample-rate = 96000/' $targ sed -i 's/.*avoid-resampling =.*/avoid-resampling = yes/' $targ sed -i 's/.*resample-method =.*/resample-method = src-sinc-best-quality/' $targ