Skip to contentSkip to conversation

Steinberg UR22 Crackling and Clicks

DISCUSSION [email protected] 2 participants 16 messages Dec 8, 2020 – Dec 9, 2020 Sound

lore
Share & tools
lore
#0 lore raw

Hi,

I am using a Steinberg UR22 audio interface. Since installing Ubuntu 20.04 on my workstation I have slight crackling in audio playback. It doesn't matter if the audio gets routed through pulse, jack or played straight to alsa. When running jack, the crackling is not showing any xruns. It's not possible to get any glitch-free playback in the system. The onboard intel audio works fine.

My system:

alsa info: alsa-project.org/db/?f=8b821b17a8c83fa5db866f34a5b4dfe74d640a32

Processor: Intel Xeon X5687

$ uname -a

Linux WorkStation-T5500 5.4.0-56-lowlatency #62-Ubuntu SMP PREEMPT Mon Nov 23 20:19:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I have tried:

5.4.0-56-generic and -lowlatency

5.8.0-31-generic and -lowlatency

setting cpu governor to performance

using nouveau driver over nvidia

When playing a file with aplay like this:

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
aplay -D plughw:CARD=UR22 ./test.wav

slight crackling can be heard every 5-10 seconds. It also appears, that the clicks heard are not always on both channels, sometimes the left stereo channel clicks, sometimes the right, sometimes both.

Plugging the Interface into different USB-ports doesn't help. The only external devices connected via USB are my mouse and my keyboard. On Wndows the same setup on the same machine works fine.

To make things even weirder, using the same audio interface on my Thinkpad x220 (Core i5-2540M) with ubuntu 20.04 and 5.4.0.56-lowlatency does not show this problem.

Running dmesg seems to show nothing audio driver related after:

[ 22.425520] usbcore: registered new interface driver snd-usb-audio

I have found a similar issue showcasing the problem on manjaro with a differend soundcard. Therefore I suspect the problem is caused by ALSA interacting with the hardware.

https://forum.manjaro.org/t/pops-clicks-on-audio-interface/40129

Here is another occurence on ubuntu on yet another audio interface.

https://askubuntu.com/questions/1256787/ubuntu-2004-novation-xiosynth-external-usb-audio-interface-producing-popping

If I can supply more information I'm happy to help. I couldn't find a similar issue in this mailing list, so if this is already fixed I apologize in advance.

Kilian

#1 lore raw
Quoted 76 lines · On Tue, 08 Dec 2020 11:15:08 +0100, [email protected] wrote:

Hi,

I am using a Steinberg UR22 audio interface. Since installing Ubuntu 20.04 on my workstation I have slight crackling in audio playback. It doesn't matter if the audio gets routed through pulse, jack or played straight to alsa. When running jack, the crackling is not showing any xruns. It's not possible to get any glitch-free playback in the system. The onboard intel audio works fine.

My system:

alsa info:
alsa-project.org/db/?f=8b821b17a8c83fa5db866f34a5b4dfe74d640a32

Processor: Intel Xeon X5687

$ uname -a

Linux WorkStation-T5500 5.4.0-56-lowlatency #62-Ubuntu SMP PREEMPT Mon

Nov 23 20:19:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I have tried:

5.4.0-56-generic and -lowlatency

5.8.0-31-generic and -lowlatency

setting cpu governor to performance

using nouveau driver over nvidia

When playing a file with aplay like this:

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
aplay -D plughw:CARD=UR22 ./test.wav

slight crackling can be heard every 5-10 seconds. It also appears, that the clicks heard are not always on both channels, sometimes the left stereo channel clicks, sometimes the right, sometimes both.

Plugging the Interface into different USB-ports doesn't help. The only external devices connected via USB are my mouse and my keyboard. On Wndows the same setup on the same machine works fine.

To make things even weirder, using the same audio interface on my Thinkpad x220 (Core i5-2540M) with ubuntu 20.04 and 5.4.0.56-lowlatency does not show this problem.

Running dmesg seems to show nothing audio driver related after:

