Bug 207023 - MOTU M2 regression on duplex audio
Summary: MOTU M2 regression on duplex audio
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-30 10:19 UTC by Erwin Burema
Modified: 2020-07-03 17:45 UTC (History)
9 users (show)

See Also:
Kernel Version: 5.6rc7
Tree: Mainline
Regression: Yes


Attachments
.config file and output of lspci (190.00 KB, application/x-tar)
2020-03-30 10:19 UTC, Erwin Burema
Details
patch to enable duplex usb audio whith implicit feedback (8.61 KB, patch)
2020-04-03 13:07 UTC, Erwin Burema
Details | Diff

Description Erwin Burema 2020-03-30 10:19:29 UTC
Created attachment 288127 [details]
.config file and output of lspci

[1.] One line summary of the problem:
MOTU M2 regression on duplex audio

[2.] Full description of the problem/report:
After installing a recent kernel (I think it started with 5.4) suddenly pulseaudio didn't have duplex audio support anymore and had the following message in my kernel log: 

Unable to change format on ep #81: already in use

Before this had no issues with crackling sound (both with Jack and pulseaudio), although I do force everything to be 48Khz. Interestingly enhough Jack had no problems with this.

[3.] Keywords (i.e., modules, networking, kernel):
motu m2, sound usb, endpoint

[4.] Kernel information


[4.1.] Kernel version (from /proc/version):
Linux version 5.6.0-rc7-test5.6 (eburema@alpha-wolf) (gcc version 9.3.0 (Arch Linux 9.3.0-1)) #1 SMP PREEMPT Mon Mar 30 10:46:51 CEST 2020


[4.2.] Kernel .config file:
See attached file

[5.] Most recent kernel version which did not have the bug:
I think that was 5.3 (before commit da2d50868e59257410fe75315dc99984c3b9fad6 )

[6.] Output of Oops.. message (if applicable) with symbolic information
     resolved (see Documentation/admin-guide/oops-tracing.rst)
NA

[7.] A small shell script or example program which triggers the
     problem (if possible)

NA

[8.] Environment
[8.1.] Software (add the output of the ver_linux script here)


Linux alpha-wolf 5.6.0-rc7-test5.6 #1 SMP PREEMPT Mon Mar 30 10:46:51 CEST 2020 x86_64 GNU/Linux

GNU C                   9.3.0
GNU Make                4.3
Binutils                2.34
Util-linux              2.35.1
Mount                   2.35.1
Module-init-tools       27
E2fsprogs               1.45.6
Jfsutils                1.1.15
Reiserfsprogs           3.6.27
Xfsprogs                5.4.0
Pcmciautils             018
PPP                     2.4.7
Nfs-utils               2.4.3
Bison                   3.5.3
Flex                    2.6.4
Linux C Library         2.31
Dynamic linker (ldd)    2.31
Linux C++ Library       6.0.28
Procps                  3.3.16
Kbd                     2.2.0
Console-tools           2.2.0
Sh-utils                8.31
Udev                    245
Modules Loaded          acpi_cpufreq aesni_intel agpgart ahci amdgpu blake2b_generic bridge btrfs ccp cdrom cec crc32c_generic crc32c_intel crc32_pclmul crct10dif_pclmul cryptd crypto_simd crypto_user dca drm drm_kms_helper edac_mce_amd evdev fat fb_sys_fops fuse ghash_clmulni_intel glue_helper gpu_sched hid hid_generic hid_logitech_dj hid_logitech_hidpp hwmon_vid i2c_algo_bit i2c_piix4 igb input_leds ip6table_filter ip6table_mangle ip6table_nat ip6table_raw ip6_tables ip6table_security ip_set iptable_filter iptable_mangle iptable_nat iptable_raw ip_tables iptable_security irqbypass it87 joydev k10temp kvm kvm_amd ledtrig_audio libahci libata libcrc32c llc mac_hid mc mousedev mxm_wmi nf_conntrack nf_conntrack_broadcast nf_conntrack_netbios_ns nf_defrag_ipv4 nf_defrag_ipv6 nf_nat nfnetlink nf_reject_ipv4 nf_reject_ipv6 nf_tables nf_tables_set nft_chain_nat nft_ct nft_fib nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_masq nft_objref nft_reject nft_reject_inet nls_cp437 nls_iso8859_1 pcspkr pinctrl_amd raid6_pq rng_core scsi_mod sd_mod sg snd snd_hda_codec snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_core snd_hda_intel snd_hwdep snd_intel_dspcfg snd_pcm snd_rawmidi snd_seq_device snd_timer snd_usb_audio snd_usbmidi_lib soundcore sp5100_tco sr_mod stp syscopyarea sysfillrect sysimgblt ttm uinput usbhid vfat vfio vfio_iommu_type1 vfio_pci vfio_virqfd wmi wmi_bmof xhci_hcd xhci_pci xor x_tables


