Pulseaudio avoid resampling not working

I recently bought a Fiio BTR5 external DAC which has an screen that shows the sample rate of the audio output. I realised that it is constantly stuck at 44.1khz even though it supports 384khz.

If I change the default and alternate sample rate in /etc/pulse/default.pa, the sample rate of the DAC does change. It is a little painful to manually change the sample rate setting all the time.

I learned from the ARCH wiki that pulseaudio now supports "avoid resampling=yes", which enables the hardware to play the original sample rate without doing any resampling. I activated this command, however, my DAC is still stuck at the default 44.1khz, no matter what music I play. For example, I tried a music with 192khz, and my DAC was still showing 44.1khz.

Does anyone know how to solve this? Thanks very much.

Some update: I have now changed the default sample rate to 48000 and the alternate sample rate to 44100. Now the output is stuck at 48000, even when I am playing 44100 music.

With what audio device do you feed the DAC?

Please provide more relevant informtion

please post system information - inxi -Fxxxz --no-host

and pulseaudio configuration - pulseaudio --dump-conf

Thanks very much.

inxi -Fxxxz --no-host

Kernel: 5.6.10-3-MANJARO x86_64 bits: 64 compiler: gcc v: 9.3.0
Desktop: Gnome 3.36.2 wm: gnome-shell dm: GDM 3.34.1 Distro: Manjaro Linux
Type: Desktop System: Micro-Star product: Vortex G25 8RE v: REV:1.0
serial: Chassis: type: 3 serial:
Mobo: Micro-Star model: MS-1T31 v: REV:1.0 serial:
UEFI: American Megatrends v: E1T31IMS.103 date: 09/01/2017
Device-1: hidpp_battery_0 model: Logitech Performance MX serial:
charge: 55% (should be ignored) rechargeable: yes status: Discharging
Topology: 6-Core model: Intel Core i7-8700 bits: 64 type: MT MCP
arch: Kaby Lake rev: A L2 cache: 12.0 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 76831
Speed: 4331 MHz min/max: 800/4600 MHz Core speeds (MHz): 1: 4301 2: 4308
3: 4384 4: 4420 5: 4355 6: 4386 7: 4434 8: 4356 9: 4438 10: 4373 11: 4344
12: 4383
Device-1: NVIDIA GP104M [GeForce GTX 1070 Mobile] vendor: Micro-Star MSI
driver: nvidia v: 440.82 bus ID: 01:00.0 chip ID: 10de:1ba1
Device-2: NVIDIA GP102 [GeForce GTX 1080 Ti] vendor: eVga.com. driver: nvidia
v: 440.82 bus ID: 0a:00.0 chip ID: 10de:1b06
Display: x11 server: X.org 1.20.8 driver: nvidia compositor: gnome-shell
OpenGL: renderer: GeForce GTX 1080 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 440.82
direct render: Yes
Device-1: Intel 200 Series PCH HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel bus ID: 00:1f.3 chip ID: 8086:a2f0
Device-2: NVIDIA GP104 High Definition Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel bus ID: 01:00.1 chip ID: 10de:10f0
Device-3: NVIDIA GP102 HDMI Audio vendor: eVga.com. driver: snd_hda_intel
v: kernel bus ID: 0a:00.1 chip ID: 10de:10ef
Device-4: FiiO FiiO BTR5 type: USB driver: snd-usb-audio bus ID: 1-1:13
chip ID: 2972:0047
Sound Server: ALSA v: k5.6.10-3-MANJARO
Device-1: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter
vendor: Bigfoot Networks driver: ath10k_pci v: kernel port: e000
bus ID: 03:00.0 chip ID: 168c:003e
IF: wlp3s0 state: up mac:
Device-2: Qualcomm Atheros Killer E2500 Gigabit Ethernet vendor: Micro-Star MSI
driver: alx v: kernel port: d000 bus ID: 04:00.0 chip ID: 1969:e0b1
IF: enp4s0 state: down mac:
Device-3: Qualcomm Atheros type: USB driver: btusb bus ID: 1-8:5
chip ID: 0cf3:e300
Local Storage: total: 3.24 TiB used: 746.33 GiB (22.5%)
ID-1: /dev/nvme0n1 model: Sabrent size: 1.86 TiB speed: 31.6 Gb/s lanes: 4
serial: rev: RKT303.2 scheme: GPT
ID-2: /dev/sda vendor: Samsung model: MZNLN512HMJP-00000 size: 476.94 GiB
speed: 6.0 Gb/s serial: rev: 100Q scheme: GPT
ID-3: /dev/sdb vendor: HGST (Hitachi) model: HTS721010A9E630 size: 931.51 GiB
speed: 6.0 Gb/s rotation: 7200 rpm serial: rev: A3U0 scheme: GPT
ID-1: / size: 349.56 GiB used: 261.75 GiB (74.9%) fs: ext4 dev: /dev/nvme0n1p2
ID-2: swap-1 size: 8.80 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme0n1p3
System Temperatures: cpu: 56.0 C mobo: 27.8 C gpu: nvidia temp: 46 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Processes: 379 Uptime: 9m Memory: 31.31 GiB used: 4.00 GiB (12.8%)
Init: systemd v: 244 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.16
running in: gnome-terminal inxi: 3.0.37

pulseaudio --dump-conf:

Read from configuration file: /home/xiaochun/.config/pulse//daemon.conf

daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = no
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-13.0/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target =
log-level = notice
resample-method = soxr-vhq
avoid-resampling = yes
enable-remixing = yes
remixing-use-all-sink-channels = yes
enable-lfe-remixing = no
lfe-crossover-freq = 0
default-sample-format = s32le
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 25
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 8000
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 200000

Thank you very much. I have attached the results.

setting for avoid-resampling is changed
and other changes from default are good

resample-method = soxr-vhq
default-sample-format = s32le

only one setting appears to need increasing - default-sample-rate = 48000

suggest change that to - default-sample-rate = 96000
see if it works ok for 96000 before trying for 192000

Thanks very much.

The confusing part is that when I play a 44100 music, the output stays at 48000. Should it be automatically changed to 44100 when avoid-resampling=yes is on?

upsampling 44100 to 48000 is not really a big deal
it will just add extra padding bits and would not improve or detract from audio

having higher samplerates downsampled is the main concern
data will be lost to reduce samplerate or bit-depth

pulseaudio only offer a setting to avoid resampling and not prevent it completely
to avoid any resampling, play audio direct to ALSA hardware devices with no Pulseaudio

This is very reassuring.

It makes sense. However, I am still quite surprised that 44.1khz can't be "avoided". I will try to play audio direct to ALSA hardware devices with no Pulseaudio.

Thanks for your help.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by