[ 22.425520] usbcore: registered new interface driver snd-usb-audio

I have found a similar issue showcasing the problem on manjaro with a differend soundcard. Therefore I suspect the problem is caused by ALSA interacting with the hardware.

https://forum.manjaro.org/t/pops-clicks-on-audio-interface/40129

Here is another occurence on ubuntu on yet another audio interface.

Quoted 7 lines

https://askubuntu.com/questions/1256787/ubuntu-2004-novation-xiosynth-external-usb-audio-interface-producing-popping

If I can supply more information I'm happy to help. I couldn't find a similar issue in this mailing list, so if this is already fixed I apologize in advance.

It's likely the issues with the implicit feedback.

The latest development tree (either linux-next tree or topic/usb-audio-refactoring branch of my sound.git tree) contains the improvements of the implicit feedback mode.

Takashi

#2 lore raw
Quoted 8 lines

It's likely the issues with the implicit feedback.

The latest development tree (either linux-next tree or topic/usb-audio-refactoring branch of my sound.git tree) contains the improvements of the implicit feedback mode.

Takashi

Here is the cropped lsusb -v output:
I also have dmesg output with debug boot flag enabled.

Bus 001 Device 003: ID 0499:1509 Yamaha Corp. Steinberg UR22 Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 0
bDeviceProtocol 255
bMaxPacketSize0 64
idVendor 0x0499 Yamaha Corp.
idProduct 0x1509
bcdDevice 1.00

  iManufacturer           1
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x01ba
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  0a 24 01 00 01 34 00 02 01 02
      ** UNRECOGNIZED:  0c 24 02 01 01 01 00 02 03 00 00 00
      ** UNRECOGNIZED:  09 24 03 02 01 03 00 01 00
      ** UNRECOGNIZED:  0c 24 02 03 03 06 00 02 03 00 00 00
      ** UNRECOGNIZED:  09 24 03 04 01 01 00 03 00
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 01 01 01 00
      ** UNRECOGNIZED:  0e 24 02 01 02 03 18 02 44 ac 00 80 bb 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x07  EP 7 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x002a  1x 42 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 01 01 01 00
      ** UNRECOGNIZED:  0e 24 02 01 02 03 18 02 88 58 01 00 77 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x07  EP 7 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x004e  1x 78 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 01 01 01 00
      ** UNRECOGNIZED:  0e 24 02 01 02 03 18 02 10 b1 02 00 ee 02
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x07  EP 7 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0096  1x 150 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 04 01 01 00
      ** UNRECOGNIZED:  0e 24 02 01 02 03 18 02 44 ac 00 80 bb 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x002a  1x 42 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 04 01 01 00
      ** UNRECOGNIZED:  0e 24 02 01 02 03 18 02 88 58 01 00 77 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x004e  1x 78 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 04 01 01 00
      ** UNRECOGNIZED:  0e 24 02 01 02 03 18 02 10 b1 02 00 ee 02
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0096  1x 150 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      3
      bInterfaceProtocol    255
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 00 01 24 00
      ** UNRECOGNIZED:  06 24 02 02 01 00
      ** UNRECOGNIZED:  09 24 03 02 01 01 01 01 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        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
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 00 01 24 00
      ** UNRECOGNIZED:  06 24 02 02 01 00
      ** UNRECOGNIZED:  09 24 03 02 01 01 01 01 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00

  bDeviceClass            9 Hub
  bDeviceSubClass         0
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            5.10
  iManufacturer           3
  iProduct                2
  iSerial                 1
  bNumConfigurations      1

Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0019
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12

#3 lore raw
Quoted 8 lines · On Tue, 08 Dec 2020 15:50:28 +0100, [email protected] wrote:
Quoted 8 lines

It's likely the issues with the implicit feedback.

The latest development tree (either linux-next tree or topic/usb-audio-refactoring branch of my sound.git tree) contains the improvements of the implicit feedback mode.

Quoted 6 lines
Quoted 1 line

Takashi

Here is the cropped lsusb -v output:
I also have dmesg output with debug boot flag enabled.

