One last update:

I tried adding the device.description to the alsa-monitor.conf file like this (see last line):


===========

    {
        # Rules for matching a device or node. It is an array of
        # properties that all need to match the regexp. If any of the
        # matches work, the actions are executed for the object.
        matches = [
            {
                # This matches all cards. These are regular expressions
                # so "." matches one character and ".*" matches many.
                device.name = "alsa_card.usb-MOTU_M4_M40000048603-00"
            }
        ]
        actions = {
            # Actions can update properties on the matched object.
            update-props = {
                # Use ALSA-Card-Profile devices. They use UCM or
                # the profile configuration to configure the device
                # and mixer settings.
                api.alsa.use-acp = false

                # Use UCM instead of profile when available. Can be
                # disabled to skip trying to use the UCM profile.
                #api.alsa.use-ucm = true

                # Don't use the hardware mixer for volume control. It
                # will only use software volume. The mixer is still used
                # to mute unused paths based on the selected port.
                #api.alsa.soft-mixer = false

                # Ignore decibel settings of the driver. Can be used to
                # work around buggy drivers that report wrong values.
                #api.alsa.ignore-dB = false

                # The profile set to use for the device. Usually this
                # "default.conf" but can be changed with a udev rule
                # or here.
                #device.profile-set = "profileset-name"

                # The default active profile. Is by default set to "Off".
                #device.profile = "default profile name"

                # Automatically select the best profile. This is the
                # highest priority available profile. This is disabled
                # here and instead implemented in the session manager
                # where it can save and load previous preferences.
                api.acp.auto-profile = false

                # Automatically switch to the highest priority available
                # port. This is disabled here and implemented in the
                # session manager instead.
                api.acp.auto-port = false

                # Other properties can be set here.
                device.nick = "My Device"
               
                device.description = "MOTU M4"
            }
        }

=============================================

and it worked!

Now in Carla and Ardour my MOTU M4 has the name "MOTU M4"


-Keith




 

On 4/30/21 9:11 AM, Keith Smith wrote:

UPDATE:


There's a thread on the pipewire issue tracker which is related to setting alsa object properties:

https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/731


Fedora Jam 34 comes with pipewire utilities: pw-cli

This runs as a pipewire client object and within it typing 'help' lists all of its commands

'list-objects' provides information on all the devices,nodes and clients.  I would use pw-cli instead of 'pactl list'


The pipewire /etc/pipewire/media-session.d/alsa-monitor.conf  has a device level setting to ALSA-Card-Profiles for devices which is set to true. For pro-audio type interfaces that may result in the nodes being identified as surround sound (FL, FR, RL, RR) {see: gitlab pipewire issue 731}.  I put in a rule to match to my pro-audio card and set this property to 'False':

============================================

matches = [
            {
                # This matches all cards. These are regular expressions
                # so "." matches one character and ".*" matches many.
                device.name = "alsa_card.usb-MOTU_M4_M40000048603-00"
            }
        ]
        actions = {
            # Actions can update properties on the matched object.
            update-props = {
                # Use ALSA-Card-Profile devices. They use UCM or
                # the profile configuration to configure the device
                # and mixer settings.
                api.alsa.use-acp = false

===============================================

Now in Carla, the pro-audio interface has a shorter name and the ports are numbered instead of given surround sound positions.

This is closer to what I'd like, although I wish there was a way to rename what shows up in Carla which appears to be its description text.

After making this change here is the source pipewire object  from pw-cli   list-object:


id 49, type PipeWire:Interface:Node/3
                object.path = "alsa:pcm:M4:0:capture"
                factory.id = "18"
                client.id = "31"
                device.id = "43"
                priority.session = "1808"
                priority.driver = "1808"
                node.description = "M Series"
                node.name = "alsa_input.usb-MOTU_M4_M40000048603-00.unknown"
                node.nick = "My Node"
                media.class = "Audio/Source"

In Carla the node.description, "M Series" is used to name the source block (and also sink since I made a device level change). Same for input names in Ardour

Note that I also changed node.nick, but neither Carla or Ardour uses it.


I hope this information is useful.

-Keith



On 4/29/21 9:49 PM, Keith Smith wrote:
I'm pretty sure that I don't have JACK or Qjackctl on my upgraded fedora 34 system.  

Perhaps there is a way via some alsa subsystem approach to rename the sources and sinks.   Carla and Ardour identify my MOTU M4 as a surround sound type system, which is incorrect.

On Fri, 2021-04-30 at 00:29 -0300, Rafael Franco wrote:
Do you know that devices name can né renamed at qjackctl, i'm just tweaking gere and found that, but I need to verify that these names continue after restarting. I send news here.

Em sex, 30 de abr de 2021 00:21, Keith Smith <Keith@santabayanian.com> escreveu:
Something is happen with alsa-monitor.conf changes.


The only property that makes a visible change is the "audio.position"
parameter and it only effects the suffix of the device port names.

Changing the node.nick or device.nick doesn't seem to do anything as the
device names in Carla's patchbay, or the listed inputs and outputs
within Ardour are unchanged.


However, My MOTU M4 audio interface source has nodes: capture_FR,
capture_FL, capture_RR, capture_RL if I set:

audio.position         = "1,2,3,4"

and restart pipewire


Then those names change to: capture_1, capture_2, capture_3, capture_4


so the match portion within alsa-monitor.config appears to be working.

-Keith


On 4/29/21 12:56 PM, Keith Smith wrote:
> Pipewire seems to work great on my hardware.  Already a big
> improvement over JACK-Pulseaudio.
>
> When I open Carla's patchbay I see most of my hardware's source and
> sinks (at least all the one's I care about) However the names for the
> ports are incorrect.  I was reading about putting rules in pipewire's
> alsa-monitor.conf file, but so far I have been unable to get that to
> work (based on Carla's patchbay)
>
>
> Has anyone successfully used alsa-monitor.conf rules to change a
> device and its port names?
>
> I used 'pactl list' to get the reported device names and info. Is that
> the right command for pipewire?
>
> Thanks,
>
> Keith
> _______________________________________________
> music mailing list -- music@lists.fedoraproject.org
> To unsubscribe send an email to music-leave@lists.fedoraproject.org
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/music@lists.fedoraproject.org
> Do not reply to spam on the list, report it:
> https://pagure.io/fedora-infrastructure
_______________________________________________
music mailing list -- music@lists.fedoraproject.org
To unsubscribe send an email to music-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/music@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
_______________________________________________
music mailing list -- music@lists.fedoraproject.org
To unsubscribe send an email to music-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/music@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure


_______________________________________________
music mailing list -- music@lists.fedoraproject.org
To unsubscribe send an email to music-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/music@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

_______________________________________________
music mailing list -- music@lists.fedoraproject.org
To unsubscribe send an email to music-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/music@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure