Bug 1916017

Summary: pipewire crash when connecting to MAudio FastTrack outputs
Product: [Fedora] Fedora Reporter: Olivier Samyn <code>
Component: pipewireAssignee: Wim Taymans <wtaymans>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: brunovern.a, wtaymans
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pipewire-0.3.20-1.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-24 01:26:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
pipewire backtrace
none
journalctl core dump
none
pw-dump output none

Description Olivier Samyn 2021-01-13 23:32:25 UTC
Created attachment 1747234 [details]
pipewire backtrace

Description of problem:

I have a good old MAudio Fasttrack Pro USB sound card, and I have switched my whole system to pipewire: pulseaudio and jack.

When, using qjackctl or any other jack client, I try to connect anything to the soundcard outputs, pipewire crashes. 

Version-Release number of selected component (if applicable):
Fedora 33 with up to date pipewire packages: 0.3.19-2

How reproducible: Systematic crash.

Additional info:

When the crash occurs, I have some messages in my session log (see attached file) and I also have a core dump; and I've put the back trace in as an attachment.

I tried to change some configs, like forcing soft-mixer and diabling acp, but without effect.

Comment 1 Olivier Samyn 2021-01-13 23:33:30 UTC
Created attachment 1747235 [details]
journalctl core dump

Comment 2 Wim Taymans 2021-01-14 14:29:30 UTC
Can you do:

pw-dump 2>log

and attach the log file here?

Comment 3 Olivier Samyn 2021-01-14 15:35:46 UTC
Created attachment 1747456 [details]
pw-dump output

Comment 4 Wim Taymans 2021-01-14 15:44:42 UTC
Here it is, an unsupported format (S24BE):


        "EnumFormat": [
          {
            "mediaType": "audio",
            "mediaSubtype": "raw",
            "format": "S24BE",
            "rate": { "default": 48000, "min": 8000, "max": 48000 },
            "channels": 2,
            "position": [ "FL", "FR" ]
          }

I'll make sure it doesn't crash and then add support for this.

Comment 5 Olivier Samyn 2021-01-14 15:59:15 UTC
Oh yes, that old card allows one to switch it's USB config depending on the needs. 

I did not thought about this, but I have the following modprobe config which turns on 24 bit mode :
    options snd_usb_audio vid=0x763 pid=0x2012 device_setup=0x9 enable=1

For info, here is the full doc, maybe other configs could lead to issues; do you want me to test other combinations ? 
    # M-Audio FastTrack Pro
    #
    # Possible device configurations:
    #
    #          I/O     | Bits | Sample rate | Setup value
    #    --------------+------+-------------+-------------
    #     4in and 4out |  16  |     44.1/48 |    0x01
    #     2in and 4out |  24  |     44.1/48 |    0x09
    #     4in or  4out |  24  |     88.2/96 |    0x05
    # Without config:
    #     2in and 4out |  16  |     44.1/48 |    0x00
    #
    # 4 input / output = 2 analog + 2 digital
    # 2 input / output = 2 analog
    #
    # Available device_setup values
    #    0x01 : use the device_setup parameter, always needed
    #    0x02 : enable digital output (channels 3,4)
    #    0x04 : use 48kHz-96kHz sampling rate, 8-48 kHz if not used
    #    0x08 : 24bit sampling rate
    #    0x10 : enable digital input (channels 3,4)
    #

Comment 7 Olivier Samyn 2021-01-15 00:14:29 UTC
I re-compiled the fedora package with pipewire master, and the problem is solved, thanks for the quick fix.

For info, some changes where needed in the spec file, seems that translations have been introduced in pipewire.

If required, I can send you the diff.

Comment 8 Fedora Update System 2021-01-22 12:50:03 UTC
FEDORA-2021-f279349372 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-f279349372

Comment 9 Fedora Update System 2021-01-23 02:09:46 UTC
FEDORA-2021-f279349372 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-f279349372`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-f279349372

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2021-01-24 01:26:05 UTC
FEDORA-2021-f279349372 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.