[8.2.] Processor information (from /proc/cpuinfo):
(truncated to only 1 core)
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 23
model           : 113
model name      : AMD Ryzen 9 3900X 12-Core Processor
stepping        : 0
microcode       : 0x8701013
cpu MHz         : 2689.664
cache size      : 512 KB
physical id     : 0
siblings        : 24
core id         : 0
cpu cores       : 12
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 16
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate sme ssbd mba sev ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif umip rdpid overflow_recov succor smca
bugs            : sysret_ss_attrs spectre_v1 spectre_v2 spec_store_bypass
bogomips        : 7588.61
TLB size        : 3072 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 43 bits physical, 48 bits virtual
power management: ts ttp tm hwpstate cpb eff_freq_ro [13] [14]

[8.3.] Module information (from /proc/modules):

fuse 139264 3 - Live 0x0000000000000000
nft_masq 16384 2 - Live 0x0000000000000000
nft_objref 16384 1 - Live 0x0000000000000000
nf_conntrack_netbios_ns 16384 1 - Live 0x0000000000000000
nf_conntrack_broadcast 16384 1 nf_conntrack_netbios_ns, Live 0x0000000000000000
nft_fib_inet 16384 1 - Live 0x0000000000000000
nft_fib_ipv4 16384 1 nft_fib_inet, Live 0x0000000000000000
nft_fib_ipv6 16384 1 nft_fib_inet, Live 0x0000000000000000
nft_fib 16384 3 nft_fib_inet,nft_fib_ipv4,nft_fib_ipv6, Live 0x0000000000000000
nft_reject_inet 16384 4 - Live 0x0000000000000000
nf_reject_ipv4 16384 1 nft_reject_inet, Live 0x0000000000000000
nf_reject_ipv6 20480 1 nft_reject_inet, Live 0x0000000000000000
nft_reject 16384 1 nft_reject_inet, Live 0x0000000000000000
nft_ct 20480 32 - Live 0x0000000000000000
nf_tables_set 49152 38 - Live 0x0000000000000000
nft_chain_nat 16384 4 - Live 0x0000000000000000
nf_tables 180224 450 nft_masq,nft_objref,nft_fib_inet,nft_fib_ipv4,nft_fib_ipv6,nft_fib,nft_reject_inet,nft_reject,nft_ct,nf_tables_set,nft_chain_nat, Live 0x0000000000000000
ip6table_nat 16384 0 - Live 0x0000000000000000
ip6table_mangle 16384 0 - Live 0x0000000000000000
ip6table_raw 16384 0 - Live 0x0000000000000000
bridge 233472 0 - Live 0x0000000000000000
ip6table_security 16384 0 - Live 0x0000000000000000
iptable_nat 16384 0 - Live 0x0000000000000000
nf_nat 57344 4 nft_masq,nft_chain_nat,ip6table_nat,iptable_nat, Live 0x0000000000000000
stp 16384 1 bridge, Live 0x0000000000000000
llc 16384 2 bridge,stp, Live 0x0000000000000000
nf_conntrack 172032 5 nft_masq,nf_conntrack_netbios_ns,nf_conntrack_broadcast,nft_ct,nf_nat, Live 0x0000000000000000
nf_defrag_ipv6 24576 1 nf_conntrack, Live 0x0000000000000000
nf_defrag_ipv4 16384 1 nf_conntrack, Live 0x0000000000000000
iptable_mangle 16384 0 - Live 0x0000000000000000
iptable_raw 16384 0 - Live 0x0000000000000000
iptable_security 16384 0 - Live 0x0000000000000000
ip_set 57344 0 - Live 0x0000000000000000
nfnetlink 16384 3 nf_tables,ip_set, Live 0x0000000000000000
ip6table_filter 16384 0 - Live 0x0000000000000000
ip6_tables 36864 5 ip6table_nat,ip6table_mangle,ip6table_raw,ip6table_security,ip6table_filter, Live 0x0000000000000000
iptable_filter 16384 0 - Live 0x0000000000000000
it87 65536 0 - Live 0x0000000000000000
hwmon_vid 16384 1 it87, Live 0x0000000000000000
nls_iso8859_1 16384 1 - Live 0x0000000000000000
nls_cp437 20480 1 - Live 0x0000000000000000
vfat 24576 1 - Live 0x0000000000000000
fat 86016 1 vfat, Live 0x0000000000000000
igb 253952 0 - Live 0x0000000000000000
dca 16384 1 igb, Live 0x0000000000000000
hid_logitech_hidpp 45056 0 - Live 0x0000000000000000
mousedev 24576 0 - Live 0x0000000000000000
joydev 28672 0 - Live 0x0000000000000000
input_leds 16384 0 - Live 0x0000000000000000
hid_logitech_dj 28672 0 - Live 0x0000000000000000
edac_mce_amd 32768 0 - Live 0x0000000000000000
kvm_amd 114688 0 - Live 0x0000000000000000
kvm 827392 1 kvm_amd, Live 0x0000000000000000
wmi_bmof 16384 0 - Live 0x0000000000000000
mxm_wmi 16384 0 - Live 0x0000000000000000
snd_hda_codec_realtek 126976 1 - Live 0x0000000000000000
snd_hda_codec_generic 94208 1 snd_hda_codec_realtek, Live 0x0000000000000000
ledtrig_audio 16384 2 snd_hda_codec_realtek,snd_hda_codec_generic, Live 0x0000000000000000
crct10dif_pclmul 16384 1 - Live 0x0000000000000000
snd_hda_codec_hdmi 73728 1 - Live 0x0000000000000000
crc32_pclmul 16384 0 - Live 0x0000000000000000
ghash_clmulni_intel 16384 0 - Live 0x0000000000000000
snd_hda_intel 57344 2 - Live 0x0000000000000000
snd_intel_dspcfg 28672 1 snd_hda_intel, Live 0x0000000000000000
aesni_intel 368640 0 - Live 0x0000000000000000
ccp 114688 1 kvm_amd, Live 0x0000000000000000
snd_hda_codec 163840 4 snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel, Live 0x0000000000000000
sp5100_tco 20480 0 - Live 0x0000000000000000
crypto_simd 16384 1 aesni_intel, Live 0x0000000000000000
cryptd 24576 2 ghash_clmulni_intel,crypto_simd, Live 0x0000000000000000
glue_helper 16384 1 aesni_intel, Live 0x0000000000000000
pcspkr 16384 0 - Live 0x0000000000000000
k10temp 16384 0 - Live 0x0000000000000000
i2c_piix4 28672 0 - Live 0x0000000000000000
snd_hda_core 106496 5 snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec, Live 0x0000000000000000
rng_core 16384 1 ccp, Live 0x0000000000000000
snd_usb_audio 294912 2 - Live 0x0000000000000000
snd_usbmidi_lib 40960 1 snd_usb_audio, Live 0x0000000000000000
snd_hwdep 16384 2 snd_hda_codec,snd_usb_audio, Live 0x0000000000000000
snd_rawmidi 45056 1 snd_usbmidi_lib, Live 0x0000000000000000
snd_seq_device 16384 1 snd_rawmidi, Live 0x0000000000000000
mc 61440 1 snd_usb_audio, Live 0x0000000000000000
snd_pcm 143360 7 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_usb_audio,snd_hda_core, Live 0x0000000000000000
wmi 36864 2 wmi_bmof,mxm_wmi, Live 0x0000000000000000
snd_timer 40960 1 snd_pcm, Live 0x0000000000000000
pinctrl_amd 32768 0 - Live 0x0000000000000000
evdev 24576 17 - Live 0x0000000000000000
mac_hid 16384 0 - Live 0x0000000000000000
snd 110592 18 snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_usb_audio,snd_usbmidi_lib,snd_hwdep,snd_rawmidi,snd_seq_device,snd_pcm,snd_timer, Live 0x0000000000000000
acpi_cpufreq 28672 0 - Live 0x0000000000000000
soundcore 16384 1 snd, Live 0x0000000000000000
uinput 20480 0 - Live 0x0000000000000000
sg 40960 0 - Live 0x0000000000000000
crypto_user 16384 0 - Live 0x0000000000000000
ip_tables 36864 5 iptable_nat,iptable_mangle,iptable_raw,iptable_security,iptable_filter, Live 0x0000000000000000
x_tables 53248 10 ip6table_mangle,ip6table_raw,ip6table_security,iptable_mangle,iptable_raw,iptable_security,ip6table_filter,ip6_tables,iptable_filter,ip_tables, Live 0x0000000000000000
sr_mod 28672 0 - Live 0x0000000000000000
cdrom 77824 1 sr_mod, Live 0x0000000000000000
btrfs 1507328 2 - Live 0x0000000000000000
blake2b_generic 20480 0 - Live 0x0000000000000000
libcrc32c 16384 3 nf_nat,nf_conntrack,btrfs, Live 0x0000000000000000
crc32c_generic 16384 0 - Live 0x0000000000000000
xor 24576 1 btrfs, Live 0x0000000000000000
hid_generic 16384 0 - Live 0x0000000000000000
usbhid 65536 1 hid_logitech_dj, Live 0x0000000000000000
hid 147456 4 hid_logitech_hidpp,hid_logitech_dj,hid_generic,usbhid, Live 0x0000000000000000
sd_mod 57344 8 - Live 0x0000000000000000
raid6_pq 122880 1 btrfs, Live 0x0000000000000000
ahci 40960 4 - Live 0x0000000000000000
crc32c_intel 24576 3 - Live 0x0000000000000000
libahci 45056 1 ahci, Live 0x0000000000000000
libata 294912 2 ahci,libahci, Live 0x0000000000000000
xhci_pci 20480 0 - Live 0x0000000000000000
xhci_hcd 290816 1 xhci_pci, Live 0x0000000000000000
scsi_mod 262144 4 sg,sr_mod,sd_mod,libata, Live 0x0000000000000000
amdgpu 5496832 49 - Live 0x0000000000000000
gpu_sched 40960 1 amdgpu, Live 0x0000000000000000
i2c_algo_bit 16384 2 igb,amdgpu, Live 0x0000000000000000
ttm 122880 1 amdgpu, Live 0x0000000000000000
drm_kms_helper 241664 1 amdgpu, Live 0x0000000000000000
syscopyarea 16384 1 drm_kms_helper, Live 0x0000000000000000
sysfillrect 16384 1 drm_kms_helper, Live 0x0000000000000000
sysimgblt 16384 1 drm_kms_helper, Live 0x0000000000000000
fb_sys_fops 16384 1 drm_kms_helper, Live 0x0000000000000000
cec 65536 1 drm_kms_helper, Live 0x0000000000000000
drm 565248 27 amdgpu,gpu_sched,ttm,drm_kms_helper, Live 0x0000000000000000
agpgart 53248 2 ttm,drm, Live 0x0000000000000000
vfio_pci 57344 0 - Live 0x0000000000000000
irqbypass 16384 2 kvm,vfio_pci, Live 0x0000000000000000
vfio_virqfd 16384 1 vfio_pci, Live 0x0000000000000000
vfio_iommu_type1 32768 0 - Live 0x0000000000000000
vfio 36864 2 vfio_pci,vfio_iommu_type1, Live 0x0000000000000000


[8.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem)
0000-03af : PCI Bus 0000:00
  0000-001f : dma1
  0020-0021 : pic1
  0040-0043 : timer0
  0050-0053 : timer1
  0060-0060 : keyboard
  0061-0061 : PNP0800:00
  0064-0064 : keyboard
  0070-0071 : rtc0
  0080-008f : dma page reg
  00a0-00a1 : pic2
  00c0-00df : dma2
  00f0-00ff : fpu
03b0-03df : PCI Bus 0000:00
03e0-0cf7 : PCI Bus 0000:00
  040b-040b : pnp 00:04
  04d0-04d1 : pnp 00:04
  04d6-04d6 : pnp 00:04
  0800-089f : pnp 00:04
    0800-0803 : ACPI PM1a_EVT_BLK
    0804-0805 : ACPI PM1a_CNT_BLK
    0808-080b : ACPI PM_TMR
    0810-0815 : ACPI CPU throttle
    0820-0827 : ACPI GPE0_BLK
  0900-090f : pnp 00:04
  0910-091f : pnp 00:04
  0a00-0a2f : pnp 00:03
  0a30-0a3f : pnp 00:03
  0a40-0a4f : pnp 00:03
  0a65-0a66 : it87
    0a65-0a66 : it87
  0b00-0b0f : pnp 00:04
  0b20-0b3f : pnp 00:04
  0c00-0c01 : pnp 00:04
  0c14-0c14 : pnp 00:04
  0c50-0c51 : pnp 00:04
  0c52-0c52 : pnp 00:04
  0c6c-0c6c : pnp 00:04
  0c6f-0c6f : pnp 00:04
  0cd0-0cd1 : pnp 00:04
  0cd2-0cd3 : pnp 00:04
  0cd4-0cd5 : pnp 00:04
  0cd6-0cd7 : pnp 00:04
  0cd8-0cdf : pnp 00:04
