You are not logged in.
I use JACK (native before, but now, after migration, the pipewire implementation) to route audio through the mixer ( jack_mixer ) and be able to control how streams are mixed and routed to each of the audio devices. The following are the active systemd services:
[pswiatki@sdr-aptv .config]$ systemctl --user status pipewire-pulse pipewire wireplumber
● pipewire-pulse.service - PipeWire PulseAudio
Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; disabled; preset: enabled)
Active: active (running) since Thu 2023-10-05 14:20:39 CEST; 9h ago
TriggeredBy: ● pipewire-pulse.socket
Main PID: 74577 (pipewire-pulse)
Tasks: 2 (limit: 76822)
Memory: 17.5M
CPU: 4.881s
CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service
└─74577 /usr/bin/pipewire-pulse
Oct 05 14:20:39 sdr-aptv systemd[1802]: Started PipeWire PulseAudio.
● pipewire.service - PipeWire Multimedia Service
Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; preset: enabled)
Active: active (running) since Thu 2023-10-05 14:20:39 CEST; 9h ago
TriggeredBy: ● pipewire.socket
Main PID: 74574 (pipewire)
Tasks: 4 (limit: 76822)
Memory: 22.0M
CPU: 5min 5.343s
CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
└─74574 /usr/bin/pipewire
Oct 05 23:39:19 sdr-aptv pipewire[74574]: spa.alsa: front:0: follower delay:2081 target:1567 thr:1024, resync (34 suppressed)
Oct 05 23:39:21 sdr-aptv pipewire[74574]: spa.alsa: front:0: follower delay:2080 target:1567 thr:1024, resync (33 suppressed)
● wireplumber.service - Multimedia Service Session Manager
Loaded: loaded (/usr/lib/systemd/user/wireplumber.service; enabled; preset: enabled)
Active: active (running) since Thu 2023-10-05 14:20:39 CEST; 9h ago
Main PID: 74576 (wireplumber)
Tasks: 6 (limit: 76822)
Memory: 10.0M
CPU: 6.020s
CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/wireplumber.service
└─74576 /usr/bin/wireplumber
Oct 05 14:20:39 sdr-aptv systemd[1802]: Started Multimedia Service Session Manager.
Oct 05 14:20:39 sdr-aptv wireplumber[74576]: [37:27:10.377441747] [74576] ERROR IPAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found
Oct 05 14:20:39 sdr-aptv wireplumber[74576]: [37:27:10.377450112] [74576] ERROR IPAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info
lines 1-48
JACK seems to show a new audio stream each time some application (e.g. Chromium) wants to produce sound, but the audio stream hangs and playback does not progress (e.g. youtube video is somehow "paused" with a rolling circle in the middle).
This is caused by a modification I made to avoid an annoying automagical routing of an audio stream to the default audio sink. Specifically:
in /etc/pipewire/pipewire-pulse.conf I changed this node.autoconnect = false :
stream.properties = {
#node.latency = 1024/48000
node.autoconnect = false
#resample.quality = 4
#channelmix.normalize = false
#channelmix.mix-lfe = true
#channelmix.upmix = true
so that pulse no longer routes stream directly to the default audio sink. Verified - it no longer does.
In /etc/pipewire/jack.conf I made sure that jack.self-connect-mode = allow (which seems to be a default value for this property, by the way)
# global properties for all jack clients
jack.properties = {
#node.latency = 1024/48000
[CUT!!!!]
#
# allow: Don't restrict self connect requests
# fail-external: Fail self connect requests to external ports only
# ignore-external: Ignore self connect requests to external ports only
# fail-all: Fail all self connect requests
# ignore-all: Ignore all self connect requests
#jack.self-connect-mode = allow
Now, each time I try to play any audio, I get the connections to the [jack] mixer back as I last saved them in qpwgraph, which is encouraging, but the connection (or node?) as seen by pwctl seems to be paused:
[pswiatki@sdr-aptv ~]$ wpctl status
PipeWire 'pipewire-0' [0.3.80, pswiatki@sdr-aptv, cookie:2428001820]
└─ Clients:
32. pipewire [0.3.80, pswiatki@sdr-aptv, pid:74577]
34. python3.11 [0.3.80, pswiatki@sdr-aptv, pid:74634]
35. Character Map [0.3.80, pswiatki@sdr-aptv, pid:25365]
36. WirePlumber [0.3.80, pswiatki@sdr-aptv, pid:74576]
37. WirePlumber [export] [0.3.80, pswiatki@sdr-aptv, pid:74576]
74. qpwgraph [0.3.80, pswiatki@sdr-aptv, pid:9012]
80. jack_mixer [0.3.80, pswiatki@sdr-aptv, pid:74634]
110. libcanberra [0.3.80, pswiatki@sdr-aptv, pid:74574]
113. libcanberra [0.3.80, pswiatki@sdr-aptv, pid:74574]
114. Chromium [0.3.80, pswiatki@sdr-aptv, pid:66538]
121. libcanberra [0.3.80, pswiatki@sdr-aptv, pid:74574]
125. wpctl [0.3.80, pswiatki@sdr-aptv, pid:103507]
Audio
├─ Devices:
│ 49. Plantronics C320-M [alsa]
│ 50. Built-in Audio [alsa]
│
├─ Sinks:
│ 33. Built-in Audio Analog Stereo [vol: 1.00]
│ * 63. Plantronics C320-M Analog Stereo [vol: 1.00]
│
├─ Sink endpoints:
│
├─ Sources:
│ 62. Built-in Audio Analog Stereo [vol: 1.00]
│ * 64. Plantronics C320-M Analog Stereo [vol: 1.00]
│
├─ Source endpoints:
│
└─ Streams:
115. Chromium
116. output_FR > jack_mixer:browser R [paused]
117. output_FL > jack_mixer:browser L [paused]
120. libcanberra
119. output_FL
126. output_FR
124. libcanberra
123. output_FL
127. output_FR
128. libcanberra
109. output_FL
122. output_FR
Why is that? Is there a way to let it roll (unpause) automagically? By some clever use of rules in PW, perhaps? Interestingly, as can be seen above, there are several libcanberra clients hanging as well. Those are X11 Bell Events. When I go ahead and issue this CLI command:
pw-link 124 63
I get the bell play nicely directly by the output (bypassing the mixer) and the instance of the bell event disappears (from qpwgraph). Even more than this: when I try to route a single channel (port) of such an entity in qpwgraph - I get the same result as through pw-link. Naturally, the bell event nicely disappears.
So, ideally, I would like to configure PW in such a way that certain clients would be routed to pre-designated ports on my jack_mixer (for some of them a direct connection to a default audio sink would suffice, I am OK with that) so that the applications can function nicely with the audio they produce being consumed by the audio sub-system (PW) - both, for those streams that are only transient (they appear for a while, play something short and disappear later on) and also for persistent streams which are active as long as the application is running.
I sense that using rules is the way to go, but it seems difficult to find good examples of the syntax that is necessary to achieve the above.
Last edited by pswiatki (2023-10-06 21:07:51)
Offline