Bus 001 Device 003: ID 0499:1509 Yamaha Corp. Steinberg UR22

OK, so it's a different device than UR22C.

Try to pass the module option quirk_alias=04991509:0499172f to snd-usb-audio. This will make the device compatible with UR22C.

Takashi

#4 lore raw

Am 08.12.2020 15:57 schrieb Takashi Iwai:

Quoted 17 lines
Quoted 8 lines · On Tue, 08 Dec 2020 15:50:28 +0100, [email protected] wrote:
Quoted 8 lines

It's likely the issues with the implicit feedback.

The latest development tree (either linux-next tree or topic/usb-audio-refactoring branch of my sound.git tree) contains the improvements of the implicit feedback mode.

Quoted 6 lines
Quoted 1 line

Takashi

Here is the cropped lsusb -v output:
I also have dmesg output with debug boot flag enabled.

Bus 001 Device 003: ID 0499:1509 Yamaha Corp. Steinberg UR22

Quoted 7 lines

OK, so it's a different device than UR22C.

Try to pass the module option quirk_alias=04991509:0499172f to snd-usb-audio. This will make the device compatible with UR22C.

Takashi

I removed snd_usb_audio and reloaded it with modprobe with the parameters.

$ modprobe snd_usb_audio quirk_alias=04991509:0499172f

When I try to play a file now this happens:

$ aplay -D plughw:CARD=UR22 ./file.wav
Playing WAVE './file.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1407: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (125011 125012)
PERIOD_SIZE: 5513
PERIOD_BYTES: 22052
PERIODS: (3 4)
BUFFER_TIME: 500000
BUFFER_SIZE: 22050
BUFFER_BYTES: 88200
TICK_TIME: 0
#5 lore raw
Quoted 31 lines · On Tue, 08 Dec 2020 20:41:33 +0100, [email protected] wrote:

Am 08.12.2020 15:57 schrieb Takashi Iwai:

Quoted 17 lines
Quoted 8 lines · On Tue, 08 Dec 2020 15:50:28 +0100, [email protected] wrote:
Quoted 8 lines

It's likely the issues with the implicit feedback.

The latest development tree (either linux-next tree or topic/usb-audio-refactoring branch of my sound.git tree) contains the improvements of the implicit feedback mode.

Quoted 6 lines
Quoted 1 line

Takashi

Here is the cropped lsusb -v output:
I also have dmesg output with debug boot flag enabled.

Bus 001 Device 003: ID 0499:1509 Yamaha Corp. Steinberg UR22

Quoted 7 lines

OK, so it's a different device than UR22C.

Try to pass the module option quirk_alias=04991509:0499172f to snd-usb-audio. This will make the device compatible with UR22C.

Takashi

I removed snd_usb_audio and reloaded it with modprobe with the parameters.

Quoted 7 lines
$ modprobe snd_usb_audio quirk_alias=04991509:0499172f

When I try to play a file now this happens:

$ aplay -D plughw:CARD=UR22 ./file.wav
Playing WAVE './file.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Stereo
aplay: set_params:1407: Unable to install hw params:

It's a known side-effect of the implicit feedback mode, and the latest patchset I mentioned earlier addresses the issue.

Takashi

#6 lore raw

Am 08.12.2020 21:23 schrieb Takashi Iwai:

Quoted 23 lines
Quoted 14 lines · On Tue, 08 Dec 2020 20:41:33 +0100, [email protected] wrote:

Am 08.12.2020 15:57 schrieb Takashi Iwai:

Quoted 10 lines
Quoted 8 lines · On Tue, 08 Dec 2020 15:50:28 +0100, [email protected] wrote:
Quoted 8 lines

It's likely the issues with the implicit feedback.

The latest development tree (either linux-next tree or topic/usb-audio-refactoring branch of my sound.git tree) contains the improvements of the implicit feedback mode.

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Takashi

When I try to play a file now this happens:

$ aplay -D plughw:CARD=UR22 ./file.wav
Playing WAVE './file.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Stereo
aplay: set_params:1407: Unable to install hw params:
Quoted 5 lines