0cf8-0cff : PCI conf1
0d00-ffff : PCI Bus 0000:00
  d000-dfff : PCI Bus 0000:0a
    d000-d0ff : 0000:0a:00.0
  e000-efff : PCI Bus 0000:09
    e000-e0ff : 0000:09:00.0
  f000-ffff : PCI Bus 0000:02
    f000-ffff : PCI Bus 0000:03
      f000-ffff : PCI Bus 0000:05
        f000-f01f : 0000:05:00.0


00000000-00000fff : Reserved
00001000-0009ffff : System RAM
000a0000-000fffff : Reserved
  000a0000-000bffff : PCI Bus 0000:00
  000c0000-000dffff : PCI Bus 0000:00
    000c0000-000ce7ff : Video ROM
  000f0000-000fffff : System ROM
00100000-09e01fff : System RAM
09e02000-09ffffff : Reserved
0a000000-0a1fffff : System RAM
0a200000-0a20bfff : ACPI Non-volatile Storage
0a20c000-b7275017 : System RAM
b7275018-b7291e57 : System RAM
b7291e58-b7292017 : System RAM
b7292018-b72af057 : System RAM
b72af058-b7313017 : System RAM
b7313018-b7324057 : System RAM
b7324058-ba2a3fff : System RAM
ba2a4000-ba2a4fff : Reserved
ba2a5000-bb654fff : System RAM
bb655000-bb839fff : Reserved
bb83a000-bb9bffff : System RAM
bb9c0000-bbde5fff : ACPI Non-volatile Storage
bbde6000-bcc6efff : Reserved
bcc6f000-beffffff : System RAM
bf000000-bfffffff : Reserved
c0000000-ffffffff : Reserved
  c0000000-fec02fff : PCI Bus 0000:00
    c0000000-d01fffff : PCI Bus 0000:0a
      c0000000-cfffffff : 0000:0a:00.0
      d0000000-d01fffff : 0000:0a:00.0
    e0000000-f01fffff : PCI Bus 0000:09
      e0000000-efffffff : 0000:09:00.0
      f0000000-f01fffff : 0000:09:00.0
    f8000000-fbffffff : PCI MMCONFIG 0000 [bus 00-3f]
      f8000000-fbffffff : Reserved
        f8000000-fbffffff : pnp 00:00
    fc200000-fc7fffff : PCI Bus 0000:02
      fc200000-fc7fffff : PCI Bus 0000:03
        fc200000-fc3fffff : PCI Bus 0000:06
          fc200000-fc2fffff : 0000:06:00.3
          fc200000-fc2fffff : xhci-hcd
          fc300000-fc3fffff : 0000:06:00.1
          fc300000-fc3fffff : xhci-hcd
        fc400000-fc4fffff : PCI Bus 0000:08
          fc400000-fc4007ff : 0000:08:00.0
          fc400000-fc4007ff : ahci
        fc500000-fc5fffff : PCI Bus 0000:07
          fc500000-fc5007ff : 0000:07:00.0
          fc500000-fc5007ff : ahci
        fc600000-fc6fffff : PCI Bus 0000:05
          fc600000-fc61ffff : 0000:05:00.0
          fc600000-fc61ffff : igb
          fc620000-fc623fff : 0000:05:00.0
          fc620000-fc623fff : igb
        fc700000-fc7fffff : PCI Bus 0000:04
          fc700000-fc700fff : 0000:04:00.0
    fc800000-fcafffff : PCI Bus 0000:0c
      fc800000-fc8fffff : 0000:0c:00.3
        fc800000-fc8fffff : xhci-hcd
      fc900000-fc9fffff : 0000:0c:00.1
        fc900000-fc9fffff : ccp
      fca00000-fca07fff : 0000:0c:00.4
        fca00000-fca07fff : ICH HD audio
      fca08000-fca09fff : 0000:0c:00.1
        fca08000-fca09fff : ccp
    fcb00000-fcbfffff : PCI Bus 0000:0e
      fcb00000-fcb007ff : 0000:0e:00.0
        fcb00000-fcb007ff : ahci
    fcc00000-fccfffff : PCI Bus 0000:0d
      fcc00000-fcc007ff : 0000:0d:00.0
        fcc00000-fcc007ff : ahci
    fcd00000-fcdfffff : PCI Bus 0000:0a
      fcd00000-fcd3ffff : 0000:0a:00.0
      fcd40000-fcd5ffff : 0000:0a:00.0
      fcd60000-fcd63fff : 0000:0a:00.1
    fce00000-fcefffff : PCI Bus 0000:09
      fce00000-fce3ffff : 0000:09:00.0
      fce60000-fce63fff : 0000:09:00.1
        fce60000-fce63fff : ICH HD audio
    fcf00000-fcffffff : PCI Bus 0000:01
      fcf00000-fcf03fff : 0000:01:00.0
        fcf00000-fcf03fff : nvme
    fd000000-fd0fffff : pnp 00:01
    feb80000-febfffff : amd_iommu
    fec00000-fec003ff : IOAPIC 0
    fec01000-fec013ff : IOAPIC 1
  fec10000-fec10fff : pnp 00:04
  fed00000-fed003ff : HPET 0
    fed00000-fed003ff : PNP0103:00
  fed81500-fed818ff : AMDI0030:00
  fedc0000-fedc0fff : pnp 00:04
  fee00000-ffffffff : PCI Bus 0000:00
    fee00000-fee00fff : Local APIC
      fee00000-fee00fff : pnp 00:04
    ff000000-ffffffff : pnp 00:04
