Skip to contentSkip to conversation

Ignored USB-audio implicit feedback in kernel 5.8rc3

DISCUSSION Pavel Hofman 3 participants 9 messages Jun 29, 2020 – Jul 7, 2020

lore
Share & tools
lore
#0 lore raw

Hi,

Audio analyzer RTX6001 (XMOS-based) is using implicit feedback, yet the feedback is not used by the latest kernel 5.8 rc3 (i.e. already with the latest implicit-feedback patches).

Two analyzers on two different PCs are getting clicks in duplex-mode loobpack, one every 10 secs, the other one every 50 secs.

While running aplay/arecord loopback I captured USB packets with tcpdump/tshark. The dump contained 931484 IN packets with 48bytes payload, and 684 IN packets with 40 bytes payload. Packet interval 125us (bInterval = 1), 32bits, 2ch => precise samplerate 47,994.1298Hz. Clearly the incoming stream works OK. Yet stream0 file states for Capture:

Momentary freq = 48000 Hz (0x6.0000)

But ONLY 48bytes packets were sent by the host in OUT packets, i.e. exactly 48kHz output rate. 6 frames OUT/IN difference per second, the incoming FIFO in the device overflows after several seconds.

Please may I ask for help with making the driver respect the implicit feedback stream?

Best regards,

Pavel.

5.8.0-050800-generic #202006282330 SMP Sun Jun 28 23:35:41 UTC 2020 x86_64 GNU/Linux

cat /proc/asound/card4/stream0
RTX A/S RTX6001 USB Audio 2.0 at usb-0000:00:13.2-4, high speed : USB Audio

Playback:
Status: Running
Interface = 1
Altset = 1
Packet Size = 72
Momentary freq = 48000 Hz (0x6.0000)
Interface 1
Altset 1
Format: S32_LE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
Bits: 32
Channel map: FL FR
Interface 1
Altset 2
Format: S32_LE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Interface 1
Altset 3
Format: S16_LE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
Bits: 16
Channel map: FL FR