It's a known side-effect of the implicit feedback mode, and the latest patchset I mentioned earlier addresses the issue.

Takashi

I'm already running the kernel built from the linux-next tree...
I built next-20201208 from git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Is there another patch set that I'm missing?

#7 lore raw
Quoted 31 lines · On Tue, 08 Dec 2020 21:53:14 +0100, [email protected] wrote:

Am 08.12.2020 21:23 schrieb Takashi Iwai:

Quoted 27 lines
Quoted 14 lines · On Tue, 08 Dec 2020 20:41:33 +0100, [email protected] wrote:

Am 08.12.2020 15:57 schrieb Takashi Iwai:

Quoted 10 lines
Quoted 8 lines · On Tue, 08 Dec 2020 15:50:28 +0100, [email protected] wrote:
Quoted 8 lines

It's likely the issues with the implicit feedback.

The latest development tree (either linux-next tree or topic/usb-audio-refactoring branch of my sound.git tree) contains the improvements of the implicit feedback mode.

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Takashi

When I try to play a file now this happens:

$ aplay -D plughw:CARD=UR22 ./file.wav
Playing WAVE './file.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Stereo
aplay: set_params:1407: Unable to install hw params:

It's a known side-effect of the implicit feedback mode, and the latest patchset I mentioned earlier addresses the issue.

Quoted 6 lines
Quoted 1 line

Takashi

I'm already running the kernel built from the linux-next tree... I built next-20201208 from
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Is there another patch set that I'm missing?

Hm, strange.

Please check the contents of /proc/asound/card*/stream* file. With the latest patches and the implicit feedback mode, you should see the lines like "Sync Endpoint: 0x...." and "Implicit Feedback Mode: yes".

Takashi

#8 lore raw
Quoted 25 lines
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

It's likely the issues with the implicit feedback.

The latest development tree (either linux-next tree or topic/usb-audio-refactoring branch of my sound.git tree) contains the improvements of the implicit feedback mode.

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Takashi

When I try to play a file now this happens:

$ aplay -D plughw:CARD=UR22 ./file.wav
Playing WAVE './file.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Stereo
aplay: set_params:1407: Unable to install hw params:

It's a known side-effect of the implicit feedback mode, and the latest patchset I mentioned earlier addresses the issue.

Quoted 6 lines
Quoted 1 line

Takashi

I'm already running the kernel built from the linux-next tree... I built next-20201208 from
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Is there another patch set that I'm missing?

Quoted 8 lines

Hm, strange.

Please check the contents of /proc/asound/card*/stream* file. With the latest patches and the implicit feedback mode, you should see the lines like "Sync Endpoint: 0x...." and "Implicit Feedback Mode: yes".

Takashi

Yes, I see this:

Yamaha Corporation Steinberg UR22 at usb-0000:00:1a.7-3, high speed : USB Audio

Playback:
Status: Stop
Interface 1
Altset 1
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 44100, 48000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes
Interface 1
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 88200, 96000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes
Interface 1
Altset 3
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 176400, 192000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes

Capture:
Status: Stop
Interface 2

    Altset 1
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 44100, 48000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
  Interface 2
    Altset 2
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 88200, 96000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
  Interface 2
    Altset 3
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
#9 lore raw
Quoted 103 lines · On Tue, 08 Dec 2020 23:14:41 +0100, [email protected] wrote:
Quoted 26 lines
Quoted 19 lines
Quoted 19 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

It's likely the issues with the implicit feedback.

The latest development tree (either linux-next tree or topic/usb-audio-refactoring branch of my sound.git tree) contains the improvements of the implicit feedback mode.

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Takashi

When I try to play a file now this happens:

$ aplay -D plughw:CARD=UR22 ./file.wav
Playing WAVE './file.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Stereo
aplay: set_params:1407: Unable to install hw params:

It's a known side-effect of the implicit feedback mode, and the latest patchset I mentioned earlier addresses the issue.

Quoted 6 lines
Quoted 1 line