100000000-83f2fffff : System RAM
  81d800000-81e400f20 : Kernel code
  81e600000-81ea34fff : Kernel rodata
  81ec00000-81ed63e7f : Kernel data
  81f2b2000-81f5fffff : Kernel bss
83f300000-83fffffff : RAM buffer

[8.5.] PCI information ('lspci -vvv' as root)

see attached file

[8.6.] SCSI information (from /proc/scsi/scsi)
Attached devices:
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: WDC WD40EZRZ-00G Rev: 0A80
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: WDC WD40EZRZ-00G Rev: 0A80
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi5 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: WDC WD40EZRZ-00G Rev: 0A80
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi8 Channel: 00 Id: 00 Lun: 00
  Vendor: HL-DT-ST Model: BDDVDRW CH10LS20 Rev: 1.01
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi9 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: WDC WD40EZRZ-00G Rev: 0A80
  Type:   Direct-Access                    ANSI  SCSI revision: 05


[8.7.] Other information that might be relevant to the problem
       (please look in /proc and include all information that you
       think to be relevant):

The issue seems to be introduced with commit: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/sound/usb/pcm.c?h=v5.4.28&id=da2d50868e59257410fe75315dc99984c3b9fad6 which is a fix for the MOTU M4 which sadly has the same USB device numbers, removing this fix restores duplex mode with the MOTU M2 in pulseaudio

