CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.

The above lsusb lists 20 channels/24bits altsetting, with 760bytes maxpacketsize. That means max. samplerate 760*8000/20/3=104kHz. Which is the value logged by camillaDSP. It looks as if the soundcard did not adjust its channels count for the samplerates and indeed allowed 192kHz/20ch/24bits, with many samples being lost due to the insufficient bandwidth. That would hint at a buggy firmware.
This makes a lot of sense! The rate that CamillaDSP measured is suspiciously close to this theoretical rate of 104 kHz. Since CamillaDSP seems to run slowly, I'm guessing that samples aren't being lost, but rather sent too slowly to the device (at the maximum supported bandwidth). Then no idea what the device does when it only receives just over half the samples it needs. If it manages to make any sound, it's likely very choppy.
Is it possible to flash a newer firmware?

EDIT: This is taken from the manual of the interface:
With 8 and 14 channels chosen up to 192 kHz sample rate can be used. Under iOS 192 kHz is
not possible, as there exists no way to select the second or further Alternate Setting on the record side. iOS and all apps always use the first setting, 20 channels, which limits the sample rate
for record and playback to 96 kHz
 
Last edited:
Good catch with the manual. Then I do not understand why the USB config specifies the 192kHz samplerate for the 20 channels altset:

Code:
  Interface 1
    Altset 1
    Format: S24_3LE
    Channels: 20
    Endpoint: 0x02 (2 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Sync Endpoint: 0x82 (2 IN)
    Sync EP Interface: 1
    Sync EP Altset: 1
    Implicit Feedback Mode: No


I vaguely remember we have already discussed an issue in this thread where selecting the channels count changed the supported frequencies. I cannot find the post, there probably was the corresponding stream0 which showed how the soundcard's supported rates were changing with the selected channels count.
 
Thanks. Please can you post lsusb -v when switched to 20 channels (so that we see the USB config for the 20ch mode, and stream0 when 20ch are being played (so that all relevant info is shown)? Thanks.

Here you go. I've switched the interface to 20ch and run lsusb -v:
Code:
Bus 001 Device 007: ID 2a39:3fd9 RME Fireface UCX II (24066911)
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x2a39 RME
  idProduct          0x3fd9 
  bcdDevice            3.01
  iManufacturer           1 RME
  iProduct                2 Fireface UCX II (24066911)
  iSerial                 3 39FD19CE0FE13C8
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x026d
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         3
      bFunctionClass          1 Audio
      bFunctionSubClass       0 
      bFunctionProtocol      32 
      iFunction               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol     32 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               2.00
        bCategory               8
        wTotalLength       0x004b
        bmControls           0x00
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID                1
        bmAttributes            3 Internal programmable clock 
        bmControls           0x03
          Clock Frequency Control (read/write)
        bAssocTerminal          0
        iClockSource            0 
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bCSourceID              1
        bNrChannels            20
        bmChannelConfig    0x00000000
        iChannelNames           0 
        bmControls         0x0000
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             5
        wTerminalType      0x0603 Line Connector
        bAssocTerminal          0
        bCSourceID              1
        bNrChannels            20
        bmChannelConfig    0x00000000
        iChannelNames           0 
        bmControls         0x0000
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             4
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               3
        bCSourceID              1
        bmControls         0x0000
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             6
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               5
        bCSourceID              1
        bmControls         0x0000
        iTerminal               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           3
        bmControls           0x00
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            20
        bmChannelConfig    0x00000000
        iChannelNames           0 
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            3
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x030c  1x 780 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         0 Undefined
          wLockDelay         0x0000
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes           17
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           3
        bmControls           0x00
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            16
        bmChannelConfig    0x00000003
          Front Left (FL)
          Front Right (FR)
        iChannelNames           0 
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            3
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0270  1x 624 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         0 Undefined
          wLockDelay         0x0000
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes           17
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           3
        bmControls           0x00
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            14
        bmChannelConfig    0x00000003
          Front Left (FL)
          Front Right (FR)
        iChannelNames           0 
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            3
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0a4c  2x 588 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         0 Undefined
          wLockDelay         0x0000
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes           17
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           3
        bmControls           0x00
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels             8
        bmChannelConfig    0x00000003
          Front Left (FL)
          Front Right (FR)
        iChannelNames           0 
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            3
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0258  1x 600 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         0 Undefined
          wLockDelay         0x0000
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes           17
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           6
        bmControls           0x00
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            20
        bmChannelConfig    0x00000000
        iChannelNames           0 
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            3
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x030c  1x 780 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         0 Undefined
          wLockDelay         0x0000
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           6
        bmControls           0x00
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            16
        bmChannelConfig    0x00000000
        iChannelNames           0 
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            3
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0270  1x 624 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         0 Undefined
          wLockDelay         0x0000
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           6
        bmControls           0x00
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            14
        bmChannelConfig    0x00000000
        iChannelNames           0 
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            3
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0a4c  2x 588 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         0 Undefined
          wLockDelay         0x0000
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       4
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           6
        bmControls           0x00
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels             8
        bmChannelConfig    0x00000000
        iChannelNames           0 
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            3
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0258  1x 600 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         0 Undefined
          wLockDelay         0x0000
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      3 MIDI Streaming
      bInterfaceProtocol      0 
      iInterface              2 
      MIDIStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength       0x0061
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               1 Embedded
        bJackID                 3
        bNrInputPins            1
        baSourceID( 0)          2
        BaSourcePin( 0)         1
        iJack                   4 
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               2 External
        bJackID                 2
        iJack                   4 
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               1 Embedded
        bJackID                 7
        bNrInputPins            1
        baSourceID( 0)          6
        BaSourcePin( 0)         1
        iJack                   5 
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               2 External
        bJackID                 6
        iJack                   5 
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               1 Embedded
        bJackID                 1
        iJack                   4 
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               2 External
        bJackID                 4
        bNrInputPins            1
        baSourceID( 0)          1
        BaSourcePin( 0)         1
        iJack                   4 
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               1 Embedded
        bJackID                 5
        iJack                   5 
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               2 External
        bJackID                 8
        bNrInputPins            1
        baSourceID( 0)          5
        BaSourcePin( 0)         1
        iJack                   5 
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x07  EP 7 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 6
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         2
          baAssocJackID( 0)       1
          baAssocJackID( 1)       5
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 6
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         2
          baAssocJackID( 0)       3
          baAssocJackID( 1)       7
and
Code:
ubuntu@ubuntu:/usr/local/etc/camilladsp$ sudo cat /proc/asound/II24066911/stream0
RME Fireface UCX II (24066911) at usb-0000:01:00.0-1.3, high speed : USB Audio

Playback:
  Status: Running
    Interface = 1
    Altset = 1
    Packet Size = 780
    Momentary freq = 192000 Hz (0x18.0000)
  Interface 1
    Altset 1
    Format: S24_3LE
    Channels: 20
    Endpoint: 0x02 (2 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Sync Endpoint: 0x82 (2 IN)
    Sync EP Interface: 1
    Sync EP Altset: 1
    Implicit Feedback Mode: No
  Interface 1
    Altset 2
    Format: S24_3LE
    Channels: 16
    Endpoint: 0x02 (2 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Sync Endpoint: 0x82 (2 IN)
    Sync EP Interface: 1
    Sync EP Altset: 2
    Implicit Feedback Mode: No
  Interface 1
    Altset 3
    Format: S24_3LE
    Channels: 14
    Endpoint: 0x02 (2 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR -- -- -- -- -- -- -- -- -- -- -- --
    Sync Endpoint: 0x82 (2 IN)
    Sync EP Interface: 1
    Sync EP Altset: 3
    Implicit Feedback Mode: No
  Interface 1
    Altset 4
    Format: S24_3LE
    Channels: 8
    Endpoint: 0x02 (2 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR -- -- -- -- -- --
    Sync Endpoint: 0x82 (2 IN)
    Sync EP Interface: 1
    Sync EP Altset: 4
    Implicit Feedback Mode: No

Capture:
  Status: Stop
  Interface 2
    Altset 1
    Format: S24_3LE
    Channels: 20
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
  Interface 2
    Altset 2
    Format: S24_3LE
    Channels: 16
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
  Interface 2
    Altset 3
    Format: S24_3LE
    Channels: 14
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR FC LFE RL RR FLC FRC RC SL SR TC TFL TFC
  Interface 2
    Altset 4
    Format: S24_3LE
    Channels: 8
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR FC LFE RL RR FLC FRC

And yes, the sound is highly distorted.

Does this information confirm your thoughts?
 
Is it possible to flash a newer firmware
I checked I had the latest firmware before starting.

I'd also read that in the manual, and read it as a limitation of the iOS interface rather than the capability of the device itself when in Class Compliant mode.

I may have got this wrong, but wouldn't 14 channels at 192kHz also exceed the bandwidth limit?
 
I checked I had the latest firmware before starting.

I'd also read that in the manual, and read it as a limitation of the iOS interface rather than the capability of the device itself when in Class Compliant mode.

I may have got this wrong, but wouldn't 14 channels at 192kHz also exceed the bandwidth limit?


The limitation is that iOS can't switch to a different alternate setting, so it's locked to the first one which is 20 channels (and 96 kHz maximum).



14 channels at 192 kHz should be possible, if it sets the packet size to 1008 bytes:

Now this is interesting. The basic USB isochronous transfer can send 1 packet every 125us microframe (bInterval=1) with maximum size 1024 bytes. That limits the number of channels at 192/24 to 14 (192000*3*14/8000 microframes = 1008 bytes per microframe).
 
jahnanon: Thanks for the dumps.

The USB configuration (lsusb) is identical for your last and previous dumps. What was the actual difference in the soundcard setup between the two dumps?

And yes, the sound is highly distorted.

It must be when basically 50% of samples are missing. IMO alsa keeps sending samples at max consumption rate of 780 bytes/microframe = 780/3/20 = 13 samples per channel per packet. However, the reclocking FIFO in the soundcard is being read by the 192kHz DAC clock at rate 192k/8k= 24 samples per channel per packet. The FIFO is constantly underflown.

Theoretically that should result in the feedback requesting as much extra data as possible, but the feedback value is unchanged:

Code:
Momentary freq = 192000 Hz (0x18.0000)

Most likely the incoming bitrate is so much off from the expected one that the USB feedback code in the soundcard ignores the value and disables the feedback control.

wouldn't 14 channels at 192kHz also exceed the bandwidth limit?

Yes. 192k * 3 * 14 / 8k = 1008 bytes per packet, that would fit the 1024 limit. But USB async must reserve bandwidth for at least one more audioframe per packet so that slightly higher rate can be requested by the feedback. That makes 1008 + 3 *14 = 1050 bytes which already does not fit. E.g. the USB audio gadget in default setup allows increase of 5 promiles above the samplerate, which would be 192000 * 0.005 /8000= 0.12 audioframe of headroom per microframe => rounded to one extra audioframe (1050bytes).

So only the 8ch altsetting fits the 192kHz bandwidth.
 
Thanks guys - it's been very interesting and I think I understand the bandwidth limitations of the device. For my purposes 8 channels is plenty, but it's good to know why the initial setting failed.

I'll drop an email to RME referencing this thread to let them know. As a company they seem very thorough in their approach, so I'm a little surprised that they've let this slip through.
 
I think I see where the problem is. Look at the lsusb -v altsetting 3 for 14 channels:

Code:
        wMaxPacketSize     0x0a4c  2x 588 bytes

2 x 588 bytes, not like for 16 and 20 channels:

Code:
        wMaxPacketSize     0x030c  1x 780 bytes
...
        wMaxPacketSize     0x0270  1x 624 bytes

Let's do the math:

2 x 588 x 8000 / 14 / 3 = 224kHz max. samplerate = 192kHz + healthy async headroom.

For 8ch altsetting the config is

Code:
        wMaxPacketSize     0x0258  1x 600 bytes

1 x 600 x 8000 / 8 / 3 = 200kHz, nice.

Now what about using 2 x 780 for 20ch:

2 x 780 x 8000 / 20 / 3 = 208kHz

And 2 x 624 for 16ch:

2 x 624 x 8000 / 16 / 3 = 208kHz

My 2 cents this is the bug in the firmware - incorrect maxpacketsize format for the 20 and 16ch altsettings.

johnanon: Please can you test 14ch playback at 192kHz (where the maxpacketsize is reported correctly) and post stream0 here? If it works OK, IMO a simple quirk in the alsa usb driver could fake/fix the reported maxpacketsize and the device could work as intended up to 20 channels. Or a fixed firmware, of course.
 
johnanon: Any results for the 14ch test? Thanks a lot.
Sorry for the delay - just got round to this now. Sounds fine running 14 channels. Looks like you were right - here's the stream0 response:
Code:
ubuntu@ubuntu:/usr/local/etc/camilladsp/logs$ cat /proc/asound/II24066911/stream0
RME Fireface UCX II (24066911) at usb-0000:01:00.0-1.3, high speed : USB Audio

Playback:
  Status: Running
    Interface = 1
    Altset = 3
    Packet Size = 1176
    Momentary freq = 192024 Hz (0x18.00c6)
    Feedback Format = 16.16
  Interface 1
    Altset 1
    Format: S24_3LE
    Channels: 20
    Endpoint: 0x02 (2 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Sync Endpoint: 0x82 (2 IN)
    Sync EP Interface: 1
    Sync EP Altset: 1
    Implicit Feedback Mode: No
  Interface 1
    Altset 2
    Format: S24_3LE
    Channels: 16
    Endpoint: 0x02 (2 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Sync Endpoint: 0x82 (2 IN)
    Sync EP Interface: 1
    Sync EP Altset: 2
    Implicit Feedback Mode: No
  Interface 1
    Altset 3
    Format: S24_3LE
    Channels: 14
    Endpoint: 0x02 (2 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR -- -- -- -- -- -- -- -- -- -- -- --
    Sync Endpoint: 0x82 (2 IN)
    Sync EP Interface: 1
    Sync EP Altset: 3
    Implicit Feedback Mode: No
  Interface 1
    Altset 4
    Format: S24_3LE
    Channels: 8
    Endpoint: 0x02 (2 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR -- -- -- -- -- --
    Sync Endpoint: 0x82 (2 IN)
    Sync EP Interface: 1
    Sync EP Altset: 4
    Implicit Feedback Mode: No

Capture:
  Status: Stop
  Interface 2
    Altset 1
    Format: S24_3LE
    Channels: 20
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
  Interface 2
    Altset 2
    Format: S24_3LE
    Channels: 16
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
  Interface 2
    Altset 3
    Format: S24_3LE
    Channels: 14
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR FC LFE RL RR FLC FRC RC SL SR TC TFL TFC
  Interface 2
    Altset 4
    Format: S24_3LE
    Channels: 8
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR FC LFE RL RR FLC FRC
 
Wow I am learning a lot here. I have yet to purchase an interface I am hoping to learn enough from you guys to be able to learn how to use something with at least 20 channels. I am looking to make a reference CBT curved line array for my listening room. They need 10 channels on each side. I repeatedly see the use of LINUX. I am guessing this is what Is the most versatile and stable operating system to use CamillaDSP in?
 
I repeatedly see the use of LINUX. I am guessing this is what Is the most versatile and stable operating system to use CamillaDSP in?
There is no simple answer to which platform is the best, it depends a lot on your preferences and what you want to do.

In terms of stability there should not be any significant difference between Linux, Windows and macOS.
Of course there may be bugs sometimes that affect only one system. That's least likely to affect Alsa since it's the most mature backend, while both WASAPI and CoreAudio are quite new. Then again, those two are in some ways better since I learned a lot along the way. At some point I will rewrite the Alsa and File backends to use some of the new concepts. At that point WASAPI&CoreAudio will become the most mature.. :)
 
johnanon: So RME says the current setup is intentional, to support iOS which presumably does not work with high-speed (multiple transactions). I do not understand why 20ch/16ch and not 14ch but it's not for me to call a shot.

If you want to try a kernel quirk, to test whether faking the max packet size would fix the 192kHz playback for 20ch and 16ch, let me know in PM. IF it turns out to work then new kernel versions could support full hardware features of that device.
 
... you might try using the Mk5 as a capture device and routing the SPDIF or TOSLINK input to the output (that is how I currently use mine).

Hi Michael

I'm testing an RME UCX II at the moment and I wonder if you'd help me with understanding the CamillaDSP/ALSA configuration you use to capture a stream from the soundcard? I'm going to connect my CD's optical to the RME, and that physical input maps to channels 13/14. Any quick pointer you can give me will, no doubt, save me lots of time spent fiddling at this end.

I decided to give the RME a whirl for two reasons. First it supports SPDIF coax at 192kHz, which is the native operational frequency of the LS50W2 that I'm driving (although I accept that this may be of limited theoretical rather than audible significance!). Secondly, I think it offers a route to control the interface using MIDI out of nodeRED so I can automate swapping between 192kHz for streaming content, and occasional CD use by my wife at 44.1kHz.

I had no idea when I started this exploration with CamillaDSP how far it would lead. It's amazing software - and unlocks far too many possibilities!
 
What would those "new concepts" bring to the ALSA table ?
It's about placing the blocking ALSA read/write in a thread of its own. This avoids some problems that occur when the read/write takes longer than expected. Normally that isn't an issue, but when using quirky devices like for example many spdif inputs this means the quirks can be handled in a better way.

The File backend will get the same treatment and it means that pipes can be better supported. The current implementation doesn't work well when reading from a pipe and the sending application stops sending data (but still keeps the pipe open). Some player apps do that when playback is paused.