Capture:
Status: Stop
Interface 2
Altset 1
Format: S32_LE
Channels: 2
Endpoint: 1 IN (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
Bits: 32
Channel map: FL FR
Interface 2
Altset 2
Format: S32_LE
Channels: 2
Endpoint: 1 IN (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Interface 2
Altset 3
Format: S16_LE
Channels: 2
Endpoint: 1 IN (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
Bits: 16
Channel map: FL FR

lsusb:
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 002 Device 003: ID 0d9a:00df RTX AS RTX6001 USB Audio 2.0 <----
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 008: ID 2047:0301 Texas Instruments Arduino Micro
Bus 004 Device 007: ID 18f8:0f97 [Maxxter] Elo TouchSystems 2216 AccuTouch® USB Touchmonitor Interface Bus 004 Device 006: ID 413c:2001 Dell Computer Corp. Keyboard HID Support
Bus 004 Device 005: ID 413c:1001 Dell Computer Corp. Keyboard Hub
Bus 004 Device 004: ID 0bd9:0001 Liberty Instruments, Inc. Liberty Praxis AudPod 1.1 Bus 004 Device 003: ID 2341:8037 Arduino SA Arduino Micro
Bus 004 Device 002: ID 04e7:0050 Elo TouchSystems 2216 AccuTouch® Touchmonitor Interface Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 002: ID 18a5:0422 Verbatim, Ltd Portable SSD
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsusb -v see the attachment

Bus 002 Device 003: ID 0d9a:00df RTX AS RTX6001 USB Audio 2.0 Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x0d9a RTX AS
idProduct 0x00df
bcdDevice 1.19

  iManufacturer           1 
  iProduct                3 
  iSerial                 2 
  bNumConfigurations      2

Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x01c5
bNumInterfaces 5
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 0mA
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 3
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 41
bmAttributes 3 Internal programmable clock
bmControls 0x07
Clock Frequency Control (read/write) Clock Validity Control (read-only)
bAssocTerminal 0
iClockSource 9
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 11 (CLOCK_SELECTOR)
bClockID 40
bNrInPins 1
baCSourceID(0) 41
bmControls 0x03
Clock Selector Control (read/write)
iClockSelector 8
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 11
bmControls 0x0000
iTerminal 6
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 20
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 2
bCSourceID 40
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Microphone
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 13
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 22
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 2
bCSourceID 40
bmControls 0x0000
iTerminal 7
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 11
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 32
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0308 1x 776 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 1
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 11
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 0x0308 1x 776 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 1
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 11
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 2
bBitResolution 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0184 1x 388 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
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 13
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 32
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 0x0308 1x 776 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 2
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 13
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 0x0308 1x 776 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 3
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 13
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 2
bBitResolution 16
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 0x0308 1x 776 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 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 1
iInterface 10
Device Firmware Upgrade Interface Descriptor:
bLength 9
bDescriptorType 33
bmAttributes 7
Will Not Detach
Manifestation Tolerant
Upload Supported
Download Supported
wDetachTimeout 250 milliseconds
wTransferSize 64 bytes
bcdDFUVersion 1.10
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 202
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 8
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 8
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x01c5
bNumInterfaces 5
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 0mA
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 3
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 41
bmAttributes 3 Internal programmable clock
bmControls 0x07
Clock Frequency Control (read/write) Clock Validity Control (read-only)
bAssocTerminal 0
iClockSource 9
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 11 (CLOCK_SELECTOR)
bClockID 40
bNrInPins 1
baCSourceID(0) 41
bmControls 0x03
Clock Selector Control (read/write)
iClockSelector 8
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 11
bmControls 0x0000
iTerminal 6
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 20
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 2
bCSourceID 40
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Microphone
bAssocTerminal 0
bCSourceID 40
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 13
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 22
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 2
bCSourceID 40
bmControls 0x0000
iTerminal 7
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 11
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 32
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0308 1x 776 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 1
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 11
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 0x0308 1x 776 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 1
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 4
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 11
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 2
bBitResolution 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0184 1x 388 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
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 13
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 32
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 0x0308 1x 776 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 2
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 13
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 0x0308 1x 776 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 3
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 5
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 13
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 2
bBitResolution 16
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 0x0308 1x 776 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 254 Application Specific Interface
bInterfaceSubClass 1 Device Firmware Update
bInterfaceProtocol 1
iInterface 10
Device Firmware Upgrade Interface Descriptor:
bLength 9
bDescriptorType 33
bmAttributes 7
Will Not Detach
Manifestation Tolerant
Upload Supported
Download Supported
wDetachTimeout 250 milliseconds
wTransferSize 64 bytes
bcdDFUVersion 1.10
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 202
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 8
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 8

#1 lore raw

Dne 29. 06. 20 v 13:28 Pavel Hofman napsal(a):

Quoted 8 lines

Audio analyzer RTX6001 (XMOS-based) is using implicit feedback, yet the feedback is not used by the latest kernel 5.8 rc3 (i.e. already with the latest implicit-feedback patches).

Two analyzers on two different PCs are getting clicks in duplex-mode loobpack, one every 10 secs, the other one every 50 secs.

I am sorry, correct stream0 for duplex operation (kernel 5.4, the same behaviour as in 5.8-rc3):

RTX A/S RTX6001 USB Audio 2.0 at usb-0000:00:13.2-4, high speed : USB Audio

Playback:
Status: Running
Interface = 1
Altset = 1
Packet Size = 72
Momentary freq = 48000 Hz (0x6.0000)
Interface 1

    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 32
  Interface 1
    Altset 2
    Format: S32_LE
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
  Interface 1
    Altset 3
    Format: S16_LE
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 16

Capture:
Status: Running
Interface = 2
Altset = 1
Packet Size = 72
Momentary freq = 48000 Hz (0x6.0000)
Interface 2

    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 1 IN (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 32
  Interface 2
    Altset 2
    Format: S32_LE
    Channels: 2
    Endpoint: 1 IN (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 24
  Interface 2
    Altset 3
    Format: S16_LE
    Channels: 2
    Endpoint: 1 IN (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000
    Data packet interval: 125 us
    Bits: 16

Thanks a lot.

Pavel.

#2 lore raw

Dne 29. 06. 20 v 17:08 Pavel Hofman napsal(a):

Quoted 9 lines

Dne 29. 06. 20 v 13:28 Pavel Hofman napsal(a):

Quoted 8 lines

Audio analyzer RTX6001 (XMOS-based) is using implicit feedback, yet the feedback is not used by the latest kernel 5.8 rc3 (i.e. already with the latest implicit-feedback patches).

Two analyzers on two different PCs are getting clicks in duplex-mode loobpack, one every 10 secs, the other one every 50 secs.

I am very sure the problem is identical to that for MOTU M2/4, Solid State Logic SSL2+, Fractal Audio Axe-Fx III etc.
https://github.com/torvalds/linux/commit/e7585db1b0b5b4e4eb1967bb1472df308f7ffcbf
. I will try the simple quirk, IMO it will work OK. BTW if I understand correctly all these devices use the XMOS.

However, I would like to ask, why a quirk for these devices is required. The comment explanation in this interesting patch
https://lore.kernel.org/patchwork/patch/1174179/ talks about the same EP numbers, but in the different direction. 0x01 EP OUT + 0x81 EP IN implicit feedback data. All the devices mentioned above have this numbering, just the EP IN is in a different interface than the EP OUT. But please are there actually any duplex implicit feedback devices having EP OUT and implicit-feedback EP IN in the same interface? The explicit feedback EP IN is clear, they are in the same interface. E-MU 0404 USB has EP OUT + EP IN explicit feedback in interface 1, together, EP IN implicit feedback data in interface 2. My other soundcards, adaptive OUT and async IN again each in a different interface (though there is no feedback to solve).

Please is the requirement that EP OUT + EP IN implicit feedback data must be in the same interface really necessary? If such a requirement was dropped, IMO many devices could be removed from the existing set_sync_ep_implicit_fb_quirk and many devices would work out of the box, as they require no other quirk (unlike the MOTUs, but that's a different issue).

Thank you very much for comments. Very likely I am missing something important, I just do not see what :-)

Best regards,

Pavel.

#3 lore raw

Dne 02. 07. 20 v 13:28 Pavel Hofman napsal(a):

Quoted 7 lines

Please is the requirement that EP OUT + EP IN implicit feedback data must be in the same interface really necessary? If such a requirement was dropped, IMO many devices could be removed from the existing set_sync_ep_implicit_fb_quirk and many devices would work out of the box,

I am still thinking about the single-interface requirement. If both endpoints were to be part of a single interface, could they use different altsettings for different sample lengths for capture and playback? E.g. to save USB bandwidth when the capture is used only for implicit feedback - capturing at 16bits, playback at 32bits.

In the quirked XMOS devices the common clock for both directions is defined by the clock feature, the altsettings for each direction (in separate interfaces) are used for setting sample length.

Thank you very much for any insight into the issue. IMO not having to add quirks before a device starts working would be advantageous for all involved.

Best regards,

Pavel.

#4 lore raw
Quoted 17 lines · Pavel Hofman

Dne 02. 07. 20 v 13:28 Pavel Hofman napsal(a):

Quoted 7 lines

Please is the requirement that EP OUT + EP IN implicit feedback data must be in the same interface really necessary? If such a requirement was dropped, IMO many devices could be removed from the existing set_sync_ep_implicit_fb_quirk and many devices would work out of the box,

I am still thinking about the single-interface requirement. If both endpoints were to be part of a single interface, could they use different altsettings for different sample lengths for capture and playback? E.g. to save USB bandwidth when the capture is used only for implicit feedback - capturing at 16bits, playback at 32bits.

Quoted 7 lines

In the quirked XMOS devices the common clock for both directions is defined by the clock feature, the altsettings for each direction (in separate interfaces) are used for setting sample length.

Thank you very much for any insight into the issue. IMO not having to add quirks before a device starts working would be advantageous for all involved.

Could you check for-linus branch of my sound git tree?
Just to be sure whether you're hitting the issue that has been already addressed.

thanks,

Takashi

#5 lore raw

Hi Takashi,

Dne 07. 07. 20 v 11:40 Takashi Iwai napsal(a):

Quoted 19 lines
Quoted 17 lines · Pavel Hofman

Dne 02. 07. 20 v 13:28 Pavel Hofman napsal(a):

Quoted 7 lines

Please is the requirement that EP OUT + EP IN implicit feedback data must be in the same interface really necessary? If such a requirement was dropped, IMO many devices could be removed from the existing set_sync_ep_implicit_fb_quirk and many devices would work out of the box,

I am still thinking about the single-interface requirement. If both endpoints were to be part of a single interface, could they use different altsettings for different sample lengths for capture and playback? E.g. to save USB bandwidth when the capture is used only for implicit feedback - capturing at 16bits, playback at 32bits.

Quoted 8 lines
Quoted 3 lines

In the quirked XMOS devices the common clock for both directions is defined by the clock feature, the altsettings for each direction (in separate interfaces) are used for setting sample length.

Could you check for-linus branch of my sound git tree?
Just to be sure whether you're hitting the issue that has been already addressed.

I developed the RTX6001 patch on 5.8-rc3 kernel, and commits since that tag in https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/log/?h=for-linus do not seem to address the issue.

I think the generic code searching for the implicit-feedback endpoint works only on the current interface (alts) https://github.com/tiwai/sound/blob/master/sound/usb/pcm.c#L491

I do not know if searching for IN endpoints with the same number and USB_ENDPOINT_USAGE_IMPLICIT_FB mask in other interfaces is correct. But it seems to me it would yield correct results for a number of existing quirks in set_sync_ep_implicit_fb_quirk (typically those setting ep=0x81).

Thanks a lot,

Pavel.

#6 lore raw
Quoted 41 lines · Pavel Hofman

Hi Takashi,

Dne 07. 07. 20 v 11:40 Takashi Iwai napsal(a):

Quoted 19 lines
Quoted 17 lines · Pavel Hofman

Dne 02. 07. 20 v 13:28 Pavel Hofman napsal(a):

Quoted 7 lines

Please is the requirement that EP OUT + EP IN implicit feedback data must be in the same interface really necessary? If such a requirement was dropped, IMO many devices could be removed from the existing set_sync_ep_implicit_fb_quirk and many devices would work out of the box,

I am still thinking about the single-interface requirement. If both endpoints were to be part of a single interface, could they use different altsettings for different sample lengths for capture and playback? E.g. to save USB bandwidth when the capture is used only for implicit feedback - capturing at 16bits, playback at 32bits.

Quoted 8 lines
Quoted 3 lines

In the quirked XMOS devices the common clock for both directions is defined by the clock feature, the altsettings for each direction (in separate interfaces) are used for setting sample length.

Could you check for-linus branch of my sound git tree?
Just to be sure whether you're hitting the issue that has been already addressed.

I developed the RTX6001 patch on 5.8-rc3 kernel, and commits since that tag in
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/log/?h=for-linus
do not seem to address the issue.

I think the generic code searching for the implicit-feedback endpoint works only on the current interface (alts)
https://github.com/tiwai/sound/blob/master/sound/usb/pcm.c#L491

Quoted 5 lines

I do not know if searching for IN endpoints with the same number and USB_ENDPOINT_USAGE_IMPLICIT_FB mask in other interfaces is correct. But it seems to me it would yield correct results for a number of existing quirks in set_sync_ep_implicit_fb_quirk (typically those setting ep=0x81).

Yeah I found your patch later. Now it's in for-linus branch, too.

Takashi

#7 lore raw
In reply to Pavel Hofman

В Чт, 02/07/2020 в 13:28 +0200, Pavel Hofman пишет:

Quoted 39 lines

Dne 29. 06. 20 v 17:08 Pavel Hofman napsal(a):

Quoted 11 lines

Dne 29. 06. 20 v 13:28 Pavel Hofman napsal(a):

Quoted 10 lines

Audio analyzer RTX6001 (XMOS-based) is using implicit feedback, yet the
feedback is not used by the latest kernel 5.8 rc3 (i.e. already with the
latest implicit-feedback patches).

Two analyzers on two different PCs are getting clicks in duplex- mode
loobpack, one every 10 secs, the other one every 50 secs.

I am very sure the problem is identical to that for MOTU M2/4, Solid State Logic SSL2+, Fractal Audio Axe-Fx III etc.
https://github.com/torvalds/linux/commit/e7585db1b0b5b4e4eb1967bb1472df308f7ffcbf
. I will try the simple quirk, IMO it will work OK. BTW if I understand
correctly all these devices use the XMOS.

However, I would like to ask, why a quirk for these devices is required.
The comment explanation in this interesting patch
https://lore.kernel.org/patchwork/patch/1174179/ talks about the same EP
numbers, but in the different direction. 0x01 EP OUT + 0x81 EP IN implicit feedback data. All the devices mentioned above have this numbering, just the EP IN is in a different interface than the EP OUT.
But please are there actually any duplex implicit feedback devices having EP OUT and implicit-feedback EP IN in the same interface? The explicit feedback EP IN is clear, they are in the same interface. E- MU
0404 USB has EP OUT + EP IN explicit feedback in interface 1, together,
EP IN implicit feedback data in interface 2. My other soundcards, adaptive OUT and async IN again each in a different interface (though there is no feedback to solve).

Quoted 6 lines

Please is the requirement that EP OUT + EP IN implicit feedback data must be in the same interface really necessary? If such a requirement was dropped, IMO many devices could be removed from the existing set_sync_ep_implicit_fb_quirk and many devices would work out of the box, as they require no other quirk (unlike the MOTUs, but that's a different issue).

USB Audio Class specs are pretty clear about it: only one isochronous endpoint is allowed per interface. And it can be accompanied by the *explicit* feedback endpoint.

I have patches that implement autodetection of implicit feedback, but I need to clean them up and be careful not to break Scarlett 18i8/18i20 3rd Gen (these devices have 3 altsettings per interface and probably require some additional sample rates filtering, so that each sample rate uniquely match one single altsetting).

#8 lore raw

Dne 07. 07. 20 v 12:34 Alexander Tsoy napsal(a):

Quoted 6 lines

В Чт, 02/07/2020 в 13:28 +0200, Pavel Hofman пишет:

USB Audio Class specs are pretty clear about it: only one isochronous endpoint is allowed per interface. And it can be accompanied by the *explicit* feedback endpoint.

Quoted 6 lines

I have patches that implement autodetection of implicit feedback, but I need to clean them up and be careful not to break Scarlett 18i8/18i20 3rd Gen (these devices have 3 altsettings per interface and probably require some additional sample rates filtering, so that each sample rate uniquely match one single altsetting).

Alexander, thanks for the clarification. If I understand correctly the existing single-interface condition is incorrect and no implicit-feedback device can work without a quirk now.

Thanks for your WIP patches, very much appreciated.

Best regards,

Pavel.