alsa-project / alsa-ucm-conf

ALSA Use Case Manager configuration
BSD 3-Clause "New" or "Revised" License
72 stars 209 forks source link

Motu 828 (28 x 32) support #415

Open beatboxa opened 4 months ago

beatboxa commented 4 months ago

The newest Motu 828 (28x32) does not appear to have a UCM yet. It is a class compliant USB device; so as a result, it generally "works" at a very basic level; but default channel mappings and profiles do not.

The system appears to default to only 2 channels in and 2 channels out. So, for example, surround playback seems to mix into either the left or right channel.

In qpwgraph, it shows 30 inputs (I believe this includes an additional 2-channel loopback at the end) and 32 outputs, all marked as "AUX#," where # starts with 0. I was able to identify which AUX# corresponds to which input or output on the device, through the use of qpwgraph and the device's built-in digital VU meter.

I have tried to create a UCM or even an asoundrc; but I have no idea what I'm doing. The documentation and examples are not intuitive for me.

Could I collaborate with someone in order to get this audio interface supported? I'd be happy to run any commands and tests you advise on.

perexg commented 4 months ago

Show amixer -c 0 info output (replace zero with your card number - can be determined using e.g. aplay -l).

And show the channel map (separate for the playback and capture direction). It means which channel is router to which input/output connector on your device.

beatboxa commented 4 months ago

output of: amixer -c 0 info:

Card sysdefault:0 'D828'/'MOTU 828 at usb-0000:59:00.0-6, high speed'
  Mixer name    : 'USB Mixer'
  Components    : 'USB07fd:000e'
  Controls      : 1
  Simple ctrls  : 0
beatboxa commented 4 months ago