Takashi

I'm already running the kernel built from the linux-next tree... I built next-20201208 from
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Is there another patch set that I'm missing?

Quoted 8 lines

Hm, strange.

Please check the contents of /proc/asound/card*/stream* file. With the latest patches and the implicit feedback mode, you should see the lines like "Sync Endpoint: 0x...." and "Implicit Feedback Mode: yes".

Takashi

Yes, I see this:

Yamaha Corporation Steinberg UR22 at usb-0000:00:1a.7-3, high speed :
USB Audio

Playback:
Status: Stop
Interface 1
Altset 1
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 44100, 48000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes
Interface 1
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 88200, 96000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes
Interface 1
Altset 3
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 176400, 192000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes

Capture:
Status: Stop
Interface 2

    Altset 1
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 44100, 48000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
  Interface 2
    Altset 2
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 88200, 96000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR

Interface 2

Quoted 8 lines
    Altset 3
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR

OK, then it means that your device isn't compatible with UR22C. It has a different endpoint assignment.

What happens if you run this kernel without quirk_alias option? Is the implicit feedback still set?

Takashi

#10 lore raw
Quoted 111 lines
Quoted 102 lines
Quoted 25 lines
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

It's likely the issues with the implicit feedback.

The latest development tree (either linux-next tree or topic/usb-audio-refactoring branch of my sound.git tree) contains the improvements of the implicit feedback mode.

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Takashi

When I try to play a file now this happens:

$ aplay -D plughw:CARD=UR22 ./file.wav
Playing WAVE './file.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Stereo
aplay: set_params:1407: Unable to install hw params:

It's a known side-effect of the implicit feedback mode, and the latest patchset I mentioned earlier addresses the issue.

Quoted 6 lines
Quoted 1 line

Takashi

I'm already running the kernel built from the linux-next tree... I built next-20201208 from
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Is there another patch set that I'm missing?

Quoted 8 lines

Hm, strange.

Please check the contents of /proc/asound/card*/stream* file. With the latest patches and the implicit feedback mode, you should see the lines like "Sync Endpoint: 0x...." and "Implicit Feedback Mode: yes".

Takashi

Yes, I see this:

Yamaha Corporation Steinberg UR22 at usb-0000:00:1a.7-3, high speed :
USB Audio

Playback:
Status: Stop
Interface 1
Altset 1
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 44100, 48000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes
Interface 1
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 88200, 96000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes
Interface 1
Altset 3
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 176400, 192000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes

Capture:
Status: Stop
Interface 2

    Altset 1
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 44100, 48000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
  Interface 2
    Altset 2
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 88200, 96000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR

Interface 2

Quoted 8 lines
    Altset 3
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
Quoted 8 lines

OK, then it means that your device isn't compatible with UR22C. It has a different endpoint assignment.

What happens if you run this kernel without quirk_alias option? Is the implicit feedback still set?

Takashi

