You are not logged in.

#1 2024-04-17 03:17:08

gearshot
Member
Registered: 2024-04-16
Posts: 4

[SOLVED] PipeWire/WirePlumber Focusrite Scarlett 18i8 Issues

Lately, I have been troubleshooting my USB audio interface which is a Focusrite Scarlett 18i8 3rd Gen. It is 24-bit and supports up to 192 khz sample rate. It has 8 output channels, 8 analog input channels, a S/PDIF input/output, and can be expanded with ADAT with 4 additional inputs at 96 khz, and 8 additional inputs at 48 khz.
Out of the box, the device sounds heavily bitcrushed and is delayed (at least on PipeWire). But with some WirePlumber configuration files, I was able to get the output working perfectly. [Edit: There are clicks and pops in the output but it sounds mostly normal.] The input is worse off and is where I was having the most trouble.

While the output sounds (mostly*) normal, the input sounds bitcrushed which is a problem because I need input to work properly.

With the help of the ArchWiki article on WirePlumber, and a documentation page on configuring ALSA with WirePlumber, I was able to create these configuration files for use with the aforementioned audio interface:

Device Configuration file (51-scarlett-18i8.conf):

monitor.alsa.rules = [
    {
        matches = [
            {
                device.name = "alsa_card.usb-Focusrite_Scarlett_18i8_USB_XXXXXXXXXXXXXX-00"
            }
        ]
        actions = {
            update-props = {
                api.alsa.use-acp = "true"
                api.acp.pro-channels = "18"
                api.alsa.soft-mixer = "true"
                device.profile.pro = "true"
            }
        }
    }
]

Output Configuration file (52-scarlett-18i8-output.conf):

monitor.alsa.rules = [
    {
        matches = [
            {
                node.name = "alsa_output.usb-Focusrite_Scarlett_18i8_USB_XXXXXXXXXXXXXX-00.pro-output-0"
            }
        ]
        actions = {
            update-props = {
                alsa.resolution_bits = "24"
                audio.channels = "8"
                audio.format = "S32LE"
                audio.rate = "192000"
            }
        }
    }
]

Input Configuration file (53-scarlett-18i8-input.conf):

monitor.alsa.rules = [
    {
        matches = [
            {
                node.name = "alsa_input.usb-Focusrite_Scarlett_18i8_USB_XXXXXXXXXXXXXX-00.pro-input-0"
            }
        ]
        actions = {
            update-props = {
                alsa.resolution_bits = "24"
                audio.channels = "10"
                audio.format = "S32LE"
                audio.rate = "192000"
            }
        }
    }
]

I thought that the reason why the input sounds bitcrushed is because of the ADAT channels and ADAT uses a lower sample rate of 96 khz or 48 khz depending on how many channels were extended. Since I don't need ADAT at the moment and would prefer to use 192 khz for music production, I tried to lower the amount of input channels that would exclude ADAT channels. This didn't seem to work. I'm at a point where I don't know what else to try. If there is a solution that doesn't require me to remove those ADAT channels while having the input still working at 192 khz, I would gladly use that. I do believe that it is possible for this device to be fully working because previously, I did this cheap workaround where I would stop the pulseaudio user service with systemctl which would make it restart itself because pipewire.socket was still running. It resulted in the audio interface's both input and output sounding normal at the right sample rate but it's at a cost of not having the screensharing feature to work like I can't screen record with OBS since I'm using Wayland.

Is there anything wrong with these config files? Anything I needed to add to this? Please let me know.

