Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pipewire pipewire
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 612
    • Issues 612
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 23
    • Merge requests 23
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • PipeWirePipeWire
  • pipewirepipewire
  • Issues
  • #698
Closed
Open
Issue created Feb 08, 2021 by Sergey Kondakov@fox

Using Linux Studio Plugins still results in heavy distortion

Continuation of #206 (closed) with pipeline from #109 (comment 724954)

I've decided to try to migrate my setup to PW from JACK+PA again. This time routing succeded but I was unable to achieve stable output. Sound is screechy and PW spews "client too slow!" errors endlessly even if pipeline wasn't yet connected to real device. Changing quantum and period sizes beyond reasonable maximum does not seem to help.

However, rtkit settings from pipewire.conf do not seem to be getting applied and they are always default. It would also be nice to have rtkit option to use FIFO instead of RR, former seem to give some more stability with native JACK.

This warning on LSP apps (self-contained LV2 hosts) launch may have something to do with it:

[W][000005295.352651][pipewire-jack.c:4131 jack_recompute_total_latencies()] jack-client 0x5576346e7240: not implemented

Setup is such: PW_0.3.21+40_git20210207.37d8cbd5_test3

PW_0.3.21+40_git20210207.37d8cbd5_test3-pwtop

PW_0.3.21+40_git20210207.37d8cbd5_test3.dump

PW_0.3.21+40_git20210207.37d8cbd5_test3.journald

mpv output is set-up like this: mpv-openal -> OpenAL-pulse -> pipewire-pulse -> pipewire
With OpenAL-pulse it exposed as "mpv" and with OpenAL-jack as "alsoft"

Weirdly, period of the device in pw-top does not correlate with period in /proc/asound/x20/pcm0p/sub0/hw_params:

access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 128
buffer_size: 8192

And period of the device is always halved unless api.alsa.disable-batch=true, headroom size does not seem to matter.

PW also seem to expose DAC's DSD input as PCM IEC958 or maybe it just falsely adds such profile just because it's a USB device.

Using this pipeline automatically with generic qjackctl patchbay config seems to be still impossible due to #496 since all devices are exposed with unique names and without some kind of distinctive feature that would allow make routing rules to match PipeLine-OUT (null-sink shim exposed in JACK and PA) with a device. At least PipeLine-IN can be matched to force apps to use it as input.
qjackctl also does not allow running pipeline startup script with PW because it only executes scripts when it launches jackd, so even such workaround for lack of session tracking & restoration in PW is inoperable.

I use such scriptlet in pipeline execution script as workaround for #446 (closed):

PIPEWIRE_LATENCY=3072/192000
PIPEWIRE_LINK_PASSIVE=0
PULSE_LATENCY_MSEC=16
LAYOUT='channels=2 channel_map=front-left,front-right audio.position=FL,FR'
FORMAT='format=float32ne rate=192000'
…
if [ "$PIPEWIRE_EMULATES_PULSE" == "1" ] && [ "$PIPEWIRE_EMULATES_JACK" == "1" ]; then
	if ! pactl list sinks short | grep PipeLine; then
		pactl load-module module-null-sink sink_name=PipeLine-IN object.linger=1 media.class=Audio/Duplex ${LAYOUT} ${FORMAT}
		pactl load-module module-null-sink sink_name=PipeLine-OUT object.linger=1 media.class=Audio/Duplex ${LAYOUT} sink_properties="device.description=system" ${FORMAT}
		# correct default muting
		pactl set-sink-volume PipeLine-IN 100%
		pactl set-sink-volume PipeLine-OUT 100%
		pactl set-sink-mute PipeLine-IN 0
		pactl set-sink-mute PipeLine-OUT 0
	fi
fi

But PW start numbering of unnamed port with 0 where JACK start with 1, so it's better to force naming them with audio.position=FL,FR and make separate routing rule anyway.

PS: pw-top does not allow quick text-dump of state and pw-dump does not allow preserving colours in pw-dump|less or files, that's not great.

Assignee
Assign to
Time tracking