How can I set the system to use something other than 48KHz?

So I’d like to set my sound output to better match the stuff I usually play. 48KHz isn’t really ideal. What would be most ideal is if it could change output resolution to match the input, but it seems to be a fixed 48KHz no matter what as far as I can tell. Less ideally, but should be good enough, I’d like to set it to a more ideal higher output frequency.

I’ve found previous posts regarding pulseaudio in particular, but the pipewire-pulse configuration seems to work very differently and those instructions don’t seem to work. There isn’t even a /etc/pulse/daemon.conf and adding one definitely did not work. In fact, one of the instructions I followed in a previous post resulted in a broken output. It said 11.2 DSD on the DAC even though it was obviously not. Curiously enough, 11.2 DSD is what Manjaro says after booting up on the login screen and text terminals (the device defaults to 48KHz during system bootup, so this means something is actively being set that probably isn’t working right.) I couldn’t even log in to the GUI because it tried to play a startup sound and the system froze, so the 11.2 DSD is clearly not working. Ideally I would like to also have terminals running at a correct frequency before login in case I ever decide to use a CLI audio player. (I admit this is not likely, but I want to be able to!) Clearly Manjaro’s current audio system has changed significantly from even semi-recent posts…

Getting in further depth, I think 88.2KHz might be the best match. That’s a difference of 2.0x the 44.1KHz stuff I probably most listen to versus 1.08843537415x. (Not to mention that even getting from 48 to 88.2 still has more leeway for a better resample even if it’s still not an integer.) But even just going nuts and setting 192KHz would probably math out better. My output devices support each of these outputs. I think one may not support 32-bit at the ultra-high frequencies (the > 100KHz ones,) so I probably need to use 24-bit. (All of my sources are 16 or 24 anyway.) Actually, it may be possible this output device combo supports 176.4KHz I think (I forget, but I’d swear they both did.) Well, the Modi 2U is the weakest link here, so its limitations are the ones to consider.

For reference, I’m using a cheap Topping D10 clone connected to the PC and then connected via optical to a Schiit Modi 2U which handles the analog line output stage. This gives me the cleanest overall audio with the lowest noise floor (I’m dealing with a lot of noise coming from stuff like my GPU or mb so I have to separate by orders of magnitude to reduce the floor.) The fake D10 has good firmware, even if the hardware is bad. The Modi 2U’s USB mode seems to not work as great as it should (it stopped working outright for a while and now that it works again still has a fair bit of noise.) Basically this completely separates the audio digitally until the final output which has a separate power supply and everything.

Unfortunately, most software doesn’t even have an option to control resampling. I guess it’s all handled by pipewire-pulse (seems to be what Manjaro uses now.) The stuff I have tried doesn’t seem to change it from 48KHz to anything else, so the best I can do is resample higher quality in the software itself so at least the output matches. Few things even offer an option for this however…

As a side note, I’d like to be able to set the resampling that pipewire-pulse uses to a higher quality than the default as well. If that’s possible anyway. If it’s like the old pulse instructions the default really isn’t so great…

pipewire-pulse is there to bridge the gap between the older pulseaudio and the newer pipewire. So software that relies on pulseaudio still works.

Perhaps this will help.

https://wiki.archlinux.org/title/PipeWire#Changing_the_default_sample_rate

Yeah, these are the instructions I tried following before. Doing this results in either nothing (files placed in pipewire-pulse.conf.d) or it saying “11.2 DSD” and sound device timing out and failing (pipewire.conf) I think those instructions work with the assumption an existing pipewire.conf file is already present and you’re editing that and it maybe requires a very specific layout that isn’t present in this previously non-existent file.

BTW, to be absolutely clear, this configuration works fine in everything else in setting different frequencies. In fact, for a split second it does set 44.1KHz and then switches to 48 when I log in. (At least when it’s working.)

I didn’t see anything in those instructions for changing bit-depth btw.

EDIT: I found a sample pipewire.conf in /usr/share/pipewire/pipewire.conf. Copying that over to /etc/pipewire allowed me to edit it. As I suspected, it really does not like that file to not have all the stuff it expects it to have. It seems some things like Audacious will now allow a different frequency (though I guess they aren’t smart enough to tell it what because it jumped to 88.2KHz which is what I set as a default rather than the source file’s audio. Well, that would be a fault of the program itself rather than Pipewire-Pulse I’m sure.)

Still not sure about setting bit-depth, but at least so far everything seems to work.

As a side note, the terminals still start up saying 11.2 DSD. Does Pipewire-Pulse only run when you log into the GUI? I don’t know if I’d ever want CLI audio, but I sort of want it to be possible. EDIT: In fact, switching to a tty actually causes currently playing sound to stop…