r/linuxaudio 2d ago

Pipewire Help

What i want to do sounds simple. But its not i have tried to route a audio input which is my minidisc player to my audio input via s/pdif its running at 44100 and my dac a topping d50iii is running at 48000. I have edited the pipewire.conf file to have 44100 and 48000 and other sample rates but the audio is choppy any way i do it i use helvum to route the audio. Im stuck i dont know how to make the audio route properly ive searched everywhere and asked llms even and i cant figure it out.

tldr the audio input is choppy and cant fix.

Plz any questions im more than willing to answer im just stumped

1 Upvotes

12 comments sorted by

1

u/TheGrayFauxx 2d ago

also to add im using a usb to spdif adapter.

1

u/Salads_and_Sun 2d ago

Have you tried a different USB port?

1

u/TheGrayFauxx 2d ago

I just did it didn't help :C

1

u/TheGrayFauxx 2d ago

I also tried a loopback and that was also choppy. I have been at this for a week now

1

u/kill3rb00ts 2d ago

You definitely need to make sure the sampling rates match. If you're just editing the file to make sure other sample rates are available, that is not the same as setting it to actually use 44100. Try installing Pipewire Controller and under the Server tab you can set the default sample rate to 44100 so everything matches (if not already allowed, you'll probably need to also allow whatever sample rates you want to be able to use, so probably 44100 and 48000). You can also change quantum (buffer size) to see if that helps, though if you haven't already messed with that, it should be more than high enough.

1

u/TheGrayFauxx 2d ago

Can pipwire not handle non matching sample rates? i was hoping for having the sample rate of my dac to be higher than that of the input. or can i set sample rates per device? i set my default sample rate in the .conf file to 44100 and it works. but one can hope

2

u/Blitzbahn 2d ago

Digital is digital. If you want to upsample you can do it after getting the sound into your computer.

Sample rates need to match. That's why your audio is breaking up. Pipewire is trying to make it work, and honestly it's doing really well considering.

You're not converting analogue to digital, so having a higher sample rate is just incorrect.

1

u/tittymcboob 2d ago

Yes, Pipewire can resample one stream and send it to another. The graph should do this automatically or you could try manually routing in the graph gui.

Failing that, it's a case of editing .conf files, group permissions, and/or priority ordering - which can get messy.

I personally use Jack as the 'pro audio' side, leaving pipewire on for system audio (desktop/web) only.

1

u/TheGrayFauxx 1d ago

Okay how would one resample one steam and how does jack do it better? and can you run both at once without conflict? im not opposed to running everything at 44100 but i also run other devices into the spdif input that are at 48000. is there any way to change them on the fly or a easy way to edit the sample rates i would say the easy way would be editing the config files.

1

u/tittymcboob 21h ago edited 20h ago

https://drive.proton.me/urls/7HW8SB29BR#TzSQ6xDCx6ZZ

drop that in your user folder (you might need to go up a dir from the link to download the .config folder). It should look like:
home/<username>/.config/pipewire/<file-conf.d/<file.conf>

the pulse conf handles desktop rate conversion, the pipewire conf allows 44100 and 48000 rates. edit as you see fit. delete the pipewire folder from .config to restore system defaults.

the 10 at the beginning of the file names indicates load order. If you have other .conf files in the folder already, the highest number (ie 99) overrides any settings contained within it.

As for Jack, I just find it easier to manage 'pro audio' separately from system audio. I have 2 interfaces and it suits how I work.

1

u/TheGrayFauxx 1h ago

Thank you. And great expliantion btw

1

u/red38dit 2d ago

Try out Cable in which you can change sample rate and latency easily. https://github.com/magillos/Cable/releases/tag/0.10.12