Since I'm assuming most of you don't own this interface, I will try to provide details about the interface (except the serial number which were replaced with X's) from the /proc/asound file and wpctl. Which is what I was using to help me write these WirePlumber config files.

Output of /proc/asound/cardX/stream0:

Focusrite Scarlett 18i8 USB at usb-0000:00:14.0-13, high speed : USB Audio

Playback:
  Status: Running
    Interface = 1
    Altset = 3
    Packet Size = 800
    Momentary freq = 192000 Hz (0x18.0000)
  Interface 1
    Altset 1
    Format: S32_LE
    Channels: 8
    Endpoint: 0x01 (1 OUT) (ASYNC)
    Rates: 44100, 48000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR FC LFE RL RR FLC FRC
    Sync Endpoint: 0x81 (1 IN)
    Sync EP Interface: 2
    Sync EP Altset: 1
    Implicit Feedback Mode: Yes
  Interface 1
    Altset 2
    Format: S32_LE
    Channels: 8
    Endpoint: 0x01 (1 OUT) (ASYNC)
    Rates: 88200, 96000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR FC LFE RL RR FLC FRC
    Sync Endpoint: 0x81 (1 IN)
    Sync EP Interface: 2
    Sync EP Altset: 2
    Implicit Feedback Mode: Yes
  Interface 1
    Altset 3
    Format: S32_LE
    Channels: 8
    Endpoint: 0x01 (1 OUT) (ASYNC)
    Rates: 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR FC LFE RL RR FLC FRC
    Sync Endpoint: 0x81 (1 IN)
    Sync EP Interface: 2
    Sync EP Altset: 3
    Implicit Feedback Mode: Yes

Capture:
  Status: Running
    Interface = 2
    Altset = 3
    Packet Size = 1000
    Momentary freq = 192000 Hz (0x18.0000)
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 20
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 44100, 48000
    Data packet interval: 125 us
    Bits: 24
  Interface 2
    Altset 2
    Format: S32_LE
    Channels: 16
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 88200, 96000
    Data packet interval: 125 us
    Bits: 24
  Interface 2
    Altset 3
    Format: S32_LE
    Channels: 10
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR FC LFE RL RR FLC FRC RC SL

Output of the 'wpctl inspect' command of the ALSA device:

id 115, type PipeWire:Interface:Device
    alsa.card = "1"
    alsa.card_name = "Scarlett 18i8 USB"
    alsa.components = "USB1235:8214"
    alsa.driver_name = "snd_usb_audio"
    alsa.id = "USB"
    alsa.long_card_name = "Focusrite Scarlett 18i8 USB at usb-0000:00:14.0-13, high speed"
    alsa.mixer_name = "USB Mixer"
    api.acp.auto-port = "false"
    api.acp.pro-channels = "18"
    api.alsa.card = "1"
    api.alsa.card.longname = "Focusrite Scarlett 18i8 USB at usb-0000:00:14.0-13, high speed"
    api.alsa.card.name = "Scarlett 18i8 USB"
    api.alsa.path = "hw:1"
    api.alsa.soft-mixer = "true"
    api.alsa.use-acp = "true"
    api.dbus.ReserveDevice1 = "Audio1"
    api.dbus.ReserveDevice1.Priority = "-20"
  * client.id = "110"
  * device.api = "alsa"
    device.bus = "usb"
    device.bus-id = "usb-Focusrite_Scarlett_18i8_USB_XXXXXXXXXXXXXX-00"
    device.bus-path = "pci-0000:00:14.0-usb-0:13:1.0"
  * device.description = "Scarlett 18i8 3rd Gen"
    device.enum.api = "udev"
    device.icon-name = "audio-card-analog-usb"
  * device.name = "alsa_card.usb-Focusrite_Scarlett_18i8_USB_XXXXXXXXXXXXXX-00"
  * device.nick = "Scarlett 18i8 USB"
    device.plugged.usec = "11798760"
    device.product.id = "0x8214"
    device.product.name = "Scarlett 18i8 3rd Gen"
    device.profile.pro = "true"
    device.serial = "Focusrite_Scarlett_18i8_USB_XXXXXXXXXXXXXX"
    device.string = "1"
    device.subsystem = "sound"
    device.sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.0/sound/card1"
    device.vendor.id = "0x1235"
    device.vendor.name = "Focusrite-Novation"
  * factory.id = "14"
  * media.class = "Audio/Device"
    object.path = "alsa:pcm:1"
  * object.serial = "739"

Output of the 'wpctl inspect' command of the [Audio/Source] node:

id 87, type PipeWire:Interface:Node
    alsa.card = "1"
    alsa.card_name = "Scarlett 18i8 USB"
    alsa.class = "generic"
    alsa.components = "USB1235:8214"
    alsa.device = "0"
    alsa.driver_name = "snd_usb_audio"
    alsa.id = "USB"
    alsa.long_card_name = "Focusrite Scarlett 18i8 USB at usb-0000:00:14.0-13, high speed"
    alsa.mixer_name = "USB Mixer"
    alsa.name = "USB Audio"
    alsa.resolution_bits = "24"
    alsa.subclass = "generic-mix"
    alsa.subdevice = "0"
    alsa.subdevice_name = "subdevice #0"
    api.alsa.auto-link = "true"
    api.alsa.card.longname = "Focusrite Scarlett 18i8 USB at usb-0000:00:14.0-13, high speed"
    api.alsa.card.name = "Scarlett 18i8 USB"
    api.alsa.disable-tsched = "true"
    api.alsa.headroom = "0"
    api.alsa.path = "hw:1,0"
    api.alsa.pcm.card = "1"
    api.alsa.pcm.stream = "capture"
    api.alsa.period-num = "512"
    api.alsa.period-size = "64"
    audio.adapt.follower = ""
    audio.channels = "10"
    audio.format = "S32LE"
    audio.position = "AUX0,AUX1,AUX2,AUX3,AUX4,AUX5,AUX6,AUX7,AUX8,AUX9,AUX10,AUX11,AUX12,AUX13,AUX14,AUX15,AUX16,AUX17,AUX18,AUX19"
    audio.rate = "192000"
    card.profile.device = "1"
  * client.id = "110"
    clock.name = "api.alsa.1"
    clock.quantum-limit = "8192"
    device.api = "alsa"
    device.class = "sound"
  * device.id = "115"
    device.profile.description = "Pro"
    device.profile.name = "pro-input-0"
    device.profile.pro = "true"
    device.routes = "0"
  * factory.id = "18"
    factory.mode = "split"
    factory.name = "api.alsa.pcm.source"
    library.name = "audioconvert/libspa-audioconvert"
  * media.class = "Audio/Source"
  * node.description = "Scarlett 18i8 3rd Gen Pro"
    node.driver = "true"
    node.group = "pro-audio-1"
    node.link-group = "pro-audio-1"
    node.max-latency = "16384/192000"
  * node.name = "alsa_input.usb-Focusrite_Scarlett_18i8_USB_XXXXXXXXXXXXXX-00.pro-input-0"
  * node.nick = "Scarlett 18i8 USB"
    node.pause-on-idle = "false"
  * object.path = "alsa:pcm:1:hw:1,0:capture"
  * object.serial = "754"
  * priority.driver = "2500"
  * priority.session = "2500"

Output of the 'wpctl inspect' command of the [Audio/Sink] node:

id 89, type PipeWire:Interface:Node
    alsa.card = "1"
    alsa.card_name = "Scarlett 18i8 USB"
    alsa.class = "generic"
    alsa.components = "USB1235:8214"
    alsa.device = "0"
    alsa.driver_name = "snd_usb_audio"
    alsa.id = "USB"
    alsa.long_card_name = "Focusrite Scarlett 18i8 USB at usb-0000:00:14.0-13, high speed"
    alsa.mixer_name = "USB Mixer"
    alsa.name = "USB Audio"
    alsa.resolution_bits = "24"
    alsa.subclass = "generic-mix"
    alsa.subdevice = "0"
    alsa.subdevice_name = "subdevice #0"
    api.alsa.auto-link = "true"
    api.alsa.card.longname = "Focusrite Scarlett 18i8 USB at usb-0000:00:14.0-13, high speed"
    api.alsa.card.name = "Scarlett 18i8 USB"
    api.alsa.disable-tsched = "true"
    api.alsa.headroom = "0"
    api.alsa.path = "hw:1,0"
    api.alsa.pcm.card = "1"
    api.alsa.pcm.stream = "playback"
    api.alsa.period-num = "512"
    api.alsa.period-size = "64"
    audio.adapt.follower = ""
    audio.channels = "8"
    audio.format = "S32LE"
    audio.position = "AUX0,AUX1,AUX2,AUX3,AUX4,AUX5,AUX6,AUX7"
    audio.rate = "192000"
    card.profile.device = "0"
  * client.id = "110"
    clock.name = "api.alsa.1"
    clock.quantum-limit = "8192"
    device.api = "alsa"
    device.class = "sound"
  * device.id = "115"
    device.profile.description = "Pro"
    device.profile.name = "pro-output-0"
    device.profile.pro = "true"
    device.routes = "0"
  * factory.id = "18"
    factory.mode = "merge"
    factory.name = "api.alsa.pcm.sink"
    library.name = "audioconvert/libspa-audioconvert"
  * media.class = "Audio/Sink"
  * node.description = "Scarlett 18i8 3rd Gen Pro"
    node.driver = "true"
    node.group = "pro-audio-1"
    node.link-group = "pro-audio-1"
    node.max-latency = "16384/192000"
  * node.name = "alsa_output.usb-Focusrite_Scarlett_18i8_USB_XXXXXXXXXXXXXX-00.pro-output-0"
  * node.nick = "Scarlett 18i8 USB"
    node.pause-on-idle = "false"
  * object.path = "alsa:pcm:1:hw:1,0:playback"
  * object.serial = "753"
  * priority.driver = "1500"
  * priority.session = "1500"

I hope this is enough info for anyone that wants to help. If there's something missing you need to know, please tell me.

Last edited by gearshot (2024-04-18 04:13:55)

Offline

#2 2024-04-17 03:55:36

gearshot
Member
Registered: 2024-04-16
Posts: 4

Re: [SOLVED] PipeWire/WirePlumber Focusrite Scarlett 18i8 Issues

Update: I have found that the output has been making clicks and pops. So the output isn't perfect either. It sounds more normal than the input but I would also need to eliminate the issue of popping in the output.

Offline

#3 2024-04-17 06:01:34

gearshot
Member
Registered: 2024-04-16
Posts: 4

Re: [SOLVED] PipeWire/WirePlumber Focusrite Scarlett 18i8 Issues

Increasing the Period/Buffer size to "1024" fixed the clicking and popping audio issue. The bitcrushed audio from input channels is still unsolved.

Offline

#4 2024-04-18 04:13:35

gearshot
Member
Registered: 2024-04-16
Posts: 4

Re: [SOLVED] PipeWire/WirePlumber Focusrite Scarlett 18i8 Issues

I have discovered that the cause of the issues I was facing with my audio interface is FluidSynth. This has led me to fix the issue by changing the driver FluidSynth uses from ALSA to PulseAudio within the configuration file for FluidSynth. After a reboot, audio works perfectly and I don't need to configure with WirePlumber.

Offline

Board footer

Powered by FluxBB