How to achieve bit perfect audio output

Hello @all,
i’m trying to achieve bit perfect audio on EOS-kde. I’m using the audacious player and an ifi zen dac v2, which is capable to deal with PCM 44,1/48/88,2/96/176,4/192/352,8/384 kHz sampling-rates.
I’ve already copied the pipewire.conf file from /usr/share/ into /etc/pipewire/ and changed the default.clock.allowed-rates = [ 44100 48000 88200 96000 176400 192000 352800 384000 ]. I’ve commented out the line in question (No. 30) in the file, too.
When i’m playing music in i.g. 24/96 format the output of the command >cat /proc/asound/card1/pcm0p/sub0/hw_params< is 32/48. Same with other formats.
How can i put altering formats (bit depth and sampling rates) to work? Thanks a lot in advance!

It’s worth noting that there have been feature requests to allow setting the bit depth directly in the pipewire.conf file, similar to how the default.clock.allowed-rates parameter works. However, as of now, the bit depth is controlled indirectly through the default.clock.allowed-rates parameter

I comprehend. But fact is also, that the default.clock.allowed-rates don’t work correctly. It’s always 48kHz, despite i’ve set them according to the above scheme. Is there any possibility to make the sample-rates work suitably?

Not sure, i’m on jack2 myself…
Perhaps @joekamprad or @dalto could help with that.

no clue about what exactly this will be :wink:

I would expect a source of 24/96 format to be played back as such and not generally in 32/48.

could also something that need to get set inside a:
(user dropin for: /usr/share/wireplumber/main.lua.d/50-alsa-config.lua)

--["audio.channels"]         = 2,
--["audio.format"]           = "S16LE",
--["audio.rate"]             = 44100,
--["audio.allowed-rates"]   = "32000,96000",
--["audio.position"]         = "FL,FR",
--["api.alsa.period-size"]   = 1024,

and i saw this too:

No. 5.1.8 [ ]: This is exactly what i did. But different to the developer’s description Pipewire doesn’t switch. It remains at 32/48.
I’m going to give “wireplumber” a try.

mkdir -p ~/.config/wireplumber/main.lua.d
cp /usr/share/wireplumber/main.lua.d/50-alsa-config.lua ~/.config/wireplumber/main.lua.d/50-alsa-config.lua

and set it up according to your needs it will be used over the degfault system setting when you login as user…

after it simply reboot or restart the services…

systemctl --user restart wireplumber.service pipewire-pulse.service pipewire.service

thank you @joekamprad
Now i have installed the wireplumber-file and made a change in line 141 (audio allowed rates): “32000 384000”. This effort doesn’t help.
I also made a change in the pipewire.conf-file by setting the default.clock.rate to 96000. As a result, all music files are now started with 32/96.
I’m rather confused since there it seems to work at least with the sample-rates:


(same as here: )
There is no file alsa-monitor.conf in /usr/share/ .

this one will be what you have using wireplumber pipewire-media-session is not used …

providing usr/share/pipewire/media-session.d/alsa-monitor.conf

But pipewire-media-session was there before as an example for what wireplumber does now…

i see:
usr/share/wireplumber/scripts/monitors/alsa.lua shipped with wireplumber…

but dfrom what i can see /usr/share/wireplumber/main.lua.d/50-alsa-config.lua is holding: = {

Not sure it can help, but last year there was a time when the clock rate was blocked to 48kHz when waking up from suspend. The solution I found was to change the rate from 48kHz to 96 in ~/.config/pipewire/pipewire.conf
(DAC Topping E50)

    ## Properties for the DSP configuration.
    default.clock.rate          = 96000

Thank you @joekamprad and thank you @vazicebon !
Now i got the correct sample-rate while the bit depth still stucks at 32bit. (I guess, the latter is negligible at a first step).
What i did is to change the settings in the player audacious from audio → output-plugin pipewire-output to audio → alsa output.
Now it works fine at least with a view of the sample-rate. I will see if i can force the bit depth to obey. For the time being i’m lucky that i works with the correct sample-rate.
@vazicebon The default.clock.rate was already set to 98kHz.

1 Like

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