No headphones output on Debian Buster

Two users on a Debian Facebook group provided the answer for this one. First I had to install libsamplerate0 and uncomment the lines

resample-method = src-sinc-best-quality

on the file /etc/pulse/daemon.conf; actually the first line has other sampling method by default, that's why it is necessary to install libsamplerate0. Then I had to create the file /etc/modprobe.d/alsa.conf with the single line

options snd-hda-intel model=headset-mic

and then restart alsa and pulseaudio services. Now audio works both on the internal speakers and on headphones/speakers plugged in the audio jack.