{"id":1160,"date":"2024-10-18T13:08:54","date_gmt":"2024-10-18T11:08:54","guid":{"rendered":"https:\/\/www.reeltoreel.nl\/blog\/?p=1160"},"modified":"2024-10-18T13:09:52","modified_gmt":"2024-10-18T11:09:52","slug":"make-pipewire-play-bitperfect-audio-linux","status":"publish","type":"post","link":"https:\/\/www.reeltoreel.nl\/blog\/?p=1160","title":{"rendered":"Make pipewire play bitperfect audio \/ Linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you are like me, <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">and have always wondered why PulseAudio had a fixed setting for sample rate, <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">but thought that that situation would improve when PipeWire got established, <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">and then learning that PipeWire STILL had a fixed sample rate?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So that everything was resampled to 48000, or whatever setting was the default?!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fear no more.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">THIS is how to make PipeWire always choose the best sample rate when playing audio. So that a 44100 Hz files will play with a 44100 sample rate, and a HiRes 96000 file will put the soundcard at 96000.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>open, or create, ~\/.config\/pipewire\/pipewire.conf and put this in:<br \/><code>context.properties = {<br \/>&nbsp;&nbsp;&nbsp;default.clock.allowed-rates = [ 44100 48000 88200 96000 ]<br \/>}<\/code><br \/>if required, add extra sample rates that your files and\/or your soundcard supports.<\/li>\n\n\n\n<li>That&#8217;s it! Maybe need to log out\/in, or kill PipeWire, whichever you choose<\/li>\n\n\n\n<li>check the result with <br \/><code># pw-mon<\/code><br \/><code>R &nbsp;&nbsp;52 &nbsp;&nbsp;4096 &nbsp;96000 &nbsp;83,3us &nbsp;16,5us &nbsp;0,00 &nbsp;0,00 &nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;S32LE 2 96000 alsa_output.usb-Focusrite_Scarlett_2i2_USB-00.HiFi__hw_USB__sink<br \/>R &nbsp;&nbsp;72 &nbsp;&nbsp;7200 &nbsp;96000 &nbsp;41,0us &nbsp;22,4us &nbsp;0,00 &nbsp;0,00 &nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;F32LE 2 96000 &nbsp;+ LibreWolf<\/code><\/li>\n\n\n\n<li>Both the hardware (Focusrite) and the program (LibreWolf) are playing audio at 96000.<\/li>\n\n\n\n<li>I found that in order for Qobuz (and probably other streaming services as well) to really play at native bit rate, LibreWolf will do the trick, NOT the &#8216;native&#8217; linux flatpak client for Qobuz. <br \/>So use the url: &#8216;https:\/\/play.qobuz.com\/&#8217;<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>If you are like me, and have always wondered why PulseAudio had a fixed setting for sample rate, but thought that that situation would improve when PipeWire got established, and then learning that PipeWire STILL had a fixed sample rate? So that everything was resampled to 48000, or whatever setting was the default?! Fear no [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[11,12],"class_list":["post-1160","post","type-post","status-publish","format-standard","hentry","category-audio","tag-audio","tag-linux"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1160"}],"version-history":[{"count":2,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1160\/revisions"}],"predecessor-version":[{"id":1162,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1160\/revisions\/1162"}],"wp:attachment":[{"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reeltoreel.nl\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}