How to change sampling rate and bit depth?

Hello!

Am trying to use my DACs to their full potential, usually around 192Khz/24bit. The 24 bit part is as easy as plug and play, but according to the DAC’s screen, it stays in 48Khz, even though I have modified pipewire.conf to have 96000 as the default.clock.rate and added it to the default.clock.allowed-rates list.

I also copy and pasted this pipewire.conf file from /usr/share/pipewire in /etc/pipewire to no avail. I had to create that pipewire folder by the way, didn’t exist in /etc/

I couldn’t find any other way to change sampling rate … Am I doing something wrong or missing something?

I tried playing music files with bigger than 48Khz sampling rate on Audacious in hope that it might automatically changed depending on the source, but it stays at 48Khz/24bits all the time, hell, even if I change the audio depth in Audacious’ settings to be 16 bits …

Hi, each client (example Firefox, Audacious, Rhytmbox), they usually use different config and not directly to access pipewire.conf. Maybe you also need to change client.conf, client-rt.conf, and pipewire-pulse.conf, especially with pipewire-pulse.conf since lot of clients using this configuration as a compatibility with pulseaudio.

Update:

You can check by opening Audacious, then run in terminel pw-cli dump Client. Find the ID that have variable something like application.name = "Audacious" then with the same ID find client.api = or config.name = . It will give information which *.conf being use.

2 Likes

Thanks for your help! Am not sure what change am supposed to make to pipewire-pulse.conf, Here’s what I’ve done from what I understood from the pipewire wiki, I uncommented and modified these lines(and then copied it in /etc/ :

            pulse.min.req          = 256/48000     # 5ms
            pulse.default.req	   = 960/88200     # 20 milliseconds
            #pulse.min.frag         = 256/48000     # 5ms
            #pulse.default.frag     = 96000/48000   # 2 seconds
            pulse.default.tlength  = 96000/192000   # 2 seconds

It still stays at 48Khz on both of my DACs (testing with 192Khz, 96000 and such files).

By the way I read that “Jack” can launch programs with specific bit depth and sampling rate, like this PIPEWIRE_LATENCY=“1024/192000” software (I tried Firefox and Audacious), but same.

It’s maddening when the DACs go to 192Khz plug and play on Android and players with firmwares based on the Linux kernel …

Found my mistake, I didn’t copy pipewire.conf in ~/.config/pipewire/ as indicated in the Arch Wki.

with uncommenting

    default.clock.rate          = 96000
    default.clock.allowed-rates = [ 44100 48000 88200 96000 192000 ]

it works perfectly on all apps! It’s quite nice to see the sample rate change on the small little screen of the DAC depending of the files sampling rate being played … Tested on a Surfans F20 and an xDuoo XD-05 basic, can’t be happier!

2 Likes

Awesome!

I change the solution mark to your comment since it more specific solution to your problem.

2 Likes

Thank you for your solution. I am a linux newbie and had successfully managed to changed the sampling rate following this instruction. It’s been almost a week since I migrated to fedora. It’s been great but audio is the one problem I had no chance of fixing till now. Grateful.

I tried looking through the wiki (tried being the keyword), and the life of me, can’t seem to find the way to change the bit depth.

Could someone point me out in the right direction?