Audio: no bit-perfect path for external USB DACs — everything is resampled to 48 kHz
I'm an audio geek and I want Omarchy to deliver bit-perfect audio to my audio gear. I tried plugging in an external DAC - in this case a Dragonfly Audio Cobalt USB DAC - and it was showing 48 kHz input on things I knew were 44.1 kHz. Here's the solution I came up with using the built in agent - posting for comment in the event it's worth consideration in a future release.
What happens
On a stock install, PipeWire runs a fixed 48 kHz graph clock with
default.clock.allowed-rates unset, so every 44.1 kHz source — which is most
music: CDs, the majority of a typical FLAC library, Plex/Tidal/Qobuz streams —
is sample-rate-converted 44.1 → 48 k before it reaches the DAC. On an external
USB DAC that natively supports 44.1 kHz, that conversion is pure loss with
nothing gained.
Second, default/wireplumber/wireplumber.conf.d/alsa-soft-mixer.conf forces
api.alsa.soft-mixer = true for every ALSA card. For laptop codecs that's
a reasonable call (Realtek hardware-mixer quirks). But on a clean external DAC
with a working hardware volume control, it means any OS volume below 100% is a
software gain multiply + re-quantize — again, not bit-perfect — when the DAC
could have done the attenuation losslessly in its own domain.
Net: there is currently no configuration, command, or documentation in Omarchy
that gets a clean digital path to an external DAC.
Who this is for
Users with an outboard USB DAC doing focused music listening. Not the
laptop-speaker majority — on internal speakers none of this is audible and the
current defaults are the right ones. So this is opt-in territory, not a default
flip (see options below).
What I changed locally, and the result
Two drop-ins:
# ~/.config/pipewire/pipewire.conf.d/99-bitperfect.conf
context.properties = {
default.clock.rate = 48000
default.clock.allowed-rates = [ 44100 48000 88200 96000 ]
}
# ~/.config/wireplumber/wireplumber.conf.d/99-dragonfly-bitperfect.conf
monitor.alsa.rules = [
{
matches = [ { node.name = "~alsa_output.*DragonFly_Cobalt.*" } ]
actions = { update-props = {
audio.format = "S24_3LE"
api.alsa.soft-mixer = false
} }
}
]
After systemctl --user restart wireplumber pipewire pipewire-pulse:
| Source |
DAC hardware rate (/proc/asound/cardN/pcm0p/sub0/hw_params) |
| 44.1 kHz file |
44100 (was 48000) |
| 96 kHz file |
96000 |
wpctl set-volume now moves the DAC's own PCM Playback Volume control, so
OS volume stays bit-perfect. No application-side change was needed — mpv,
Tunarchy, browsers all inherit the native rate.
Options, least to most invasive
-
Docs only. There is currently no audio/sound page in manual/ at all.
A short "Bit-perfect audio for external DACs" page — the allowed-rates
drop-in, the hardware-vs-software-volume tradeoff, how to verify with
hw_params — would cover it without changing anyone's setup.
-
An opt-in command, mirroring the existing omarchy audio tuning
framework: omarchy audio bit-perfect on|off|status. on drops in the
rate config and (optionally) a soft-mixer-off rule scoped to USB DACs;
status reports the live graph/device rate. Self-verifying and reversible,
same as the speaker tunings.
-
Enable allowed-rates by default. Honestly the weakest option:
upstream PipeWire ships this exact file in pipewire.conf.avail/10-rates.conf
disabled, and neither Fedora nor Ubuntu enable it by default, because
rate-switching can produce audible artifacts (pops, relock gaps) on some
Bluetooth, HDMI, and cheap USB interfaces. Cuts against the "consistent
across all hardware" intent of the current audio defaults.
-
Scope the global soft-mixer rule to exclude device.api = alsa +
device.bus = usb (or similar), so external DACs use hardware volume while
laptop codecs keep software volume. Independent of the rate question.
My preference
Option 1 or 2. Happy to open the PR for whichever direction you'd take — a
manual/ page, or the omarchy audio bit-perfect command plus a migration,
following the omarchy-audio-tuning pattern.
Environment
- Omarchy 4.0.0.alpha
- PipeWire 1.6.8, WirePlumber 0.5.17
- AudioQuest DragonFly Cobalt (USB), also relevant to any USB/S-PDIF DAC
Audio: no bit-perfect path for external USB DACs — everything is resampled to 48 kHz
I'm an audio geek and I want Omarchy to deliver bit-perfect audio to my audio gear. I tried plugging in an external DAC - in this case a Dragonfly Audio Cobalt USB DAC - and it was showing 48 kHz input on things I knew were 44.1 kHz. Here's the solution I came up with using the built in agent - posting for comment in the event it's worth consideration in a future release.
What happens
On a stock install, PipeWire runs a fixed 48 kHz graph clock with
default.clock.allowed-ratesunset, so every 44.1 kHz source — which is mostmusic: CDs, the majority of a typical FLAC library, Plex/Tidal/Qobuz streams —
is sample-rate-converted 44.1 → 48 k before it reaches the DAC. On an external
USB DAC that natively supports 44.1 kHz, that conversion is pure loss with
nothing gained.
Second,
default/wireplumber/wireplumber.conf.d/alsa-soft-mixer.confforcesapi.alsa.soft-mixer = truefor every ALSA card. For laptop codecs that'sa reasonable call (Realtek hardware-mixer quirks). But on a clean external DAC
with a working hardware volume control, it means any OS volume below 100% is a
software gain multiply + re-quantize — again, not bit-perfect — when the DAC
could have done the attenuation losslessly in its own domain.
Net: there is currently no configuration, command, or documentation in Omarchy
that gets a clean digital path to an external DAC.
Who this is for
Users with an outboard USB DAC doing focused music listening. Not the
laptop-speaker majority — on internal speakers none of this is audible and the
current defaults are the right ones. So this is opt-in territory, not a default
flip (see options below).
What I changed locally, and the result
Two drop-ins:
After
systemctl --user restart wireplumber pipewire pipewire-pulse:/proc/asound/cardN/pcm0p/sub0/hw_params)wpctl set-volumenow moves the DAC's ownPCM Playback Volumecontrol, soOS volume stays bit-perfect. No application-side change was needed —
mpv,Tunarchy, browsers all inherit the native rate.
Options, least to most invasive
Docs only. There is currently no audio/sound page in
manual/at all.A short "Bit-perfect audio for external DACs" page — the
allowed-ratesdrop-in, the hardware-vs-software-volume tradeoff, how to verify with
hw_params— would cover it without changing anyone's setup.An opt-in command, mirroring the existing
omarchy audio tuningframework:
omarchy audio bit-perfect on|off|status.ondrops in therate config and (optionally) a soft-mixer-off rule scoped to USB DACs;
statusreports the live graph/device rate. Self-verifying and reversible,same as the speaker tunings.
Enable
allowed-ratesby default. Honestly the weakest option:upstream PipeWire ships this exact file in
pipewire.conf.avail/10-rates.confdisabled, and neither Fedora nor Ubuntu enable it by default, because
rate-switching can produce audible artifacts (pops, relock gaps) on some
Bluetooth, HDMI, and cheap USB interfaces. Cuts against the "consistent
across all hardware" intent of the current audio defaults.
Scope the global soft-mixer rule to exclude
device.api = alsa+device.bus = usb(or similar), so external DACs use hardware volume whilelaptop codecs keep software volume. Independent of the rate question.
My preference
Option 1 or 2. Happy to open the PR for whichever direction you'd take — a
manual/page, or theomarchy audio bit-perfectcommand plus a migration,following the
omarchy-audio-tuningpattern.Environment