Channel Map: Output / Playback (AUX# on the left is alsa. Name on the right is from the device)

Images for reference: Motu_828-rear_connections Motu_828-front_connections Motu_828-connection_list

(On the back of the device, these are labelled "MAIN OUT (A)" and are XLR connectors):

AUX0 = Main Out A (L) AUX1 = Main Out A (R)

(On the back of the device, these are labelled "(B)" in the "LINE OUT" section and are balanced 1/4" TRS connectors):

AUX2 = Main Out B / Line Out 3 (L) AUX3 = Main Out B / Line Out 4 (R)

(On the back of the device, these are labelled "LINE OUT" and are balanced 1/4" TRS connectors):

AUX4 = Line Out 5 (L) AUX5 = Line Out 6 (R) AUX6 = Line Out 7 (L) AUX7 = Line Out 8 (R) AUX8 = Line Out 9 (L) AUX9 = Line Out 10 (R)

(On the front of the device, these are 1/4" TRS connectors):

AUX10 = Headphones 1 (L) AUX11 = Headphones 1 (R)

AUX12 = Headphones 2 (L) AUX13 = Headphones 2 (R)

(On the back of the device, this is a single RCA connector, labelled "S/PDIF OUT"):

AUX14 = S/PDIF 1 (L) AUX15 = S/PDIF 2 (R)

(On the back of the device, these are optical connectors.

In ADAT mode, each bank (A & B) is 8 channels

In TOSLink mode (for Bank A only), Bank A will use only 2-channels (16-17)

and Bank B will continue to be 8-channel ADAT

Bank A's mode can be changed in the device's on board menu)

AUX16 = Optical A 1 (L) AUX17 = Optical A 2 (R) AUX18 = Optical A 3 (L) AUX19 = Optical A 4 (R) AUX20 = Optical A 5 (L) AUX21 = Optical A 6 (R) AUX22 = Optical A 7 (L) AUX23 = Optical A 8 (R)

AUX24 = Optical B 1 (L) AUX25 = Optical B 2 (R) AUX26 = Optical B 3 (L) AUX27 = Optical B 4 (R) AUX28 = Optical B 5 (L) AUX29 = Optical B 6 (R) AUX30 = Optical B 7 (L) AUX31 = Optical B 8 (R)

beatboxa commented 4 months ago

Channel Map: Input / Capture (AUX# on the left is alsa. Name on the right is on the device) (See the Output post above for reference images)

(On the front of the device, these are Combo (XLR + 1/4" TRS) connectors

(On the back of the device, these are paired with the "MIC INSERT" balanced 1/4" TRS connectors):

AUX0 = Mic / Line / Instrument 1 (L) AUX1 = Mic / Line / Instrument 2 (R)

(On the back of the device, these are labelled "LINE IN" and are balanced 1/4" TRS connectors:

AUX2 = Line In 3 (L) AUX3 = Line In 4 (R) AUX4 = Line In 5 (L) AUX5 = Line In 6 (R) AUX6 = Line In 7 (L) AUX7 = Line In 8 (R) AUX8 = Line In 9 (L) AUX9 = Line In 10 (R)

(This is an internal loopback, with no physical inputs)

AUX10 = Loopback (L) AUX11 = Loopback (R)

(On the back of the device, this is a single RCA connector, labelled "S/PDIF IN"

AUX12 = S/PDIF 1 (L) AUX13 = S/PDIF 2 (R)

(On the back of the device, these are optical connectors.

In ADAT mode, each bank (A & B) is 8 channels

In TOSLink mode (for Bank A only), Bank A will use only 2-channels (14-15)

and Bank B will continue to be 8-channel ADAT

Bank A's mode can be changed in the device's on board menu)

AUX14 = Optical A 1 (L) AUX15 = Optical A 2 (R) AUX16 = Optical A 3 (L) AUX17 = Optical A 4 (R) AUX18 = Optical A 5 (L) AUX19 = Optical A 6 (R) AUX20 = Optical A 7 (L) AUX21 = Optical A 8 (R)

AUX22 = Optical B 1 (L) AUX23 = Optical B 2 (R) AUX24 = Optical B 3 (L) AUX25 = Optical B 4 (R) AUX26 = Optical B 5 (L) AUX27 = Optical B 6 (R) AUX28 = Optical B 7 (L) AUX29 = Optical B 8 (R)

beatboxa commented 3 months ago

For what it's worth, here is my attempt to create a UCM configuration. This is not ideally how I would like to set up the card; but it is the default setup and how the device actually behaves (and should behave) out of the box. I personally want to remap output channels to support surround sound mapping; but I'll attempt to do that after I get this working.

`LibraryConfig.pcm.Config {

#bindings
#outputs
pcm.motu828_stereo_out {
    @args [ CARD CHN0 CHN1 ]
    @args {
        CARD.type string
        CHN0.type integer
        CHN1.type integer
    }
    type dshare
    ipc_key 828012
    slave {
        pcm {
            type hw
            card $CARD
            device 0
        }
        channels 32
    }
    bindings.0 $CHN0
    bindings.1 $CHN1
}

pcm.motu828_71_out {
    @args [ CARD CHN0 CHN1 CHN2 CHN3 CHN4 CHN5 CHN6 CHN7 ]
    @args {
        CARD.type string
        CHN0.type integer
        CHN1.type integer
        CHN2.type integer
        CHN3.type integer
        CHN4.type integer
        CHN5.type integer
        CHN6.type integer
        CHN7.type integer
    }
    type dshare
    ipc_key 828018
    slave {
        pcm {
            type hw
            card $CARD
            device 0
        }
        channels 32
    }
    bindings.0 $CHN0
    bindings.1 $CHN1
    bindings.2 $CHN2
    bindings.3 $CHN3
    bindings.4 $CHN4
    bindings.5 $CHN5
    bindings.6 $CHN6
    bindings.7 $CHN7
}

#inputs
pcm.motu828_mono_in {
    @args [ CARD CHN0 ]
    @args {
        CARD.type string
        CHN0.type integer
    }
    type dsnoop
    ipc_key 828001
    slave {
        pcm {
            type hw
            card $CARD
            device 0
        }
        channels 30
    }
    bindings.0 $CHN0
}

pcm.motu828_stereo_in {
    @args [ CARD CHN0 CHN1 ]
    @args {
        CARD.type string
        CHN0.type integer
        CHN1.type integer
    }
    type dsnoop
    ipc_key 828112
    slave {
        pcm {
            type hw
            card $CARD
            device 0
        }
        channels 30
    }
    bindings.0 $CHN0
    bindings.1 $CHN1
}

pcm.motu828_71_in {
    @args [ CARD CHN0 CHN1 CHN2 CHN3 CHN4 CHN5 CHN6 CHN7 ]
    @args {
        CARD.type string
        CHN0.type integer
        CHN1.type integer
        CHN2.type integer
        CHN3.type integer
        CHN4.type integer
        CHN5.type integer
        CHN6.type integer
        CHN7.type integer
    }
    type dsnoop
    ipc_key 828118
    slave {
        pcm {
            type hw
            card $CARD
            device 0
        }
        channels 30
    }
    bindings.0 $CHN0
    bindings.1 $CHN1
    bindings.2 $CHN2
    bindings.3 $CHN3
    bindings.4 $CHN4
    bindings.5 $CHN5
    bindings.6 $CHN6
    bindings.7 $CHN7
}

#Virtual device outputs
pcm.motu828_lineout12 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_out:" $CARD ",0,1" ]
    }
}

pcm.motu828_lineout34 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_out:" $CARD ",2,3" ]
    }
}

pcm.motu828_lineout56 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_out:" $CARD ",4,5" ]
    }
}

pcm.motu828_lineout78 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_out:" $CARD ",6,7" ]
    }
}

pcm.motu828_lineout910 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_out:" $CARD ",8,9" ]
    }
}

pcm.motu828_headphones1 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_out:" $CARD ",10,11" ]
    }
}

pcm.motu828_headphones2 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_out:" $CARD ",12,13" ]
    }
}

pcm.motu828_spdifout1 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_out:" $CARD ",14,15" ]
    }
}

pcm.motu828_spdifout2 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_71_out:" $CARD ",16,17,18,19,20,21,22,23" ]
    }
}

pcm.motu828_spdifout3 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_71_out:" $CARD ",24,25,26,27,28,29,30,31" ]
    }
}

#Virtual Device Inputs:
pcm.motu828_mic1 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_mono_in:" $CARD ",0" ]
    }
}

pcm.motu828_mic2 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_mono_in:" $CARD ",1" ]
    }
}

pcm.motu828_linein34 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_in:" $CARD ",2,3" ]
    }
}

pcm.motu828_linein56 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_in:" $CARD ",4,5" ]
    }
}

pcm.motu828_linein78 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_in:" $CARD ",6,7" ]
    }
}

pcm.motu828_linein910 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_in:" $CARD ",8,9" ]
    }
}

pcm.motu828_loopback {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_in:" $CARD ",10,11" ]
    }
}

pcm.motu828_spdifin1 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_stereo_in:" $CARD ",12,13" ]
    }
}

pcm.motu828_spdifin2 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_71_in:" $CARD ",14,15,16,17,18,19,20,21" ]
    }
}

pcm.motu828_spdifin3 {
    @args [ CARD ]
    @args.CARD.type string
    type empty
    slave.pcm {
        @func concat
        strings [ "motu828_71_in:" $CARD ",22,23,24,25,26,27,28,29" ]
    }
}

}

Physical Device Outputs:

SectionDevice."Line_Out_1-2" { Comment "Main Out A (1-2)" Value { PlaybackPriority 200 PlaybackChannels 2 PlaybackPCM "motu828_lineout12:${CardId}" PlaybackMixerElem "Main Out A" } }

SectionDevice."Line_Out_3-4" { Comment "Main Out B / Line Out (3-4)" Value { PlaybackPriority 190 PlaybackChannels 2 PlaybackPCM "motu828_lineout34:${CardId}" PlaybackMixerElem "Main Out B / Line Out (3-4)" } }

SectionDevice."Line_Out_5-6" { Comment "Line Out (5-6)" Value { PlaybackPriority 180 PlaybackChannels 2 PlaybackPCM "motu828_lineout56:${CardId}" PlaybackMixerElem "Line Out (5-6)" } }

SectionDevice."Line_Out_7-8" { Comment "Line Out (7-8)" Value { PlaybackPriority 170 PlaybackChannels 2 PlaybackPCM "motu828_lineout78:${CardId}" PlaybackMixerElem "Line Out (7-8)" } }

SectionDevice."Line_Out_9-10" { Comment "Line Out (9-10)" Value { PlaybackPriority 160 PlaybackChannels 2 PlaybackPCM "motu828_lineout910:${CardId}" PlaybackMixerElem "Line Out (9-10)" } }

SectionDevice."Headphones_Out_1" { Comment "Headphones 1" Value { PlaybackPriority 199 PlaybackChannels 2 PlaybackPCM "motu828_headphones1:${CardId}" PlaybackMixerElem "Headphones 1" } }

SectionDevice."Headphones_Out_2" { Comment "Headphones 2" Value { PlaybackPriority 198 PlaybackChannels 2 PlaybackPCM "motu828_headphones2:${CardId}" PlaybackMixerElem "Headphones 2" } }

SectionDevice."SPDIF_Out_1" { Comment "S/PDIF Out (RCA)" Value { PlaybackPriority 150 PlaybackChannels 2 PlaybackPCM "motu828_spdifout1:${CardId}" PlaybackMixerElem "S/PDIF" } }

SectionDevice."SPDIF_Out_2" { Comment "Optical A Out" Value { PlaybackPriority 140 PlaybackChannels 8 PlaybackPCM "motu828_spdifout2:${CardId}" PlaybackMixerElem "Optical A" } }

SectionDevice."SPDIF_Out_3" { Comment "Optical B Out" Value { PlaybackPriority 130 PlaybackChannels 8 PlaybackPCM "motu828_spdifout3:${CardId}" PlaybackMixerElem "Optical B" }

}

Physical Device Inputs

SectionDevice."Mic_In_1" { Comment "Mic / Line / Instrument In 1" Value { CapturePriority 200 CaptureChannels 1 CapturePCM "motu828_mic1:${CardId}" CaptureMixerElem "Mic / Line In 1" } }

SectionDevice."Mic_In_2" { Comment "Mic / Line / Instrument In 2" Value { CapturePriority 190 CaptureChannels 1 CapturePCM "motu828_mic2:${CardId}" CaptureMixerElem "Mic / Line In 2" } }

SectionDevice."Line_In_3-4" { Comment "Line In 3-4" Value { CapturePriority 180 CaptureChannels 2 CapturePCM "motu828_linein34:${CardId}" CaptureMixerElem "Line In 3-4" } }

SectionDevice."Line_In_5-6" { Comment "Line In 5-6" Value { CapturePriority 170 CaptureChannels 2 CapturePCM "motu828_linein56:${CardId}" CaptureMixerElem "Line In 5-6" } }

SectionDevice."Line_In_7-8" { Comment "Line In 7-8" Value { CapturePriority 160 CaptureChannels 2 CapturePCM "motu828_linein78:${CardId}" CaptureMixerElem "Line In 7-8" } }

SectionDevice."Line_In_9-10" { Comment "Line In 9-10" Value { CapturePriority 150 CaptureChannels 2 CapturePCM "motu828_linein910:${CardId}" CaptureMixerElem "Line In 9-10" } }

SectionDevice."Capture Music" { Comment "Loopback" Value { CapturePriority 199 CaptureChannels 2 CapturePCM "motu828_loopback:${CardId}" CaptureMixerElem "Loopback" } }

SectionDevice."SPDIF_In_1" { Comment "S/PDIF In (RCA)" Value { CapturePriority 140 CaptureChannels 2 CapturePCM "motu828_spdifin1:${CardId}" CaptureMixerElem "S/PDIF" } }

SectionDevice."SPDIF_In_2" { Comment "Optical A In" Value { CapturePriority 120 CaptureChannels 8 CapturePCM "motu828_spdifin2:${CardId}" CaptureMixerElem "Optical A" } }

SectionDevice."SPDIF_In_3" { Comment "Optical B In (ADAT)" Value { CapturePriority 110 CaptureChannels 8 CapturePCM "motu828_spdifin3:${CardId}" CaptureMixerElem "Optical B" } }`

To summarize what I did (at least this is my understanding):

This has gotten me the furthest; but it seems to fail and then fallback to 2 channel duplex in the pro audio profile. I'm guessing this could be due to xrun or timing? Maybe I have to define a buffer or period? Or maybe I'm missing something else?

Here is the output of the command "spa-acp-tool -c 0 -vvvv info":

UCM available for card hw:0 UCM _alibpref=_ucm0001. Set UCM verb to HiFi Got CapturePCM for device SPDIF_In_3: _ucm0001.motu828_spdifin3:D828 Got PlaybackCTL for device SPDIF_In_3: _ucm0001.hw:D828 Got CaptureCTL for device SPDIF_In_3: _ucm0001.hw:D828 Got CaptureMixerElem for device SPDIF_In_3: Optical B Got CapturePriority for device SPDIF_In_3: 110 Got CaptureChannels for device SPDIF_In_3: 8 No _conflictingdevs for device SPDIF_In_3 No _supporteddevs for device SPDIF_In_3 Got CapturePCM for device SPDIF_In_2: _ucm0001.motu828_spdifin2:D828 Got PlaybackCTL for device SPDIF_In_2: _ucm0001.hw:D828 Got CaptureCTL for device SPDIF_In_2: _ucm0001.hw:D828 Got CaptureMixerElem for device SPDIF_In_2: Optical A Got CapturePriority for device SPDIF_In_2: 120 Got CaptureChannels for device SPDIF_In_2: 8 No _conflictingdevs for device SPDIF_In_2 No _supporteddevs for device SPDIF_In_2 Got CapturePCM for device SPDIF_In_1: _ucm0001.motu828_spdifin1:D828 Got PlaybackCTL for device SPDIF_In_1: _ucm0001.hw:D828 Got CaptureCTL for device SPDIF_In_1: _ucm0001.hw:D828 Got CaptureMixerElem for device SPDIF_In_1: S/PDIF Got CapturePriority for device SPDIF_In_1: 140 Got CaptureChannels for device SPDIF_In_1: 2 No _conflictingdevs for device SPDIF_In_1 No _supporteddevs for device SPDIF_In_1 Got CapturePCM for device Capture Music: _ucm0001.motu828_loopback:D828 Got PlaybackCTL for device Capture Music: _ucm0001.hw:D828 Got CaptureCTL for device Capture Music: _ucm0001.hw:D828 Got CaptureMixerElem for device Capture Music: Loopback Got CapturePriority for device Capture Music: 199 Got CaptureChannels for device Capture Music: 2 No _conflictingdevs for device Capture Music No _supporteddevs for device Capture Music Got CapturePCM for device Line_In_9-10: _ucm0001.motu828_linein910:D828 Got PlaybackCTL for device Line_In_9-10: _ucm0001.hw:D828 Got CaptureCTL for device Line_In_9-10: _ucm0001.hw:D828 Got CaptureMixerElem for device Line_In_9-10: Line In 9-10 Got CapturePriority for device Line_In_9-10: 150 Got CaptureChannels for device Line_In_9-10: 2 No _conflictingdevs for device Line_In_9-10 No _supporteddevs for device Line_In_9-10 Got CapturePCM for device Line_In_7-8: _ucm0001.motu828_linein78:D828 Got PlaybackCTL for device Line_In_7-8: _ucm0001.hw:D828 Got CaptureCTL for device Line_In_7-8: _ucm0001.hw:D828 Got CaptureMixerElem for device Line_In_7-8: Line In 7-8 Got CapturePriority for device Line_In_7-8: 160 Got CaptureChannels for device Line_In_7-8: 2 No _conflictingdevs for device Line_In_7-8 No _supporteddevs for device Line_In_7-8 Got CapturePCM for device Line_In_5-6: _ucm0001.motu828_linein56:D828 Got PlaybackCTL for device Line_In_5-6: _ucm0001.hw:D828 Got CaptureCTL for device Line_In_5-6: _ucm0001.hw:D828 Got CaptureMixerElem for device Line_In_5-6: Line In 5-6 Got CapturePriority for device Line_In_5-6: 170 Got CaptureChannels for device Line_In_5-6: 2 No _conflictingdevs for device Line_In_5-6 No _supporteddevs for device Line_In_5-6 Got CapturePCM for device Line_In_3-4: _ucm0001.motu828_linein34:D828 Got PlaybackCTL for device Line_In_3-4: _ucm0001.hw:D828 Got CaptureCTL for device Line_In_3-4: _ucm0001.hw:D828 Got CaptureMixerElem for device Line_In_3-4: Line In 3-4 Got CapturePriority for device Line_In_3-4: 180 Got CaptureChannels for device Line_In_3-4: 2 No _conflictingdevs for device Line_In_3-4 No _supporteddevs for device Line_In_3-4 Got CapturePCM for device Mic_In_2: _ucm0001.motu828_mic2:D828 Got PlaybackCTL for device Mic_In_2: _ucm0001.hw:D828 Got CaptureCTL for device Mic_In_2: _ucm0001.hw:D828 Got CaptureMixerElem for device Mic_In_2: Mic / Line In 2 Got CapturePriority for device Mic_In_2: 190 Got CaptureChannels for device Mic_In_2: 1 No _conflictingdevs for device Mic_In_2 No _supporteddevs for device Mic_In_2 Got CapturePCM for device Mic_In_1: _ucm0001.motu828_mic1:D828 Got PlaybackCTL for device Mic_In_1: _ucm0001.hw:D828 Got CaptureCTL for device Mic_In_1: _ucm0001.hw:D828 Got CaptureMixerElem for device Mic_In_1: Mic / Line In 1 Got CapturePriority for device Mic_In_1: 200 Got CaptureChannels for device Mic_In_1: 1 No _conflictingdevs for device Mic_In_1 No _supporteddevs for device Mic_In_1 Got PlaybackPCM for device SPDIF_Out_3: _ucm0001.motu828_spdifout3:D828 Got PlaybackCTL for device SPDIF_Out_3: _ucm0001.hw:D828 Got PlaybackMixerElem for device SPDIF_Out_3: Optical B Got PlaybackPriority for device SPDIF_Out_3: 130 Got PlaybackChannels for device SPDIF_Out_3: 8 Got CaptureCTL for device SPDIF_Out_3: _ucm0001.hw:D828 No _conflictingdevs for device SPDIF_Out_3 No _supporteddevs for device SPDIF_Out_3 Got PlaybackPCM for device SPDIF_Out_2: _ucm0001.motu828_spdifout2:D828 Got PlaybackCTL for device SPDIF_Out_2: _ucm0001.hw:D828 Got PlaybackMixerElem for device SPDIF_Out_2: Optical A Got PlaybackPriority for device SPDIF_Out_2: 140 Got PlaybackChannels for device SPDIF_Out_2: 8 Got CaptureCTL for device SPDIF_Out_2: _ucm0001.hw:D828 No _conflictingdevs for device SPDIF_Out_2 No _supporteddevs for device SPDIF_Out_2 Got PlaybackPCM for device SPDIF_Out_1: _ucm0001.motu828_spdifout1:D828 Got PlaybackCTL for device SPDIF_Out_1: _ucm0001.hw:D828 Got PlaybackMixerElem for device SPDIF_Out_1: S/PDIF Got PlaybackPriority for device SPDIF_Out_1: 150 Got PlaybackChannels for device SPDIF_Out_1: 2 Got CaptureCTL for device SPDIF_Out_1: _ucm0001.hw:D828 No _conflictingdevs for device SPDIF_Out_1 No _supporteddevs for device SPDIF_Out_1 Got PlaybackPCM for device Headphones_Out_2: _ucm0001.motu828_headphones2:D828 Got PlaybackCTL for device Headphones_Out_2: _ucm0001.hw:D828 Got PlaybackMixerElem for device Headphones_Out_2: Headphones 2 Got PlaybackPriority for device Headphones_Out_2: 198 Got PlaybackChannels for device Headphones_Out_2: 2 Got CaptureCTL for device Headphones_Out_2: _ucm0001.hw:D828 No _conflictingdevs for device Headphones_Out_2 No _supporteddevs for device Headphones_Out_2 Got PlaybackPCM for device Headphones_Out_1: _ucm0001.motu828_headphones1:D828 Got PlaybackCTL for device Headphones_Out_1: _ucm0001.hw:D828 Got PlaybackMixerElem for device Headphones_Out_1: Headphones 1 Got PlaybackPriority for device Headphones_Out_1: 199 Got PlaybackChannels for device Headphones_Out_1: 2 Got CaptureCTL for device Headphones_Out_1: _ucm0001.hw:D828 No _conflictingdevs for device Headphones_Out_1 No _supporteddevs for device Headphones_Out_1 Got PlaybackPCM for device Line_Out_9-10: _ucm0001.motu828_lineout910:D828 Got PlaybackCTL for device Line_Out_9-10: _ucm0001.hw:D828 Got PlaybackMixerElem for device Line_Out_9-10: Line Out (9-10) Got PlaybackPriority for device Line_Out_9-10: 160 Got PlaybackChannels for device Line_Out_9-10: 2 Got CaptureCTL for device Line_Out_9-10: _ucm0001.hw:D828 No _conflictingdevs for device Line_Out_9-10 No _supporteddevs for device Line_Out_9-10 Got PlaybackPCM for device Line_Out_7-8: _ucm0001.motu828_lineout78:D828 Got PlaybackCTL for device Line_Out_7-8: _ucm0001.hw:D828 Got PlaybackMixerElem for device Line_Out_7-8: Line Out (7-8) Got PlaybackPriority for device Line_Out_7-8: 170 Got PlaybackChannels for device Line_Out_7-8: 2 Got CaptureCTL for device Line_Out_7-8: _ucm0001.hw:D828 No _conflictingdevs for device Line_Out_7-8 No _supporteddevs for device Line_Out_7-8 Got PlaybackPCM for device Line_Out_5-6: _ucm0001.motu828_lineout56:D828 Got PlaybackCTL for device Line_Out_5-6: _ucm0001.hw:D828 Got PlaybackMixerElem for device Line_Out_5-6: Line Out (5-6) Got PlaybackPriority for device Line_Out_5-6: 180 Got PlaybackChannels for device Line_Out_5-6: 2 Got CaptureCTL for device Line_Out_5-6: _ucm0001.hw:D828 No _conflictingdevs for device Line_Out_5-6 No _supporteddevs for device Line_Out_5-6 Got PlaybackPCM for device Line_Out_3-4: _ucm0001.motu828_lineout34:D828 Got PlaybackCTL for device Line_Out_3-4: _ucm0001.hw:D828 Got PlaybackMixerElem for device Line_Out_3-4: Main Out B / Line Out (3-4) Got PlaybackPriority for device Line_Out_3-4: 190 Got PlaybackChannels for device Line_Out_3-4: 2 Got CaptureCTL for device Line_Out_3-4: _ucm0001.hw:D828 No _conflictingdevs for device Line_Out_3-4 No _supporteddevs for device Line_Out_3-4 Got PlaybackPCM for device Line_Out_1-2: _ucm0001.motu828_lineout12:D828 Got PlaybackCTL for device Line_Out_1-2: _ucm0001.hw:D828 Got PlaybackMixerElem for device Line_Out_1-2: Main Out A Got PlaybackPriority for device Line_Out_1-2: 200 Got PlaybackChannels for device Line_Out_1-2: 2 Got CaptureCTL for device Line_Out_1-2: _ucm0001.hw:D828 No _conflictingdevs for device Line_Out_1-2 No _supporteddevs for device Line_Out_1-2 Found UCM profiles UCM mapping: HiFi: motu828_spdifin3:D828: source dev SPDIF_In_3 UCM mapping: HiFi: motu828_spdifin2:D828: source dev SPDIF_In_2 UCM mapping: HiFi: motu828_spdifin1:D828: source dev SPDIF_In_1 UCM mapping: HiFi: motu828_loopback:D828: source dev Capture Music UCM mapping: HiFi: motu828_linein910:D828: source dev Line_In_9-10 UCM mapping: HiFi: motu828_linein78:D828: source dev Line_In_7-8 UCM mapping: HiFi: motu828_linein56:D828: source dev Line_In_5-6 UCM mapping: HiFi: motu828_linein34:D828: source dev Line_In_3-4 UCM mapping: HiFi: motu828_mic2:D828: source dev Mic_In_2 UCM mapping: HiFi: motu828_mic1:D828: source dev Mic_In_1 UCM mapping: HiFi: motu828_spdifout3:D828: sink dev SPDIF_Out_3 UCM mapping: HiFi: motu828_spdifout2:D828: sink dev SPDIF_Out_2 UCM mapping: HiFi: motu828_spdifout1:D828: sink dev SPDIF_Out_1 UCM mapping: HiFi: motu828_headphones2:D828: sink dev Headphones_Out_2 UCM mapping: HiFi: motu828_headphones1:D828: sink dev Headphones_Out_1 UCM mapping: HiFi: motu828_lineout910:D828: sink dev Line_Out_9-10 UCM mapping: HiFi: motu828_lineout78:D828: sink dev Line_Out_7-8 UCM mapping: HiFi: motu828_lineout56:D828: sink dev Line_Out_5-6 UCM mapping: HiFi: motu828_lineout34:D828: sink dev Line_Out_3-4 UCM mapping: HiFi: motu828_lineout12:D828: sink dev Line_Out_1-2 Profile HiFi (28x32 Default), input=null, output=null priority=8000, supported=yes n_input_mappings=10, n_output_mappings=10 Input HiFi: motu828_spdifin3:D828: source Input HiFi: motu828_spdifin2:D828: source Input HiFi: motu828_spdifin1:D828: source Input HiFi: motu828_loopback:D828: source Input HiFi: motu828_linein910:D828: source Input HiFi: motu828_linein78:D828: source Input HiFi: motu828_linein56:D828: source Input HiFi: motu828_linein34:D828: source Input HiFi: motu828_mic2:D828: source Input HiFi: motu828_mic1:D828: source Output HiFi: motu828_spdifout3:D828: sink Output HiFi: motu828_spdifout2:D828: sink Output HiFi: motu828_spdifout1:D828: sink Output HiFi: motu828_headphones2:D828: sink Output HiFi: motu828_headphones1:D828: sink Output HiFi: motu828_lineout910:D828: sink Output HiFi: motu828_lineout78:D828: sink Output HiFi: motu828_lineout56:D828: sink Output HiFi: motu828_lineout34:D828: sink Output HiFi: motu828_lineout12:D828: sink Set ucm verb to HiFi Trying _ucm0001.motu828_spdifout3:D828 with SND_PCM_NO_AUTO_FORMAT ... ALSA device open '_ucm0001.motu828_spdifout3:D828' playback: 0x5af1274e80c0 snd_pcm_hw_params_set_format(Signed 16 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 16 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Float 32 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Float 32 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 32 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 32 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 24 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 24 bit Big Endian) failed: Invalid argument Maximum hw buffer size is 375 ms Set buffer size first (to 4800 samples), period size second (to 1200 samples). Device motu828_71_out:D828,24,25,26,27,28,29,30,31 doesn't support sample format s16le, changed to s24le. Trying _ucm0001.motu828_spdifout2:D828 with SND_PCM_NO_AUTO_FORMAT ... ALSA device open '_ucm0001.motu828_spdifout2:D828' playback: 0x5af1274e7820 snd_pcm_hw_params_set_format(Signed 16 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 16 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Float 32 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Float 32 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 32 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 32 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 24 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 24 bit Big Endian) failed: Invalid argument Maximum hw buffer size is 375 ms Set buffer size first (to 4800 samples), period size second (to 1200 samples). Device motu828_71_out:D828,16,17,18,19,20,21,22,23 doesn't support sample format s16le, changed to s24le. Trying _ucm0001.motu828_spdifout1:D828 with SND_PCM_NO_AUTO_FORMAT ... open '/dev/snd/pcmC0D0p' failed (-16) unable to open slave Error opening PCM device _ucm0001.motu828_spdifout1:D828: Device or resource busy ALSA device close 0x5af1274e80c0 ALSA device close 0x5af1274e7820 Trying hw:0,0 with SND_PCM_NO_AUTO_FORMAT ... ALSA device open 'hw:0,0' playback: 0x5af1274e9750 snd_pcm_hw_params_set_format(Signed 32 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 32 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Float 32 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Float 32 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 32 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 32 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 24 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 24 bit Big Endian) failed: Invalid argument Maximum hw buffer size is 2000 ms Set buffer size first (to 65536 samples), period size second (to 1024 samples). Device hw:0,0 doesn't support 64 channels, changed to 32. Device hw:0,0 doesn't support sample format s32le, changed to s24le. ALSA device close 0x5af1274e9750 Trying hw:0,0 with SND_PCM_NO_AUTO_FORMAT ... ALSA device open 'hw:0,0' capture: 0x5af1274e8d40 snd_pcm_hw_params_set_format(Signed 32 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 32 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Float 32 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Float 32 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 32 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 32 bit Big Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 24 bit Little Endian) failed: Invalid argument snd_pcm_hw_params_set_format(Signed 24 bit Big Endian) failed: Invalid argument Maximum hw buffer size is 2000 ms Set buffer size first (to 65536 samples), period size second (to 1024 samples). Device hw:0,0 doesn't support 64 channels, changed to 30. Device hw:0,0 doesn't support sample format s32le, changed to s24le. ALSA device close 0x5af1274e8d40 Found 0 jacks. activate profile: pro-audio (1) Device: Pro mapping 'Pro' (pro-output-0). Device: Pro mapping 'Pro' (pro-input-0). card 0: profiles:2 devices:2 ports:0 properties: (11) use-ucm = "true" verbose = "true" alsa.card = "0" alsa.card_name = "828" alsa.long_card_name = "MOTU 828 at usb-0000:26:00.0-2, super speed" alsa.driver_name = "snd_usb_audio" alsa.mixer_name = "USB Mixer" alsa.components = "USB07fd:000e" alsa.id = "D828" device.string = "0" device.description = "828"

Any help would be greatly appreciated.

perexg commented 3 months ago

It's better to use (extend for more channels) the SplitPCM / SplitPCMDevice macros in ucm2/common/pcm/split.conf and use those macros to describe devices. I would start with mono / stereo I/O at first and then add multichannel configuration. The mentioned macros can already override channel mapping (chmap). Create a PR, so we can discuss your changes directly.

beatboxa commented 3 months ago

I originally alternatively attempted to use the splitpcm macro as well, based on the Motu M6 configuration file; but it errored out almost immediately with a variable not found. I couldn't get to the bottom of what was different between my Motu 828 and the Motu M6 to cause this.

So I took this more manual approach and got further. FWIW, this latest manual attempt seems to hit this same issue described here: https://github.com/alsa-project/alsa-lib/issues/245

Regardless, I will read up on how to create a pull request and include both of my attempts as well there. Thanks.