On Tue, 13 Aug 2024, Fons Adriaensen wrote:

Below is a description of the configuration I'd want. If anyone knows
how to do this (it shouldn't be that difficult)

It shouldn't be that difficult.... unfortunately, pipewire is pretty much idiot proof.... or good for idiots. I don't say this as a slight against the PW dev (team?), it is not easy to make things idiot proof while still being mostly very usable. Just that the design goals don't align so well with professional audio use all the time.

2. Currently the ALSA Jack plugin is used to route audio from
  web browsers etc. to Jack. PW may take over this role but
  that is not a strict requirement.

You may wish to leave pipewire stopped and continue to use alsa jack plugins

3. PW will be started manually when required, and I don't expect
  that will happen very often. It may remain running when no longer
  needed but shouldn't interfere. It will be used to connect apps
  to Jack as in (2), or those that even don't support ALSA, or
  maybe to route audio from Jack to Bluetooth etc.

These are not pipewire design goals, I do not know how well pipewire bridges to jackd. There is not a way that I have found to be able to configure a PW-Jackd bridge as pulse used to have. Just sort of an on/off switch where PW decides how many ports bridge the two in which directions based (I think) on the number of system:* ports. I would guess auto connect happens too.

4. All Jack ports created by PW should be permanent and exist
  as soon as PW is started, so they can be manually connected
  and remain connected even when not in active use.

This is not a design goal of PW. However, it is possible to create psuedo or passthrough PW objects that are static and use them as default desktop "devices". As these are config file setup, they appear when PW starts.

5. PW should never ever access the sound card used by Jack,
  not even if accidentally started when Jack is not running.
  It must not force Jack to use dbus in order to get access
  to that card. It may manage other sound cards, but preferably
  only those explicitly listed.

This is not a design goal of PW. PW does not even seem to have the option as pulse did to configure a device as off. Instead it merely does not spend any cpu running that device if there is no connection. I do not know if that means the device is "opened" (and in use) or not

6. PW must never ever interfere with Jack in any way - making
  connections, trying to change the period size, etc. Its only
  role is to be a well-behaved Jack client.

Supposed to be possible. The idea is to use jackd as a device for pipewire where PW will act only as a client, accepting jackd's rate, period and periods as they are. I have never successfully acheived this but it has been a while since I tried.


7. I do not expect anything 'automatic' to happen when things
  are plugged in or out.

PW will not be started by plugging in a device. but if it is running I do not know if the udev detection can be disabled or if pw can be made usable if udev is disabled.

8. The PW configuration should be done in such a way such that
  it can't be modified by drop-in files from the system package
  manager. All configuration should be manual and explicit, and
  easy to verify without having to scan a myriad of files and/or
  directories and trying to understand how they interact. This
  is just basic security.

Config files are pretty much standard linux. The package uses /usr/share/* for package default settings which may change but these can be overridden with system wide settings in /etc/* which can be overridden with user settings in ~/.config/*. So if all config options are set one way or the other in ~/.config/, a new package config file will not change anything unless config options are added or removed in a new version. New config options should not happen too much now that v1.0 has happened.

I grew up with analog components where one could always see where the wire went and plugs were not likely to jump out of one place and connect to another, nor were pedals someone brought into the room likely to just find a conveient place in my signal chain to insert themselves. Pulse and now pipewire are more like the ghettoblaster.....

PW has a design goal of replacing pulse, ALSA direct connections and jackd all at the same time. It does this well enough for many people but does not cover everything. So far, it has been fine (if I don't look too close at the very cluttered jack graph) for my use but from the little I know about some of your projects I expect it will not meet all your needs. Currently, I am not doing enough with computer audio as it matters.

Some things I would like to see in pw:

jackd-pw bridge:
        as many as needed
        ports=number and direction
        pw side buffer size
        auto connect=disable

devices:
        Jack graph master device (or media clock master)
                That can't be changed by the desktop GUI. That is
                this is different than the default i/o device
        device ignore
                The device doesn't show up on the pw or jack graph
                and is not opened or locked
        new device ignore or active devices list
        imutable device names
                At least so long as the same device is plugged into the
                same physical USB port (many usb devices do populate
                the serial number field)
        User settable device names

I could list more and maybe by now some of these are already possible. Nicer docs would help a lot but really the docs are not that bad either.



--
Len Ovens
www.ovenwerks.net
_______________________________________________
Linux-audio-dev mailing list -- linux-audio-dev@lists.linuxaudio.org
To unsubscribe send an email to linux-audio-dev-le...@lists.linuxaudio.org

Reply via email to