[X.] Other notes, patches, fixes, workarounds:

Workaround is to comment out line 364 to line 367 in soud/usb/pcm.c
Comment 1 Takashi Iwai 2020-03-30 11:18:50 UTC
Hm, that's unfortunate.

Alexander, any chance to diffenctiate M2 from other models you fixed?
Comment 2 Alexander Tsoy 2020-03-30 12:32:56 UTC
(In reply to Takashi Iwai from comment #1)
I'm pretty sure M2 also doesn't provide explicit feedback endpoint.

(In reply to Erwin Burema from comment #0)
Could you attach lsusb -v -d 07fd:0008 output?
Comment 3 Erwin Burema 2020-03-30 12:39:37 UTC
Output of lsusb -v -d 0fd:0008 as requested


Bus 001 Device 003: ID 07fd:0008 Mark of the Unicorn M2
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x07fd Mark of the Unicorn
  idProduct          0x0008 
  bcdDevice            1.01
  iManufacturer           1 MOTU
  iProduct                3 M2
  iSerial                 2 M20000007839
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0147
    bNumInterfaces          6
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    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           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol     32 
      iInterface              3 M2
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               2.00
        bCategory               8
        wTotalLength       0x0053
        bmControls           0x00
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID                1
        bmAttributes            3 Internal programmable clock 
        bmControls           0x07
          Clock Frequency Control (read/write)
          Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource            9 MOTU Internal Clock
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     11 (CLOCK_SELECTOR)
        bClockID                4
        bNrInPins               1
        baCSourceID(0)          1
        bmControls           0x03
          Clock Selector Control (read/write)
        iClockSelector          8 MOTU Clock Selector
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID            42
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bCSourceID              4
        bNrChannels             2
        bmChannelConfig    0x00000000
        iChannelNames          12 Out 1
        bmControls         0x0000
        iTerminal               6 M2 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            20
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID              42
        bCSourceID              4
        bmControls         0x0000
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID            41
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bCSourceID              4
        bNrChannels             2
        bmChannelConfig    0x00000000
        iChannelNames          14 In 1
        bmControls         0x0000
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            22
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID              41
        bCSourceID              4
        bmControls         0x0000
        iTerminal               7 M2 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0006  1x 6 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              4 M2 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              4 M2 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink          42
        bmControls           0x00
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels             2
        bmChannelConfig    0x00000000
        iChannelNames          12 Out 1
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x00c8  1x 200 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay         0x0008
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              5 M2 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              5 M2 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink          22
        bmControls           0x00
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels             2
        bmChannelConfig    0x00000000
        iChannelNames          14 In 1
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           37
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x00c8  1x 200 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay         0x0008
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength       0x0009
        bInCollection           1
        baInterfaceNr(0)        1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      3 MIDI Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      MIDIStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength       0x0041
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               1 Embedded
        bJackID                 1
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               2 External
        bJackID                 2
        iJack                  11 MOTU MIDI In
      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                   0 
      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                  10 MOTU MIDI Out
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 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                 5
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         1
          baAssocJackID( 0)       1
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 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                 5
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         1
          baAssocJackID( 0)       3
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        5
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      4 
      bInterfaceProtocol      1 
      iInterface              0 
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)
Comment 4 Alexander Tsoy 2020-03-30 17:12:56 UTC
So, M2 also needs implicit feedback quirk and implicit feedback support needs to be fixed in the driver. Or we are going to choose what is more important: glitch-free playback or a working duplex in pulseaudio.
Comment 5 Alexander Tsoy 2020-03-30 17:16:30 UTC
And this is basically the same bug as bug #103751
Comment 6 Erwin Burema 2020-03-30 17:34:01 UTC
(In reply to Alexander Tsoy from comment #4)
> So, M2 also needs implicit feedback quirk and implicit feedback support
> needs to be fixed in the driver. Or we are going to choose what is more
> important: glitch-free playback or a working duplex in pulseaudio.

Currently running with the workaround and have heard no glitches yet, is there any particular situation those should be prevalent?

Also as far as I have been able to test Jack is still able to do full duplex audio even with the implicit feedback quirk enabled, as I understand this is because Jack opens the device differently. So if pulse can figure out if this quirk is enabled for the device it should be able to work around it (by opening the device the same way Jack does instead of doing whatever is does now)

Am I wrong here?
Comment 7 Alexander Tsoy 2020-03-30 17:52:50 UTC
(In reply to Erwin Burema from comment #6)
> (In reply to Alexander Tsoy from comment #4)
> > So, M2 also needs implicit feedback quirk and implicit feedback support
> > needs to be fixed in the driver. Or we are going to choose what is more
> > important: glitch-free playback or a working duplex in pulseaudio.
> 
> Currently running with the workaround and have heard no glitches yet, is
> there any particular situation those should be prevalent?

This probably depends on how system clock diverges from the devices' internal clock. If you record a sine wave from M2, you will see periodic artifacts.

> Also as far as I have been able to test Jack is still able to do full duplex
> audio even with the implicit feedback quirk enabled, as I understand this is
> because Jack opens the device differently. So if pulse can figure out if
> this quirk is enabled for the device it should be able to work around it (by
> opening the device the same way Jack does instead of doing whatever is does
> now)

Yes, this depends on the order in which an application configures and starts pcm streams. But it would be better if it gets fixed on the kernel side.
Comment 8 Erwin Burema 2020-03-30 18:14:51 UTC
(In reply to Alexander Tsoy from comment #7)
> (In reply to Erwin Burema from comment #6)
> > (In reply to Alexander Tsoy from comment #4)
> > > So, M2 also needs implicit feedback quirk and implicit feedback support
> > > needs to be fixed in the driver. Or we are going to choose what is more
> > > important: glitch-free playback or a working duplex in pulseaudio.
> > 
> > Currently running with the workaround and have heard no glitches yet, is
> > there any particular situation those should be prevalent?
> 
> This probably depends on how system clock diverges from the devices'
> internal clock. If you record a sine wave from M2, you will see periodic
> artifacts.
> 

Just checked with a 1Khz sine and every few seconds there is a slight plop, it is noticeable with a pure tone but not very noticeable in day to day use.

> > Also as far as I have been able to test Jack is still able to do full
> duplex
> > audio even with the implicit feedback quirk enabled, as I understand this
> is
> > because Jack opens the device differently. So if pulse can figure out if
> > this quirk is enabled for the device it should be able to work around it
> (by
> > opening the device the same way Jack does instead of doing whatever is does
> > now)
> 
> Yes, this depends on the order in which an application configures and starts
> pcm streams. But it would be better if it gets fixed on the kernel side.

That would be preferable and will be able to test patches
Comment 9 Erwin Burema 2020-04-03 13:07:10 UTC
Created attachment 288179 [details]
patch to enable duplex usb audio whith implicit feedback

This patch enables duplex audio for me with implicit feedback and should still fail when:
 1) Endpoint already in use but not used for implicit feedback
 2) Endpoint used as implicit feedback but configured with different parameters

This is based on my understanding that when implicit feedback is used the output stream uses the input stream to check sync (so for 1 output packet 1 input packet), but those packets can still also be used for an actual input audio stream. Of course this only works when settings don't change (settings for both input and output endpoint need to be the same)

The current check is I think overly complicated and duplicates quite a bit of code but not sure what checks should be performed to make sure input and output stay the same.
Comment 10 Takashi Iwai 2020-05-07 15:13:10 UTC
The patch looks good and feasible, could you submit it alsa-devel ML?
Maybe better to brush up the coding style issues via checkpatch.pl before submitting, though.
Comment 11 Jelmer Vernooij 2020-05-07 15:32:34 UTC
FWIW I've been running with the patch for the last week or so with a M2 and various other audio devices, with no issues encountered.
Comment 12 Erwin Burema 2020-05-07 15:35:08 UTC
Will clean up the patch and send it to alsa-devel coming weekend
Comment 13 Luke Tidd 2020-06-15 19:33:05 UTC
Thanks all, especially Erwin for the work on this. I am also running a patched 5.6.12 and my MOTU M2 is functional.
Comment 14 Alexander Tsoy 2020-06-16 08:48:28 UTC
Well, AFAIS, it actually doesn't fully fix the issue. If you, for example, start/stop capture stream while playback stream is active, then playback will be interrupted. We really need to always start and stop both endpoints at the same time with some refcounting of substreams.
Comment 15 Takashi Iwai 2020-06-16 10:52:50 UTC
(In reply to Alexander Tsoy from comment #14)
> Well, AFAIS, it actually doesn't fully fix the issue. If you, for example,
> start/stop capture stream while playback stream is active, then playback
> will be interrupted.

Does it even after applying the recent full-duplex support on 5.8?  The endpoint is managed with refcount, so the sync EP should be still running after the capture stream gets closed before the playback, I thought.
Comment 16 Alexander Tsoy 2020-06-16 11:42:54 UTC
Hmm.. I need to retest with the more recent kernel.
Comment 17 Takashi Iwai 2020-06-16 12:07:36 UTC
There might be something overlooked, of course :)
e.g. I didn't track fully how the sync ep handling in snd_usb_handle_sync_urb() can be influenced.

And there is one potential use-after-free, which I already showed a fix patch in the past.  I'll submit the oneliner soon later.
Comment 18 Erwin Burema 2020-06-16 17:30:45 UTC
(In reply to Alexander Tsoy from comment #16)
> Hmm.. I need to retest with the more recent kernel.

If you can find something I'll see if I can get some kind of fix for it during the weekend.

Note You need to log in before you can comment on or make changes to this bug.