When running it without the quirk_alias option implicit feedback isn't set. I have appended the output at the end of this mail. Does this mean the card runs with explicit feedback, or with no feedback at all? I've tested this on other linux distros (Fedora 33, Kernel 5.8 and Ubuntu 14.04.6 LTS Kernel 4.4 or 4.6, don't remember exactly), problem still exists, so this doesn't look like a regression to me. Just to be sure: the last commits to pcm.c and implicit.h in my tree are from Nov. 23. Is that correct? I don't find the topic/usb-audio-refactoring branch on the public git mirrors of tiwai/sound, so not sure I'm running the latest changes.

Yamaha Corporation Steinberg UR22 at usb-0000:00:1a.7-3, high speed : USB Audio

Playback:
Status: Stop
Interface 1

    Altset 1
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x07 (7 OUT) (ASYNC)
    Rates: 44100, 48000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
  Interface 1
    Altset 2
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x07 (7 OUT) (ASYNC)
    Rates: 88200, 96000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
  Interface 1
    Altset 3
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x07 (7 OUT) (ASYNC)
    Rates: 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR

Capture:
Status: Stop
Interface 2

    Altset 1
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 44100, 48000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
  Interface 2
    Altset 2
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 88200, 96000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
  Interface 2
    Altset 3
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
#11 lore raw
Quoted 115 lines · On Wed, 09 Dec 2020 12:56:55 +0100, [email protected] wrote:
Quoted 115 lines
Quoted 103 lines
Quoted 26 lines
Quoted 19 lines
Quoted 19 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

It's likely the issues with the implicit feedback.

The latest development tree (either linux-next tree or topic/usb-audio-refactoring branch of my sound.git tree) contains the improvements of the implicit feedback mode.

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Takashi

When I try to play a file now this happens:

$ aplay -D plughw:CARD=UR22 ./file.wav
Playing WAVE './file.wav' : Signed 16 bit Little Endian, Rate 44100
Hz, Stereo
aplay: set_params:1407: Unable to install hw params:

It's a known side-effect of the implicit feedback mode, and the latest patchset I mentioned earlier addresses the issue.

Quoted 6 lines
Quoted 1 line

Takashi

I'm already running the kernel built from the linux-next tree... I built next-20201208 from
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Is there another patch set that I'm missing?

Quoted 8 lines

Hm, strange.

Please check the contents of /proc/asound/card*/stream* file. With the latest patches and the implicit feedback mode, you should see the lines like "Sync Endpoint: 0x...." and "Implicit Feedback Mode: yes".

Takashi

Yes, I see this:

Yamaha Corporation Steinberg UR22 at usb-0000:00:1a.7-3, high speed :
USB Audio

Playback:
Status: Stop
Interface 1
Altset 1
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 44100, 48000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes
Interface 1
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 88200, 96000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes
Interface 1
Altset 3
Format: S24_3LE
Channels: 2
Endpoint: 0x07 (7 OUT) (ASYNC)
Rates: 176400, 192000
Data packet interval: 125 us
Bits: 24
Channel map: FL FR
Sync Endpoint: 0x81 (1 IN)
Sync EP Interface: 2
Sync EP Altset: 1
Implicit Feedback Mode: Yes

Capture:
Status: Stop
Interface 2

    Altset 1
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 44100, 48000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR
  Interface 2
    Altset 2
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 88200, 96000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR

Interface 2

Quoted 8 lines
    Altset 3
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x86 (6 IN) (ASYNC)
    Rates: 176400, 192000
    Data packet interval: 125 us
    Bits: 24
    Channel map: FL FR

OK, then it means that your device isn't compatible with UR22C. It has a different endpoint assignment.

Quoted 8 lines
Quoted 5 lines

What happens if you run this kernel without quirk_alias option? Is the implicit feedback still set?

Takashi

When running it without the quirk_alias option implicit feedback isn't set.

Then try to pass implicit_fb=1 option to snd-usb-audio module. It's a new option that was added recently.

Takashi

#12 lore raw
Quoted 5 lines

Then try to pass implicit_fb=1 option to snd-usb-audio module. It's a new option that was added recently.

Takashi

Nice, that did the trick. there was a small glitch on first playback but I can not reproduce it now. Playback seems glitch-free now. I will test it with pulseaudio in the gui if I can. It's not quite easy to test, because the system locks up after a while with the new kernel and gnome 3. I will also test concurrent playback and recording, too. Thank you very much, that was a huge help!

Kilian

#13 lore raw
Quoted 5 lines · On Wed, 09 Dec 2020 13:10:17 +0100, [email protected] wrote:
Quoted 5 lines

Then try to pass implicit_fb=1 option to snd-usb-audio module. It's a new option that was added recently.

Quoted 8 lines
Quoted 1 line

Takashi

Nice, that did the trick. there was a small glitch on first playback but I can not reproduce it now. Playback seems glitch-free now. I will test it with pulseaudio in the gui if I can. It's not quite easy to test, because the system locks up after a while with the new kernel and gnome 3. I will also test concurrent playback and recording, too. Thank you very much, that was a huge help!

Good to hear. If the implicit_fb option works, we can add a static quirk table entry easily. Just add IMPLICIT_FB_GENERIC_DEV() with the device ID to playback_implicit_fb_quirks[] table in sound/usb/implicit.c.

Takashi

author
#14 lore raw
Quoted 13 lines
Quoted 4 lines
Quoted 4 lines

Then try to pass implicit_fb=1 option to snd-usb-audio module. It's a new option that was added recently.

Quoted 8 lines
Quoted 1 line

Takashi

Nice, that did the trick. there was a small glitch on first playback but I can not reproduce it now. Playback seems glitch-free now. I will test it with pulseaudio in the gui if I can. It's not quite easy to test, because the system locks up after a while with the new kernel and gnome 3. I will also test concurrent playback and recording, too. Thank you very much, that was a huge help!

Quoted 7 lines

Good to hear. If the implicit_fb option works, we can add a static quirk table entry easily. Just add IMPLICIT_FB_GENERIC_DEV() with the device ID to playback_implicit_fb_quirks[] table in sound/usb/implicit.c.

Takashi

Still having problems with the nouveau driver, so i couldn't thest this with pulseaudio. Recording with arecord works parallel to playing back with aplay. so here is my patch for implicit.c

sound/usb/implicit.c +0 -0
index 386198b36b87..c729ff634b9d 100644
@@ -46,6 +46,7 @@ static const struct snd_usb_implicit_fb_match playback_implicit_fb_quirks[] = {
        IMPLICIT_FB_GENERIC_DEV(0x0763, 0x2081), /* M-Audio FastTrack 

Ultra */

        IMPLICIT_FB_GENERIC_DEV(0x0763, 0x2030), /* M-Audio Fast Track 
C400 */
        IMPLICIT_FB_GENERIC_DEV(0x0763, 0x2031), /* M-Audio Fast Track 

C600 */
+ IMPLICIT_FB_GENERIC_DEV(0x0499, 0x1509), /* Steinberg UR22 */

        /* Fixed EP */
        /* FIXME: check the availability of generic matching */
#15 lore raw
Quoted 20 lines · Kilian
Quoted 20 lines
Quoted 5 lines
Quoted 5 lines

Then try to pass implicit_fb=1 option to snd-usb-audio module. It's a new option that was added recently.

Quoted 8 lines
Quoted 1 line

Takashi

Nice, that did the trick. there was a small glitch on first playback but I can not reproduce it now. Playback seems glitch-free now. I will test it with pulseaudio in the gui if I can. It's not quite easy to test, because the system locks up after a while with the new kernel and gnome 3. I will also test concurrent playback and recording, too. Thank you very much, that was a huge help!

Good to hear. If the implicit_fb option works, we can add a static quirk table entry easily. Just add IMPLICIT_FB_GENERIC_DEV() with the device ID to playback_implicit_fb_quirks[] table in sound/usb/implicit.c.

Quoted 5 lines
Quoted 1 line

Takashi

Still having problems with the nouveau driver, so i couldn't thest this with pulseaudio. Recording with arecord works parallel to playing back with aplay. so here is my patch for implicit.c

OK, I'll cook up the proper patch and submit for 5.11 merge.

thanks,

Takashi

Quoted 17 lines
sound/usb/implicit.c +0 -0
index 386198b36b87..c729ff634b9d 100644
@@ -46,6 +46,7 @@ static const struct snd_usb_implicit_fb_match
 playback_implicit_fb_quirks[] = {
        IMPLICIT_FB_GENERIC_DEV(0x0763, 0x2081), /* M-Audio FastTrack

Ultra */

        IMPLICIT_FB_GENERIC_DEV(0x0763, 0x2030), /* M-Audio Fast Track
C400 */
        IMPLICIT_FB_GENERIC_DEV(0x0763, 0x2031), /* M-Audio Fast Track

C600 */
+ IMPLICIT_FB_GENERIC_DEV(0x0499, 0x1509), /* Steinberg UR22 */

        /* Fixed EP */
        /* FIXME: check the availability of generic matching */