Sound output starts delayed. Cant force sampling rate on boot

Whenever the PC boots and I start playing some audio, HDMI audio starts playing after 3 seconds. Before playing any audio file, if I run this command: pacmd list-sinks | grep sample, I get this output:

sample spec: s16le 2ch 44100Hz
sample spec: s16le 2ch 44100Hz

After playing some files and experiencing the 3-second delay, if I rerun the same command, I see this output:

sample spec: s16le 2ch 48000Hz
sample spec: s16le 2ch 44100Hz

Therefore, I assume the delay is due to changing the audio sample rate from 44100Hz to 48000Hz. In order to force 48000Hz on boot, in the file /etc/pulse/daemon.conf I updated the values to:
; default-sample-format = s16le ; default-sample-rate = 48000 ; alternate-sample-rate = 48000

Also in files /etc/pulse/default.pa and /etc/pulse/system.pa have commented out load-module module-suspend-on-idle.

However, on boot, the sample rate remains at 44100Hz for both cases. Any help is appreciated.

Asked By: muddu

||

If you look above, you will see Default values are commented out. Use either ; or # for. Remove the ; to uncomment the lines:

default-sample-format = s16le
default-sample-rate = 48000
alternate-sample-rate = 48000
Answered By: Daniel T