commit f9ae7bb335fc3f6166a9a5cb6cdeec45534c1e15
parent 5e2cb7c16c9dd911ce94e3d165782f63e2717897
Author: Vineet Kumar <git@vineetk.net>
Date: Tue, 10 Mar 2026 01:59:33 -0400
demiurge, home: switch to using pipewire instead of jack
making all programs from guix work with jack is a massive pain and I
got burnt out, where I spent more time making stuff work with jack
than doing actual work (part of why I switched away from gentoo in the
first place)
Diffstat:
8 files changed, 115 insertions(+), 74 deletions(-)
diff --git a/epistemia/files/alsa/.config/alsa/asoundrc b/epistemia/files/alsa/.config/alsa/asoundrc
@@ -1,26 +0,0 @@
-pcm_type.jack {
- lib "/home/vin/.guix-home/profile/lib/alsa-lib/libasound_module_pcm_jack.so"
-}
-
-pcm.rawjack {
- type jack
- playback_ports {
- 0 para_equalizer_x16_stereo:in_l
- 1 para_equalizer_x16_stereo:in_r
- }
- capture_ports {
-# 0 rnnoise:audio_out_1
-# 1 rnnoise:audio_out_2
- 0 microphone:capture_1
- 1 microphone:capture_2
- }
- hint {
- show on
- description "JACK Audio Connection Kit"
- }
-}
-
-pcm.!default {
- type plug
- slave.pcm rawjack
-}
diff --git a/epistemia/files/mpv/.config/mpv/mpv.conf b/epistemia/files/mpv/.config/mpv/mpv.conf
@@ -3,5 +3,4 @@ glsl-shaders="~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restor
ytdl-format="bestvideo[height<=?1440]+bestaudio/best"
-audio-device="jack"
-jack-port="para_equalizer_x16_stereo:in_"
+audio-device="pipewire"
diff --git a/epistemia/files/pipewire/.config/pipewire/pipewire.conf.d/10-rates.conf b/epistemia/files/pipewire/.config/pipewire/pipewire.conf.d/10-rates.conf
@@ -0,0 +1,26 @@
+# why tf does pipewire do this when my device already supports the higher rates
+context.properties = {
+ default.clock.rate = 192000
+ default.clock.allowed-rates = [ 192000 ]
+ default.clock.quantum = 1024
+ default.clock.min-quantum = 1024
+ default.clock.max-quantum = 2048
+}
+
+monitor.alsa.rules = [
+ {
+ matches = [
+ {
+ node.name = "alsa_output.usb-GuangZhou_FiiO_Electronics_Co._Ltd_FiiO_K7-00.analog-stereo"
+ }
+ ]
+ actions = {
+ update-props = {
+ audio.rate = 192000
+ audio.format = "S32LE"
+ node.force-rate = 192000
+ node.force-quantum = 1024
+ }
+ }
+ }
+]
diff --git a/epistemia/files/pipewire/.config/pipewire/pipewire.conf.d/fiio-k7-eq.conf b/epistemia/files/pipewire/.config/pipewire/pipewire.conf.d/fiio-k7-eq.conf
@@ -0,0 +1,77 @@
+context.modules = [
+ { name = libpipewire-module-filter-chain
+ args = {
+ node.description = "FiiO K7 Parametric EQ"
+ media.name = "FiiO K7 Parametric EQ"
+ filter.graph = {
+ nodes = [
+ { type = builtin name = preamp_l label = bq_highshelf control = { "Freq" = 0.0 "Q" = 1.0 "Gain" = -6.0 } }
+ { type = builtin name = band0_l label = bq_lowshelf control = { "Freq" = 105.0 "Q" = 0.70 "Gain" = 2.52 } }
+ { type = builtin name = band1_l label = bq_peaking control = { "Freq" = 131.0 "Q" = 2.24 "Gain" = -0.56 } }
+ { type = builtin name = band2_l label = bq_peaking control = { "Freq" = 2692.0 "Q" = 0.37 "Gain" = -2.60 } }
+ { type = builtin name = band3_l label = bq_peaking control = { "Freq" = 265.0 "Q" = 1.71 "Gain" = 4.20 } }
+ { type = builtin name = band4_l label = bq_peaking control = { "Freq" = 3557.0 "Q" = 2.70 "Gain" = 6.80 } }
+ { type = builtin name = band5_l label = bq_highshelf control = { "Freq" = 10000.0 "Q" = 0.70 "Gain" = -0.20 } }
+ { type = builtin name = band6_l label = bq_peaking control = { "Freq" = 5709.0 "Q" = 3.38 "Gain" = -2.00 } }
+ { type = builtin name = band7_l label = bq_peaking control = { "Freq" = 62.0 "Q" = 3.47 "Gain" = 1.93 } }
+ { type = builtin name = band8_l label = bq_peaking control = { "Freq" = 88.0 "Q" = 3.25 "Gain" = -0.80 } }
+ { type = builtin name = band9_l label = bq_peaking control = { "Freq" = 4028.0 "Q" = 5.91 "Gain" = 1.40 } }
+
+ { type = builtin name = preamp_r label = bq_highshelf control = { "Freq" = 0.0 "Q" = 1.0 "Gain" = -6.0 } }
+ { type = builtin name = band0_r label = bq_lowshelf control = { "Freq" = 105.0 "Q" = 0.70 "Gain" = 2.52 } }
+ { type = builtin name = band1_r label = bq_peaking control = { "Freq" = 131.0 "Q" = 2.24 "Gain" = -0.56 } }
+ { type = builtin name = band2_r label = bq_peaking control = { "Freq" = 2692.0 "Q" = 0.37 "Gain" = -2.60 } }
+ { type = builtin name = band3_r label = bq_peaking control = { "Freq" = 265.0 "Q" = 1.71 "Gain" = 4.20 } }
+ { type = builtin name = band4_r label = bq_peaking control = { "Freq" = 3557.0 "Q" = 2.70 "Gain" = 6.80 } }
+ { type = builtin name = band5_r label = bq_highshelf control = { "Freq" = 10000.0 "Q" = 0.70 "Gain" = -0.20 } }
+ { type = builtin name = band6_r label = bq_peaking control = { "Freq" = 5709.0 "Q" = 3.38 "Gain" = -2.00 } }
+ { type = builtin name = band7_r label = bq_peaking control = { "Freq" = 62.0 "Q" = 3.47 "Gain" = 1.93 } }
+ { type = builtin name = band8_r label = bq_peaking control = { "Freq" = 88.0 "Q" = 3.25 "Gain" = -0.80 } }
+ { type = builtin name = band9_r label = bq_peaking control = { "Freq" = 4028.0 "Q" = 5.91 "Gain" = 1.40 } }
+ ]
+ links = [
+ { output = "preamp_l:Out" input = "band0_l:In" }
+ { output = "band0_l:Out" input = "band1_l:In" }
+ { output = "band1_l:Out" input = "band2_l:In" }
+ { output = "band2_l:Out" input = "band3_l:In" }
+ { output = "band3_l:Out" input = "band4_l:In" }
+ { output = "band4_l:Out" input = "band5_l:In" }
+ { output = "band5_l:Out" input = "band6_l:In" }
+ { output = "band6_l:Out" input = "band7_l:In" }
+ { output = "band7_l:Out" input = "band8_l:In" }
+ { output = "band8_l:Out" input = "band9_l:In" }
+
+ { output = "preamp_r:Out" input = "band0_r:In" }
+ { output = "band0_r:Out" input = "band1_r:In" }
+ { output = "band1_r:Out" input = "band2_r:In" }
+ { output = "band2_r:Out" input = "band3_r:In" }
+ { output = "band3_r:Out" input = "band4_r:In" }
+ { output = "band4_r:Out" input = "band5_r:In" }
+ { output = "band5_r:Out" input = "band6_r:In" }
+ { output = "band6_r:Out" input = "band7_r:In" }
+ { output = "band7_r:Out" input = "band8_r:In" }
+ { output = "band8_r:Out" input = "band9_r:In" }
+ ]
+ inputs = [ "preamp_l:In" "preamp_r:In" ]
+ outputs = [ "band9_l:Out" "band9_r:Out" ]
+ }
+ capture.props = {
+ node.name = "effect_input.fiio_k7_eq"
+ media.class = Audio/Sink
+ audio.channels = 2
+ audio.position = [ FL FR ]
+ audio.rate = 192000
+ priority.driver = 2000
+ priority.session = 2000
+ }
+ playback.props = {
+ node.name = "effect_output.fiio_k7_eq"
+ node.passive = true
+ audio.channels = 2
+ audio.position = [ FL FR ]
+ audio.rate = 192000
+ target.object = "alsa_output.usb-GuangZhou_FiiO_Electronics_Co._Ltd_FiiO_K7-00.analog-stereo"
+ }
+ }
+ }
+]
diff --git a/epistemia/files/pipewire/.config/wireplumber/wireplumber.conf.d/50-volume.conf b/epistemia/files/pipewire/.config/wireplumber/wireplumber.conf.d/50-volume.conf
@@ -0,0 +1,5 @@
+wireplumber.settings = {
+ device.routes.default-sink-volume = 1.0
+ device.routes.default-source-volume = 1.0
+ node.stream.default-playback-volume = 1.0
+}
diff --git a/epistemia/home/config.scm b/epistemia/home/config.scm
@@ -33,39 +33,23 @@
#:use-module (epistemia packages audio)
#:use-module (epistemia packages emacs)
#:use-module (epistemia packages minecraft)
- #:use-module (epistemia packages qt)
#:use-module (nongnu packages game-client)
#:use-module (gnu home services)
#:use-module (gnu home services desktop)
#:use-module (gnu home services dotfiles)
+ #:use-module (gnu home services sound)
#:use-module (gnu home services sway)
#:use-module (guix channels)
#:use-module (guix packages)
#:use-module (guix gexp)
#:use-module (guix transformations))
-(define link-jack2
- (package-input-rewriting `((,jack-1 . ,jack-2))))
-
-(define fix-qtmultimedia
- (package-input-rewriting `((,qtmultimedia . ,qtmultimedia-jack))))
-
(home-environment
(packages (list curl
htop
git
rsync
- ;; audio
- (list (link-jack2 alsa-plugins) "jack")
- jack-2
- jack-example-tools
- jalv
- lsp-plugins
- lv2-speech-denoiser
- zita-ajbridge
- ;; (link-jack2 qjackctl)
-
;; cryptography
age
gnupg
@@ -130,11 +114,11 @@
profanity
;; videos
- (link-jack2 mpv)
+ mpv
yt-dlp
;; browser
- (fix-qtmultimedia qutebrowser)
+ qutebrowser
;; gaming
prismlauncher
@@ -182,6 +166,9 @@
(list (sway-input
(identifier "type:pointer")
(extra-content '("accel_profile flat")))))))
+ (service home-pipewire-service-type
+ (home-pipewire-configuration
+ (enable-pulseaudio? #t)))
(service home-dotfiles-service-type
(home-dotfiles-configuration
(layout 'stow)
diff --git a/epistemia/packages/qt.scm b/epistemia/packages/qt.scm
@@ -1,21 +0,0 @@
-(define-module (epistemia packages qt)
- #:use-module (guix packages)
- #:use-module (guix download)
- #:use-module (guix gexp)
- #:use-module (guix utils)
- #:use-module (gnu packages audio)
- #:use-module (gnu packages qt))
-
-(define-public qtmultimedia-jack
- (package
- (inherit qtmultimedia)
- (name "qtmultimedia")
- (arguments
- (substitute-keyword-arguments (package-arguments qtmultimedia)
- ((#:configure-flags flags #~'())
- #~(append (delete "-DQT_FEATURE_pulseaudio=ON" #$flags)
- (list "-DQT_FEATURE_pulseaudio=OFF"
- "-DQT_FEATURE_jack=ON")))))
- (inputs
- (modify-inputs (package-inputs qtmultimedia)
- (replace "pulseaudio" jack-2)))))
diff --git a/epistemia/systems/demiurge.scm b/epistemia/systems/demiurge.scm
@@ -127,12 +127,6 @@
(simple-service 'zfs-shepherd-services-user-processes
user-processes-service-type
'(zfs-automount))
- (service alsa-service-type
- (alsa-configuration
- (alsa-plugins "alsa-plugins:jack")
- (pulseaudio? #f)))
- (service ladspa-service-type
- (ladspa-configuration (plugins (list lsp-plugins))))
(service seatd-service-type)
(service iptables-service-type)
(service static-networking-service-type