All of lore.kernel.org
 help / color / mirror / Atom feed
* Behringer UMC202HD issues and a partial solution
@ 2022-01-13 14:37 Nandakumar Edamana
  2022-01-13 19:00 ` Geraldo Nascimento
  0 siblings, 1 reply; 11+ messages in thread
From: Nandakumar Edamana @ 2022-01-13 14:37 UTC (permalink / raw)
  To: alsa-devel

Trying to make my Behringer UMC202HD audio interface work with GNU/Linux.
While doing so, I managed to make a warning disappear by editing a file in
the kernel source. The main issue I'm having with the interface isn't 
gone, and
I am not sure whether to bother you people with that now. However I'd 
like to
read your comments on the edit I made regarding the warning.

Details:

- Product: 1397:0507 BEHRINGER International GmbH UMC202HD 192k
- dmesg warning: clock source 41 is not valid, cannot use
- kernel: linux-5.15.13
- Edit that made the warning disappear:

$ diff -u sound/usb/clock.c.orig sound/usb/clock.c
--- sound/usb/clock.c.orig    2022-01-13 08:14:49.555281286 +0530
+++ sound/usb/clock.c    2022-01-13 08:18:38.004618792 +0530
@@ -180,7 +180,11 @@
       * Sample rate changes takes more than 2 seconds for this device. 
Clock
       * validity request returns false during that period.
       */
-    if (chip->usb_id == USB_ID(0x07fd, 0x0004)) {
+    if (chip->usb_id == USB_ID(0x07fd, 0x0004) ||
+        /* Trying the same for BEHRINGER International GmbH UMC202HD 
192k */
+        chip->usb_id == USB_ID(0x1397, 0x0507)
+        )
+    {
          count = 0;

          while ((!ret) && (count < 50)) {



Yes, I was just adding the ID of UMC202HD to an existing workaround. I'm not
sure if the device's clock should actually be accepted (but I think so 
because
the retry works, right?), or if two seconds is the right delay for UMC202HD.

The real issue I'm having with this device is related to the periodic
stuttering/pops while playback (recording is okay). I remember having 
read that
UMC20x is well-supported in Linux. Maybe now they're using a different
firmware version or something? If you are interested, here is a list of 
things
I've already tried:

- Different ports, including USB 2.0, and disabling xHCI using `setpci`
- Disconnecting other USB devices
- Disabling wireless
- Making sure speech-dispatcher isn't running
- Old and new GNU/Linux distros on different computers
- Switching sound servers (PulseAudio and JACK) and direct ALSA
- Different sampling rates, buffer sizes, etc.
- Lower volume levels
- Making sure there are no xruns
- tsched=0 and 1 for module-udev-detect (pulse)
- realtime-scheduling, high-priority, and nice-level (pulse)
- Choosing Performance mode for CPU Governer and disabling Intel Boost
   (as recommended by Ubuntu Studio dashboard)
- lowlatency kernel
- A recent kernel (v5.15.13) built from source with oldconfig
- Clock source workaround in sound/usb/clock.c
- Quirk entries in sound/usb/implicit.c (I won't claim I did it right)

Again, I'd like to hear your comments on the clock detection workaround 
first,
since that's the only thing I seem to have solved with all these hours spent
(except for learning a lot, of course). But if you have time, please 
consider
the second (main) issue also. Maybe I'm posting this in the wrong place; 
if so,
please let me know where to repost it (official forum or a kernel 
mailing list).

Thank you,

-- 
Nandakumar Edamana
https://nandakumar.org

GPG Key: https://nandakumar.org/contact/gpgkey.asc
GPG Key Fingerprint: BA6B 8FDE 644F F861 B638  3E2F 45D6 05FC 646A F75D


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Behringer UMC202HD issues and a partial solution
  2022-01-13 14:37 Behringer UMC202HD issues and a partial solution Nandakumar Edamana
@ 2022-01-13 19:00 ` Geraldo Nascimento
  2022-01-14  2:34   ` Nandakumar Edamana
  0 siblings, 1 reply; 11+ messages in thread
From: Geraldo Nascimento @ 2022-01-13 19:00 UTC (permalink / raw)
  To: Nandakumar Edamana; +Cc: alsa-devel

On Thu, Jan 13, 2022 at 08:07:49PM +0530, Nandakumar Edamana wrote:
> Trying to make my Behringer UMC202HD audio interface work with GNU/Linux.
> While doing so, I managed to make a warning disappear by editing a file in
> the kernel source. The main issue I'm having with the interface isn't 
> gone, and
> I am not sure whether to bother you people with that now. However I'd 
> like to
> read your comments on the edit I made regarding the warning.
> 
> Details:
> 
> - Product: 1397:0507 BEHRINGER International GmbH UMC202HD 192k
> - dmesg warning: clock source 41 is not valid, cannot use
> - kernel: linux-5.15.13
> - Edit that made the warning disappear:
> 
> $ diff -u sound/usb/clock.c.orig sound/usb/clock.c
> --- sound/usb/clock.c.orig    2022-01-13 08:14:49.555281286 +0530
> +++ sound/usb/clock.c    2022-01-13 08:18:38.004618792 +0530
> @@ -180,7 +180,11 @@
>        * Sample rate changes takes more than 2 seconds for this device. 
> Clock
>        * validity request returns false during that period.
>        */
> -    if (chip->usb_id == USB_ID(0x07fd, 0x0004)) {
> +    if (chip->usb_id == USB_ID(0x07fd, 0x0004) ||
> +        /* Trying the same for BEHRINGER International GmbH UMC202HD 
> 192k */
> +        chip->usb_id == USB_ID(0x1397, 0x0507)
> +        )
> +    {
>           count = 0;
> 
>           while ((!ret) && (count < 50)) {
> 
> 
> 
> Yes, I was just adding the ID of UMC202HD to an existing workaround. I'm not
> sure if the device's clock should actually be accepted (but I think so 
> because
> the retry works, right?), or if two seconds is the right delay for UMC202HD.
> 
> The real issue I'm having with this device is related to the periodic
> stuttering/pops while playback (recording is okay).

Hi Nandakumar,

You made the dmesg warning go away, but that didn't necessarily solve
the underlying issue. May I ask that you post the "lsusb -v -d
1397:0507" ?

I may ask you to activate dyndbg for the snd-usb-audio module next.

> I remember having read that
> UMC20x is well-supported in Linux. Maybe now they're using a different
> firmware version or something?

Seems to be a different revision indeed, but don't worry, most of the
time these bugs are fixable.

> If you are interested, here is a list of 
> things
> I've already tried:
> 
> - Different ports, including USB 2.0, and disabling xHCI using `setpci`
> - Disconnecting other USB devices
> - Disabling wireless
> - Making sure speech-dispatcher isn't running
> - Old and new GNU/Linux distros on different computers
> - Switching sound servers (PulseAudio and JACK) and direct ALSA
> - Different sampling rates, buffer sizes, etc.
> - Lower volume levels
> - Making sure there are no xruns
> - tsched=0 and 1 for module-udev-detect (pulse)
> - realtime-scheduling, high-priority, and nice-level (pulse)
> - Choosing Performance mode for CPU Governer and disabling Intel Boost
>    (as recommended by Ubuntu Studio dashboard)
> - lowlatency kernel
> - A recent kernel (v5.15.13) built from source with oldconfig
> - Clock source workaround in sound/usb/clock.c
> - Quirk entries in sound/usb/implicit.c (I won't claim I did it right)
> 
> Again, I'd like to hear your comments on the clock detection workaround 
> first,
> since that's the only thing I seem to have solved with all these hours spent
> (except for learning a lot, of course). But if you have time, please 
> consider
> the second (main) issue also. Maybe I'm posting this in the wrong place; 
> if so,
> please let me know where to repost it (official forum or a kernel 
> mailing list).

alsa-devel is the place where finished contributions land, but it's also
a place to ask for lower-level help in ALSA development. Don't worry,
you are in the right place.

> 
> Thank you,
> 
> -- 
> Nandakumar Edamana
> https://nandakumar.org
> 
> GPG Key: https://nandakumar.org/contact/gpgkey.asc
> GPG Key Fingerprint: BA6B 8FDE 644F F861 B638  3E2F 45D6 05FC 646A F75D
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Behringer UMC202HD issues and a partial solution
  2022-01-13 19:00 ` Geraldo Nascimento
@ 2022-01-14  2:34   ` Nandakumar Edamana
  2022-01-14  3:41     ` Geraldo Nascimento
  0 siblings, 1 reply; 11+ messages in thread
From: Nandakumar Edamana @ 2022-01-14  2:34 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel

Thank you very much for the kind reply.

> You made the dmesg warning go away, but that didn't necessarily solve
> the underlying issue. May I ask that you post the "lsusb -v -d
> 1397:0507" ?

Here it is, connected to a USB 2.0 port (xHCI still enabled).

$ lsusb -v -d 1397:0507 > lsusb_-v.txt
can't get debug descriptor: Resource temporarily unavailable


Bus 003 Device 011: ID 1397:0507 BEHRINGER International GmbH UMC202HD 192k
Device Descriptor:
   bLength                18
   bDescriptorType         1
   bcdUSB               2.00
   bDeviceClass          239 Miscellaneous Device
   bDeviceSubClass         2
   bDeviceProtocol         1 Interface Association
   bMaxPacketSize0        64
   idVendor           0x1397 BEHRINGER International GmbH
   idProduct          0x0507
   bcdDevice            1.00
   iManufacturer           1 BEHRINGER
   iProduct                2 UMC202HD 192k
   iSerial                 3 12345678
   bNumConfigurations      1
   Configuration Descriptor:
     bLength                 9
     bDescriptorType         2
     wTotalLength       0x011d
     bNumInterfaces          4
     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              0
       AudioControl Interface Descriptor:
         bLength                 9
         bDescriptorType        36
         bDescriptorSubtype      1 (HEADER)
         bcdADC               2.00
         bCategory               8
         wTotalLength       0x0077
         bmControls           0x01
           Latency control Control (read-only)
       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           10 Internal
       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          0
       AudioControl Interface Descriptor:
         bLength                17
         bDescriptorType        36
         bDescriptorSubtype      2 (INPUT_TERMINAL)
         bTerminalID             2
         wTerminalType      0x0101 USB Streaming
         bAssocTerminal          0
         bCSourceID             40
         bNrChannels             2
         bmChannelConfig    0x00000000
         iChannelNames         192 Out 1
         bmControls         0x0000
         iTerminal               0
       AudioControl Interface Descriptor:
         bLength                18
         bDescriptorType        36
         bDescriptorSubtype      6 (FEATURE_UNIT)
         bUnitID                10
         bSourceID               2
         bmaControls(0)     0x0000000f
           Mute Control (read/write)
           Volume Control (read/write)
         bmaControls(1)     0x0000000f
           Mute Control (read/write)
           Volume Control (read/write)
         bmaControls(2)     0x0000000f
           Mute Control (read/write)
           Volume Control (read/write)
         iFeature                0
       AudioControl Interface Descriptor:
         bLength                12
         bDescriptorType        36
         bDescriptorSubtype      3 (OUTPUT_TERMINAL)
         bTerminalID            20
         wTerminalType      0x0301 Speaker
         bAssocTerminal          0
         bSourceID              10
         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    0x00000000
         iChannelNames         128 In 1
         bmControls         0x0000
         iTerminal               0
       AudioControl Interface Descriptor:
         bLength                18
         bDescriptorType        36
         bDescriptorSubtype      6 (FEATURE_UNIT)
         bUnitID                11
         bSourceID               1
         bmaControls(0)     0x0000000f
           Mute Control (read/write)
           Volume Control (read/write)
         bmaControls(1)     0x0000000f
           Mute Control (read/write)
           Volume Control (read/write)
         bmaControls(2)     0x0000000f
           Mute Control (read/write)
           Volume Control (read/write)
         iFeature                0
       AudioControl Interface Descriptor:
         bLength                12
         bDescriptorType        36
         bDescriptorSubtype      3 (OUTPUT_TERMINAL)
         bTerminalID            22
         wTerminalType      0x0101 USB Streaming
         bAssocTerminal          0
         bSourceID              11
         bCSourceID             40
         bmControls         0x0000
         iTerminal               0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x81  EP 1 IN
         bmAttributes            3
           Transfer Type            Interrupt
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0006  1x 6 bytes
         bInterval               8
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        1
       bAlternateSetting       0
       bNumEndpoints           0
       bInterfaceClass         1 Audio
       bInterfaceSubClass      2 Streaming
       bInterfaceProtocol     32
       iInterface              0
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        1
       bAlternateSetting       1
       bNumEndpoints           2
       bInterfaceClass         1 Audio
       bInterfaceSubClass      2 Streaming
       bInterfaceProtocol     32
       iInterface              0
       AudioStreaming Interface Descriptor:
         bLength                16
         bDescriptorType        36
         bDescriptorSubtype      1 (AS_GENERAL)
         bTerminalLink           2
         bmControls           0x00
         bFormatType             1
         bmFormats          0x00000001
           PCM
         bNrChannels             2
         bmChannelConfig    0x00000000
         iChannelNames         192 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     0x08  EP 8 OUT
         bmAttributes            5
           Transfer Type            Isochronous
           Synch Type               Asynchronous
           Usage Type               Data
         wMaxPacketSize     0x0190  1x 400 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
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x84  EP 4 IN
         bmAttributes           17
           Transfer Type            Isochronous
           Synch Type               None
           Usage Type               Feedback
         wMaxPacketSize     0x0004  1x 4 bytes
         bInterval               4
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        2
       bAlternateSetting       0
       bNumEndpoints           0
       bInterfaceClass         1 Audio
       bInterfaceSubClass      2 Streaming
       bInterfaceProtocol     32
       iInterface              0
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        2
       bAlternateSetting       1
       bNumEndpoints           1
       bInterfaceClass         1 Audio
       bInterfaceSubClass      2 Streaming
       bInterfaceProtocol     32
       iInterface              0
       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         128 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     0x88  EP 8 IN
         bmAttributes           37
           Transfer Type            Isochronous
           Synch Type               Asynchronous
           Usage Type               Implicit feedback Data
         wMaxPacketSize     0x0190  1x 400 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        5
       bAlternateSetting       0
       bNumEndpoints           1
       bInterfaceClass       255 Vendor Specific Class
       bInterfaceSubClass      1
       bInterfaceProtocol     16
       iInterface              0
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x85  EP 5 IN
         bmAttributes            3
           Transfer Type            Interrupt
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0008  1x 8 bytes
         bInterval               8
Device Qualifier (for other device speed):
   bLength                10
   bDescriptorType         6
   bcdUSB               2.00
   bDeviceClass          239 Miscellaneous Device
   bDeviceSubClass         2
   bDeviceProtocol         1 Interface Association
   bMaxPacketSize0         8
   bNumConfigurations      1
Device Status:     0x0000
   (Bus Powered)

> I may ask you to activate dyndbg for the snd-usb-audio module next.
I'll try soon.
> Seems to be a different revision indeed, but don't worry, most of the
> time these bugs are fixable.
Thank you. Happy to participate!

-- 
Nandakumar Edamana
https://nandakumar.org

GPG Key: https://nandakumar.org/contact/gpgkey.asc
GPG Key Fingerprint: BA6B 8FDE 644F F861 B638  3E2F 45D6 05FC 646A F75D


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Behringer UMC202HD issues and a partial solution
  2022-01-14  2:34   ` Nandakumar Edamana
@ 2022-01-14  3:41     ` Geraldo Nascimento
  2022-01-14  4:36       ` Nandakumar Edamana
  0 siblings, 1 reply; 11+ messages in thread
From: Geraldo Nascimento @ 2022-01-14  3:41 UTC (permalink / raw)
  To: Nandakumar Edamana; +Cc: alsa-devel

On Fri, Jan 14, 2022 at 08:04:08AM +0530, Nandakumar Edamana wrote:
> Thank you very much for the kind reply.
> 
> > You made the dmesg warning go away, but that didn't necessarily solve
> > the underlying issue. May I ask that you post the "lsusb -v -d
> > 1397:0507" ?
> 
> Here it is, connected to a USB 2.0 port (xHCI still enabled).
>

Thanks, Nandakumar!

Have you tried unloading the snd-usb-audio module and the reloading it
with implicit_fb=1 as in "modprobe -r snd-usb-audio" and "modprobe
snd-usb-audio implicit_fb=1" ?

If not, try it. If it works and your playback issues are gone then
your device may just need a quirk. If it doesn't work we still
have dyndbg to go through.

Last but not least, please use a vanilla kernel for these tests.

Thank you,
Geraldo Nascimento

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Behringer UMC202HD issues and a partial solution
  2022-01-14  3:41     ` Geraldo Nascimento
@ 2022-01-14  4:36       ` Nandakumar Edamana
  2022-01-14  7:44         ` Geraldo Nascimento
  0 siblings, 1 reply; 11+ messages in thread
From: Nandakumar Edamana @ 2022-01-14  4:36 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel

Hi Geraldo,
> Have you tried unloading the snd-usb-audio module and the reloading it
> with implicit_fb=1 as in "modprobe -r snd-usb-audio" and "modprobe
> snd-usb-audio implicit_fb=1" ?
>
> If not, try it. If it works and your playback issues are gone then
> your device may just need a quirk. If it doesn't work we still
> have dyndbg to go through.
It works! Had to switch the devices and options back and forth in 
pavucontrol
(sometimes needed even for the choppy playback), but it works.

So why did my quirks didn't work? Maybe I gave the wrong numbers? Or the 
code
was unreachable (I didn't put printk()s, sorry). I guessed the combos from
`lsusb -v` output, and even tried the combos that didn't make any sense
(because I didn't know what I was doing).

Here's what I tried, one after another (added to 
playback_implicit_fb_quirks in
/sound/usb/implicit.c):

IMPLICIT_FB_GENERIC_DEV(0x1397, 0x0507),

/* Didn't work */
IMPLICIT_FB_FIXED_DEV(0x1397, 0x0507, 0x84, 1),

/* Interface 2 is actually Capture as per `cat /proc/asound/card1/stream0`,
  * but "Implicit feedback Data" is found under that
  * (Interface 1 has explicit Feedback), and a Scarlett quirk seemed to use
  * a capture interface in playback_implicit_fb_quirks
  * (I know that it's a capture interface from `lsusb` output posted by 
someone
  * online)
  */
/* Didn't work */
IMPLICIT_FB_FIXED_DEV(0x1397, 0x0507, 0x88, 2),

/* Didn't work */
/* What am I doing with 0x08 ? */
IMPLICIT_FB_FIXED_DEV(0x1397, 0x0507, 0x08, 1),

/* Didn't work */
/* Why BOTH? But what's FIXED at first? Didn't find any doc. */
IMPLICIT_FB_BOTH_DEV(0x1397, 0x0507, 0x84, 1),

/* Didn't work */
IMPLICIT_FB_SKIP_DEV(0x1397, 0x0507),
> Last but not least, please use a vanilla kernel for these tests.
I built it using the source from kernel.org, not apt. But I've used 
oldconfig,
and I think patches are being applied while installing the kernel 
(currently I'm
using my daily driver installation for this). If it has to be more pure, 
I 'll
try. BTW, do you have any distro to recommend that has a near-vanilla 
kernel for
experiments like this?

Another question: assuming a quirk gets added for this device, is there any
chance that the quirk would break the experience for those who are already
using the device (possibly a different revision, but the same ID [1]) 
without
any issues?

[1] https://h-node.org/soundcards/view/en/2228/Behringer-UMC202HD

Thank you,

-- 
Nandakumar Edamana
https://nandakumar.org

GPG Key: https://nandakumar.org/contact/gpgkey.asc
GPG Key Fingerprint: BA6B 8FDE 644F F861 B638  3E2F 45D6 05FC 646A F75D


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Behringer UMC202HD issues and a partial solution
  2022-01-14  4:36       ` Nandakumar Edamana
@ 2022-01-14  7:44         ` Geraldo Nascimento
  2022-01-14 13:39           ` Nandakumar Edamana
  0 siblings, 1 reply; 11+ messages in thread
From: Geraldo Nascimento @ 2022-01-14  7:44 UTC (permalink / raw)
  To: Nandakumar Edamana; +Cc: alsa-devel

On Fri, Jan 14, 2022 at 10:06:01AM +0530, Nandakumar Edamana wrote:
> Hi Geraldo,

Hi Nandakumar,

> > Have you tried unloading the snd-usb-audio module and the reloading it
> > with implicit_fb=1 as in "modprobe -r snd-usb-audio" and "modprobe
> > snd-usb-audio implicit_fb=1" ?
> >
> > If not, try it. If it works and your playback issues are gone then
> > your device may just need a quirk. If it doesn't work we still
> > have dyndbg to go through.
> It works! Had to switch the devices and options back and forth in 
> pavucontrol
> (sometimes needed even for the choppy playback), but it works.
> 

OK, I'm glad it works at least :)

> So why did my quirks didn't work? Maybe I gave the wrong numbers? Or the 
> code
> was unreachable (I didn't put printk()s, sorry). I guessed the combos from
> `lsusb -v` output, and even tried the combos that didn't make any sense
> (because I didn't know what I was doing).
> 

That's what we have to find out...

> Here's what I tried, one after another (added to 
> playback_implicit_fb_quirks in
> /sound/usb/implicit.c):

I'm glad you warned me preemptively that the following quirks don't
work, so I don't waste my time writing non-working patches and you don't
waste your time testing non-working patches. Thank you.

> 
> IMPLICIT_FB_GENERIC_DEV(0x1397, 0x0507),

This should have been enough for ALSA to pick-up the implicit feedback
mode. Weird...

> 
> /* Didn't work */
> IMPLICIT_FB_FIXED_DEV(0x1397, 0x0507, 0x84, 1),
> 
> /* Interface 2 is actually Capture as per `cat /proc/asound/card1/stream0`,
>   * but "Implicit feedback Data" is found under that
>   * (Interface 1 has explicit Feedback), and a Scarlett quirk seemed to use
>   * a capture interface in playback_implicit_fb_quirks
>   * (I know that it's a capture interface from `lsusb` output posted by 
> someone
>   * online)
>   */
> /* Didn't work */
> IMPLICIT_FB_FIXED_DEV(0x1397, 0x0507, 0x88, 2),
> 
> /* Didn't work */
> /* What am I doing with 0x08 ? */
> IMPLICIT_FB_FIXED_DEV(0x1397, 0x0507, 0x08, 1),
> 
> /* Didn't work */
> /* Why BOTH? But what's FIXED at first? Didn't find any doc. */

BOTH is a quirk for some BOSS devices and at least one Pioneer device,
don't worry I'm pretty sure your device doesn't need it.

FIXED just means we specify the implicit fb sync ep hardcoded, which
is obviously a bit bad but it's there because generic matching
doesn't always work.

> IMPLICIT_FB_BOTH_DEV(0x1397, 0x0507, 0x84, 1),
> 
> /* Didn't work */
> IMPLICIT_FB_SKIP_DEV(0x1397, 0x0507),
> > Last but not least, please use a vanilla kernel for these tests.
> I built it using the source from kernel.org, not apt. But I've used 
> oldconfig,
> and I think patches are being applied while installing the kernel 
> (currently I'm
> using my daily driver installation for this). If it has to be more pure, 
> I 'll
> try. BTW, do you have any distro to recommend that has a near-vanilla 
> kernel for
> experiments like this?

My guess is your workflow for kernels will do for testing a possible
patch in the near-future. I can't recommend any distribution over any
other one, and pretty much all of them patch the kernel heavily.

> 
> Another question: assuming a quirk gets added for this device, is there any
> chance that the quirk would break the experience for those who are already
> using the device (possibly a different revision, but the same ID [1]) 
> without
> any issues?

Yeah, let's make sure it doesn't cause a regression for the other users.

Could you please provide the dyndbg of both working and non-working
cases (without implicit_fb=1)? The documentation for doing so is here
https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html

Please set snd-usb-audio.dyndbg=+p either at boot time or via debugfs
before connecting your USB device, then plug it in.

Thank you,
Geraldo Nascimento

> 
> [1] https://h-node.org/soundcards/view/en/2228/Behringer-UMC202HD
> 
> Thank you,
> 
> -- 
> Nandakumar Edamana
> https://nandakumar.org
> 
> GPG Key: https://nandakumar.org/contact/gpgkey.asc
> GPG Key Fingerprint: BA6B 8FDE 644F F861 B638  3E2F 45D6 05FC 646A F75D
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Behringer UMC202HD issues and a partial solution
  2022-01-14  7:44         ` Geraldo Nascimento
@ 2022-01-14 13:39           ` Nandakumar Edamana
  2022-01-14 22:28             ` Geraldo Nascimento
  0 siblings, 1 reply; 11+ messages in thread
From: Nandakumar Edamana @ 2022-01-14 13:39 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 1919 bytes --]

> >
> > IMPLICIT_FB_GENERIC_DEV(0x1397, 0x0507),
>
> This should have been enough for ALSA to pick-up the implicit feedback
> mode. Weird...

I tried it once again to confirm. It doesn't work (choppy audio and
"Implicit Feedback Mode: No" as per /proc/asound/card1/stream0).
FYI, this is what I did:

# modprobe -r snd_usb_audio
$ make prepare modules_prepare && make M=sound/usb modules &&\
sudo make M=sound modules_install
# modprobe snd_usb_audio

> BOTH is a quirk for some BOSS devices and at least one Pioneer device,
> don't worry I'm pretty sure your device doesn't need it.
>
> FIXED just means we specify the implicit fb sync ep hardcoded, which
> is obviously a bit bad but it's there because generic matching
> doesn't always work.

Thank you. This confirms my guess. Still no idea why the Scarlett workaround
I saw somewhere uses the capture endpoint in playback_implicit_fb_quirks
(I don't remember the details, but has copied the link; we can look at 
it later
if you are interested).

> Could you please provide the dyndbg of both working and non-working
> cases (without implicit_fb=1)? The documentation for doing so is here
> https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html
>
> Please set snd-usb-audio.dyndbg=+p either at boot time or via debugfs
> before connecting your USB device, then plug it in.

PFA. I'm yet to figure out my way around debugfs, so I copied dmesg. Just
noticed that `Creating new sync endpoint #84` is there when the module 
is loaded
without `implicit_fb=1`. Also, both capture and playback endpoints report
`implicit_fb=0` in the log when the module is loaded without 
`implicit_fb=1`,
while there is a difference when the module is loaded with `implicit_fb=1`.

Thank you,

-- 
Nandakumar Edamana
https://nandakumar.org

GPG Key: https://nandakumar.org/contact/gpgkey.asc
GPG Key Fingerprint: BA6B 8FDE 644F F861 B638  3E2F 45D6 05FC 646A F75D

[-- Attachment #2: dyndbg-non-implicit.txt --]
[-- Type: text/plain, Size: 11522 bytes --]

- dmesg output, 2022-01-14
- clock source workaround is present
- `IMPLICIT_FB_GENERIC_DEV(0x1397, 0x0507),` line under playback_implicit_fb_quirks in /sound/usb/implicit.c (doesn't really change the feedback mode as per previous attempt)
- `modprobe snd_usb_audio dyndbg==p` 
- still non-implicit feedback and stuttering

[48731.161380] usb 3-3: USB disconnect, device number 19
[48759.574239] usbcore: deregistering interface driver snd-usb-audio
[48763.455999] usbcore: registered new interface driver snd-usb-audio
[48774.731400] usb 3-3: new high-speed USB device number 20 using xhci_hcd
[48774.858557] usb 3-3: config 1 has an invalid interface number: 5 but max is 3
[48774.858574] usb 3-3: config 1 has no interface number 3
[48774.859485] usb 3-3: New USB device found, idVendor=1397, idProduct=0507, bcdDevice= 1.00
[48774.859515] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[48774.859531] usb 3-3: Product: UMC202HD 192k
[48774.859543] usb 3-3: Manufacturer: BEHRINGER
[48774.859551] usb 3-3: SerialNumber: 12345678
[48875.327447] usb 3-3: USB disconnect, device number 20
[48890.025235] usbcore: deregistering interface driver snd-usb-audio
[48931.816944] usbcore: registered new interface driver snd-usb-audio
[48937.230569] usb 3-3: new high-speed USB device number 21 using xhci_hcd
[48937.357639] usb 3-3: config 1 has an invalid interface number: 5 but max is 3
[48937.357656] usb 3-3: config 1 has no interface number 3
[48937.358633] usb 3-3: New USB device found, idVendor=1397, idProduct=0507, bcdDevice= 1.00
[48937.358651] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[48937.358658] usb 3-3: Product: UMC202HD 192k
[48937.358664] usb 3-3: Manufacturer: BEHRINGER
[48937.358670] usb 3-3: SerialNumber: 12345678
[49625.890252] usb 3-3: USB disconnect, device number 21
[49627.573706] usbcore: deregistering interface driver snd-usb-audio
[49665.802565] usbcore: registered new interface driver snd-usb-audio
[49672.560875] usb 3-3: new high-speed USB device number 22 using xhci_hcd
[49672.687974] usb 3-3: config 1 has an invalid interface number: 5 but max is 3
[49672.687991] usb 3-3: config 1 has no interface number 3
[49672.689028] usb 3-3: New USB device found, idVendor=1397, idProduct=0507, bcdDevice= 1.00
[49672.689050] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[49672.689062] usb 3-3: Product: UMC202HD 192k
[49672.689070] usb 3-3: Manufacturer: BEHRINGER
[49672.689077] usb 3-3: SerialNumber: 12345678
[49672.692367] usb 3-3: 1:1: found sync_ep=0x84, iface=1, alt=1, implicit_fb=0
[49672.692379] usb 3-3: 1:1: add audio endpoint 0x8
[49672.692409] usb 3-3: Creating new data endpoint #8
[49672.692417] usb 3-3: Creating new sync endpoint #84
[49672.692611] usb 3-3: 1:1 Set sample rate 192000, clock 40
[49672.696512] usb 3-3: 2:1: add audio endpoint 0x88
[49672.696539] usb 3-3: Creating new data endpoint #88
[49672.696803] usb 3-3: 2:1 Set sample rate 192000, clock 40
[49672.700437] usb 3-3: [10] FU [PCM Playback Switch] ch = 2, val = 0/1/1
[49672.700454] usb 3-3: [10] FU [PCM Playback Switch] ch = 1, val = 0/1/1
[49672.703760] usb 3-3: [10] FU [PCM Playback Volume] ch = 2, val = -32512/0/256
[49672.707047] usb 3-3: [10] FU [PCM Playback Volume] ch = 1, val = -32512/0/256
[49672.707540] usb 3-3: [11] FU [Mic Capture Switch] ch = 2, val = 0/1/1
[49672.707562] usb 3-3: [11] FU [Mic Capture Switch] ch = 1, val = 0/1/1
[49672.710665] usb 3-3: [11] FU [Mic Capture Volume] ch = 2, val = -32512/0/256
[49672.714037] usb 3-3: [11] FU [Mic Capture Volume] ch = 1, val = -32512/0/256
[49672.862329] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[49672.862341] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[49672.862349] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49672.862668] usb 3-3: 2:1 Set sample rate 48000, clock 40
[49672.865988] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
[49672.866010] usb 3-3: Set up 12 URBS, ret=0
[49672.866016] usb 3-3: Setting usb interface 2:1 for EP 0x88
[49672.871524] usb 3-3: Closing EP 0x88 (count 1)
[49672.871531] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49672.872783] usb 3-3: EP 0x88 closed
[49672.873649] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[49672.873657] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[49672.873664] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49672.873937] usb 3-3: 2:1 Set sample rate 48000, clock 40
[49672.875980] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
[49672.875992] usb 3-3: Set up 12 URBS, ret=0
[49672.875996] usb 3-3: Setting usb interface 2:1 for EP 0x88
[49672.877285] usb 3-3: Closing EP 0x88 (count 1)
[49672.877290] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49672.877669] usb 3-3: EP 0x88 closed
[49672.878685] usb 3-3: Open EP 0x8, iface=1:1, idx=0
[49672.878695] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[49672.878703] usb 3-3: Open EP 0x84, iface=1:1, idx=1
[49672.878828] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[49672.878838] usb 3-3: Setting usb interface 1:0 for EP 0x8
[49672.878968] usb 3-3: 1:1 Set sample rate 48000, clock 40
[49672.880042] usb 3-3: Setting params for data EP 0x8, pipe 0x41600
[49672.880062] usb 3-3: Set up 12 URBS, ret=0
[49672.880068] usb 3-3: Setting usb interface 1:1 for EP 0x8
[49672.880509] usb 3-3: Setting params for sync EP 0x84, pipe 0x21680
[49672.880517] usb 3-3: Set up 4 URBS, ret=0
[49672.883405] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[49672.883414] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[49672.883421] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49672.883605] usb 3-3: 2:1 Set sample rate 48000, clock 40
[49673.098932] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
[49673.098958] usb 3-3: Set up 12 URBS, ret=0
[49673.098966] usb 3-3: Setting usb interface 2:1 for EP 0x88
[49673.099360] usb 3-3: Closing EP 0x88 (count 1)
[49673.099368] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49673.099743] usb 3-3: EP 0x88 closed
[49673.101201] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[49673.101215] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[49673.101227] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49673.101383] usb 3-3: 2:1 Set sample rate 48000, clock 40
[49673.102494] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
[49673.102505] usb 3-3: Set up 12 URBS, ret=0
[49673.102508] usb 3-3: Setting usb interface 2:1 for EP 0x88
[49673.102892] usb 3-3: Closing EP 0x8 (count 1)
[49673.102899] usb 3-3: EP 0x8 closed
[49673.102903] usb 3-3: Closing EP 0x84 (count 1)
[49673.102907] usb 3-3: Setting usb interface 1:0 for EP 0x84
[49673.103270] usb 3-3: EP 0x84 closed
[49673.103325] usb 3-3: Closing EP 0x88 (count 1)
[49673.103330] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49673.103581] usb 3-3: EP 0x88 closed
[49673.117689] usb 3-3: Open EP 0x8, iface=1:1, idx=0
[49673.117709] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[49673.117716] usb 3-3: Open EP 0x84, iface=1:1, idx=1
[49673.117722] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[49673.117728] usb 3-3: Setting usb interface 1:0 for EP 0x8
[49673.117873] usb 3-3: 1:1 Set sample rate 48000, clock 40
[49673.121046] usb 3-3: Setting params for data EP 0x8, pipe 0x41600
[49673.121067] usb 3-3: Set up 12 URBS, ret=0
[49673.121074] usb 3-3: Setting usb interface 1:1 for EP 0x8
[49673.121433] usb 3-3: Setting params for sync EP 0x84, pipe 0x21680
[49673.121443] usb 3-3: Set up 4 URBS, ret=0
[49673.122892] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[49673.122903] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[49673.122913] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49673.123054] usb 3-3: 2:1 Set sample rate 48000, clock 40
[49673.124177] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
[49673.124189] usb 3-3: Set up 12 URBS, ret=0
[49673.124192] usb 3-3: Setting usb interface 2:1 for EP 0x88
[49673.124503] usb 3-3: Closing EP 0x88 (count 1)
[49673.124508] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49673.124873] usb 3-3: EP 0x88 closed
[49673.125726] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[49673.125733] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[49673.125739] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49673.125872] usb 3-3: 2:1 Set sample rate 48000, clock 40
[49673.126932] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
[49673.126947] usb 3-3: Set up 12 URBS, ret=0
[49673.126952] usb 3-3: Setting usb interface 2:1 for EP 0x88
[49673.127204] usb 3-3: Closing EP 0x8 (count 1)
[49673.127208] usb 3-3: EP 0x8 closed
[49673.127210] usb 3-3: Closing EP 0x84 (count 1)
[49673.127212] usb 3-3: Setting usb interface 1:0 for EP 0x84
[49673.127647] usb 3-3: EP 0x84 closed
[49673.127724] usb 3-3: Closing EP 0x88 (count 1)
[49673.127730] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49673.128017] usb 3-3: EP 0x88 closed
[49673.141142] usb 3-3: Open EP 0x8, iface=1:1, idx=0
[49673.141154] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=384000, periods=2, implicit_fb=0
[49673.141161] usb 3-3: Open EP 0x84, iface=1:1, idx=1
[49673.141168] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=384000, periods=2, implicit_fb=0
[49673.141174] usb 3-3: Setting usb interface 1:0 for EP 0x8
[49673.141334] usb 3-3: 1:1 Set sample rate 48000, clock 40
[49673.142388] usb 3-3: Setting params for data EP 0x8, pipe 0x41600
[49673.142399] usb 3-3: Set up 12 URBS, ret=0
[49673.142402] usb 3-3: Setting usb interface 1:1 for EP 0x8
[49673.142677] usb 3-3: Setting params for sync EP 0x84, pipe 0x21680
[49673.142682] usb 3-3: Set up 4 URBS, ret=0
[49673.144794] usb 3-3: Starting data EP 0x8 (running 0)
[49673.144922] usb 3-3: 12 URBs submitted for EP 0x8
[49673.144928] usb 3-3: Starting sync EP 0x84 (running 0)
[49673.144952] usb 3-3: 4 URBs submitted for EP 0x84
[49673.144957] usb 3-3: 1:1 Start Playback PCM
[49673.147134] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[49673.147146] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=384000, periods=2, implicit_fb=0
[49673.147154] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49673.147303] usb 3-3: 2:1 Set sample rate 48000, clock 40
[49673.149667] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
[49673.149753] usb 3-3: Set up 12 URBS, ret=0
[49673.149759] usb 3-3: Setting usb interface 2:1 for EP 0x88
[49673.152046] usb 3-3: Starting data EP 0x88 (running 0)
[49673.152132] usb 3-3: 12 URBs submitted for EP 0x88
[49673.152140] usb 3-3: 2:1 Start Capture PCM
[49678.149591] usb 3-3: Stopping sync EP 0x84 (running 1)
[49678.149611] usb 3-3: Stopping data EP 0x8 (running 1)
[49678.149646] usb 3-3: 1:1 Stop Playback PCM
[49678.149723] usb 3-3: Closing EP 0x8 (count 1)
[49678.149726] usb 3-3: EP 0x8 closed
[49678.149728] usb 3-3: Closing EP 0x84 (count 1)
[49678.149730] usb 3-3: Setting usb interface 1:0 for EP 0x84
[49678.150382] usb 3-3: EP 0x84 closed
[49678.152669] usb 3-3: Stopping data EP 0x88 (running 1)
[49678.152730] usb 3-3: 2:1 Stop Capture PCM
[49678.154511] usb 3-3: Closing EP 0x88 (count 1)
[49678.154530] usb 3-3: Setting usb interface 2:0 for EP 0x88
[49678.154870] usb 3-3: EP 0x88 closed

[-- Attachment #3: dyndbg-implicit.txt --]
[-- Type: text/plain, Size: 8289 bytes --]

- dmesg output, 2022-01-14
- clock source workaround is present
- `IMPLICIT_FB_GENERIC_DEV(0x1397, 0x0507),` line under playback_implicit_fb_quirks in /sound/usb/implicit.c (doesn't really change the feedback mode as per previous attempt)
- modprobe snd_usb_audio dyndbg==p implicit_fb=1`
- implicit feedback and no stuttering, but had to switch the profiles many times in pavucontrol

[49984.668880] usb 3-3: USB disconnect, device number 22
[50016.322880] usbcore: deregistering interface driver snd-usb-audio
[50020.574773] usbcore: registered new interface driver snd-usb-audio
[50028.188416] usb 3-3: new high-speed USB device number 23 using xhci_hcd
[50028.315600] usb 3-3: config 1 has an invalid interface number: 5 but max is 3
[50028.315614] usb 3-3: config 1 has no interface number 3
[50028.317833] usb 3-3: New USB device found, idVendor=1397, idProduct=0507, bcdDevice= 1.00
[50028.317843] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[50028.317847] usb 3-3: Product: UMC202HD 192k
[50028.317850] usb 3-3: Manufacturer: BEHRINGER
[50028.317852] usb 3-3: SerialNumber: 12345678
[50028.322197] usb 3-3: 1:1: added playback implicit_fb sync_ep 88, iface 2:1
[50028.322216] usb 3-3: 1:1: add audio endpoint 0x8
[50028.322234] usb 3-3: Creating new data endpoint #8
[50028.322238] usb 3-3: Creating new data endpoint #88
[50028.322398] usb 3-3: 1:1 Set sample rate 192000, clock 40
[50028.327205] usb 3-3: 2:1: add audio endpoint 0x88
[50028.327935] usb 3-3: 2:1 Set sample rate 192000, clock 40
[50028.545091] usb 3-3: [10] FU [PCM Playback Switch] ch = 2, val = 0/1/1
[50028.545114] usb 3-3: [10] FU [PCM Playback Switch] ch = 1, val = 0/1/1
[50028.548309] usb 3-3: [10] FU [PCM Playback Volume] ch = 2, val = -32512/0/256
[50028.551652] usb 3-3: [10] FU [PCM Playback Volume] ch = 1, val = -32512/0/256
[50028.552073] usb 3-3: [11] FU [Mic Capture Switch] ch = 2, val = 0/1/1
[50028.552083] usb 3-3: [11] FU [Mic Capture Switch] ch = 1, val = 0/1/1
[50028.555339] usb 3-3: [11] FU [Mic Capture Volume] ch = 2, val = -32512/0/256
[50028.558568] usb 3-3: [11] FU [Mic Capture Volume] ch = 1, val = -32512/0/256
[50028.710395] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[50028.710407] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[50028.710415] usb 3-3: Setting usb interface 2:0 for EP 0x88
[50028.710861] usb 3-3: 2:1 Set sample rate 48000, clock 40
[50028.714375] usb 3-3: Setting params for data EP 0x88, pipe 0x41780
[50028.714396] usb 3-3: Set up 12 URBS, ret=0
[50028.714402] usb 3-3: Setting usb interface 2:1 for EP 0x88
[50028.720445] usb 3-3: Closing EP 0x88 (count 1)
[50028.720455] usb 3-3: Setting usb interface 2:0 for EP 0x88
[50028.720976] usb 3-3: EP 0x88 closed
[50028.722099] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[50028.722108] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[50028.722116] usb 3-3: Setting usb interface 2:0 for EP 0x88
[50028.722379] usb 3-3: 2:1 Set sample rate 48000, clock 40
[50028.936263] usb 3-3: Setting params for data EP 0x88, pipe 0x41780
[50028.936294] usb 3-3: Set up 12 URBS, ret=0
[50028.936298] usb 3-3: Setting usb interface 2:1 for EP 0x88
[50028.936837] usb 3-3: Closing EP 0x88 (count 1)
[50028.936843] usb 3-3: Setting usb interface 2:0 for EP 0x88
[50028.937092] usb 3-3: EP 0x88 closed
[50028.937931] usb 3-3: Open EP 0x8, iface=1:1, idx=0
[50028.937937] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=1
[50028.937942] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[50028.937945] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[50028.937949] usb 3-3: Setting usb interface 1:0 for EP 0x8
[50028.938093] usb 3-3: 1:1 Set sample rate 48000, clock 40
[50028.939161] usb 3-3: Setting params for data EP 0x8, pipe 0x41700
[50028.939181] usb 3-3: Set up 12 URBS, ret=0
[50028.939185] usb 3-3: Setting usb interface 1:1 for EP 0x8
[50028.939666] usb 3-3: Setting usb interface 2:0 for EP 0x88
[50028.939814] usb 3-3: 2:1 Set sample rate 48000, clock 40
[50028.940905] usb 3-3: Setting params for data EP 0x88, pipe 0x41780
[50028.940920] usb 3-3: Set up 12 URBS, ret=0
[50028.940924] usb 3-3: Setting usb interface 2:1 for EP 0x88
[50028.941203] usb 3-3: Starting data EP 0x8 (running 0)
[50028.941208] usb 3-3: No URB submission due to implicit fb sync
[50028.941212] usb 3-3: Starting data EP 0x88 (running 0)
[50028.941317] usb 3-3: 12 URBs submitted for EP 0x88
[50028.943332] usb 3-3: Reopened EP 0x88 (count 1)
[50028.943370] usb 3-3: Closing EP 0x88 (count 2)
[50028.943996] usb 3-3: Reopened EP 0x88 (count 1)
[50028.944018] usb 3-3: Stopping data EP 0x88 (running 1)
[50028.944075] usb 3-3: Stopping data EP 0x8 (running 1)
[50028.945259] usb 3-3: Closing EP 0x8 (count 1)
[50028.945268] usb 3-3: Setting usb interface 1:0 for EP 0x8
[50028.945597] usb 3-3: EP 0x8 closed
[50028.945601] usb 3-3: Closing EP 0x88 (count 2)
[50028.945661] usb 3-3: Closing EP 0x88 (count 1)
[50028.945665] usb 3-3: Setting usb interface 2:0 for EP 0x88
[50028.945918] usb 3-3: EP 0x88 closed
[50028.959559] usb 3-3: Open EP 0x8, iface=1:1, idx=0
[50028.959567] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=1
[50028.959572] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[50028.959575] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
[50028.959579] usb 3-3: Setting usb interface 1:0 for EP 0x8
[50028.959709] usb 3-3: 1:1 Set sample rate 48000, clock 40
[50028.960828] usb 3-3: Setting params for data EP 0x8, pipe 0x41700
[50028.960846] usb 3-3: Set up 12 URBS, ret=0
[50028.960851] usb 3-3: Setting usb interface 1:1 for EP 0x8
[50028.961210] usb 3-3: Setting usb interface 2:0 for EP 0x88
[50028.961386] usb 3-3: 2:1 Set sample rate 48000, clock 40
[50028.962494] usb 3-3: Setting params for data EP 0x88, pipe 0x41780
[50028.962510] usb 3-3: Set up 12 URBS, ret=0
[50028.962515] usb 3-3: Setting usb interface 2:1 for EP 0x88
[50028.962812] usb 3-3: Starting data EP 0x8 (running 0)
[50028.962821] usb 3-3: No URB submission due to implicit fb sync
[50028.962825] usb 3-3: Starting data EP 0x88 (running 0)
[50028.962926] usb 3-3: 12 URBs submitted for EP 0x88
[50028.963966] usb 3-3: Reopened EP 0x88 (count 1)
[50028.964002] usb 3-3: Closing EP 0x88 (count 2)
[50028.965081] usb 3-3: Reopened EP 0x88 (count 1)
[50028.965121] usb 3-3: Stopping data EP 0x88 (running 1)
[50028.965210] usb 3-3: Stopping data EP 0x8 (running 1)
[50028.967243] usb 3-3: Closing EP 0x8 (count 1)
[50028.967252] usb 3-3: Setting usb interface 1:0 for EP 0x8
[50028.967827] usb 3-3: EP 0x8 closed
[50028.967833] usb 3-3: Closing EP 0x88 (count 2)
[50028.967904] usb 3-3: Closing EP 0x88 (count 1)
[50028.967909] usb 3-3: Setting usb interface 2:0 for EP 0x88
[50028.968129] usb 3-3: EP 0x88 closed
[50028.977906] usb 3-3: Open EP 0x8, iface=1:1, idx=0
[50028.977932] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=384000, periods=2, implicit_fb=1
[50028.977941] usb 3-3: Open EP 0x88, iface=2:1, idx=0
[50028.977947] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=384000, periods=2, implicit_fb=0
[50028.977955] usb 3-3: Setting usb interface 1:0 for EP 0x8
[50028.978116] usb 3-3: 1:1 Set sample rate 48000, clock 40
[50028.979233] usb 3-3: Setting params for data EP 0x8, pipe 0x41700
[50028.979250] usb 3-3: Set up 12 URBS, ret=0
[50028.979257] usb 3-3: Setting usb interface 1:1 for EP 0x8
[50028.979630] usb 3-3: Setting usb interface 2:0 for EP 0x88
[50028.979811] usb 3-3: 2:1 Set sample rate 48000, clock 40
[50028.981603] usb 3-3: Setting params for data EP 0x88, pipe 0x41780
[50028.981621] usb 3-3: Set up 12 URBS, ret=0
[50028.981627] usb 3-3: Setting usb interface 2:1 for EP 0x88
[50028.982096] usb 3-3: Starting data EP 0x8 (running 0)
[50028.982104] usb 3-3: No URB submission due to implicit fb sync
[50028.982108] usb 3-3: Starting data EP 0x88 (running 0)
[50028.982202] usb 3-3: 12 URBs submitted for EP 0x88
[50028.984552] usb 3-3: 1:1 Start Playback PCM
[50028.985846] usb 3-3: Reopened EP 0x88 (count 1)
[50028.987265] usb 3-3: Starting data EP 0x88 (running 1)
[50028.987277] usb 3-3: 2:1 Start Capture PCM


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Behringer UMC202HD issues and a partial solution
  2022-01-14 13:39           ` Nandakumar Edamana
@ 2022-01-14 22:28             ` Geraldo Nascimento
       [not found]               ` <5fba3e63-6fd2-de1c-1564-ac6b8870e730@nandakumar.co.in>
  0 siblings, 1 reply; 11+ messages in thread
From: Geraldo Nascimento @ 2022-01-14 22:28 UTC (permalink / raw)
  To: Nandakumar Edamana; +Cc: alsa-devel

On Fri, Jan 14, 2022 at 07:09:29PM +0530, Nandakumar Edamana wrote:
> 
> > BOTH is a quirk for some BOSS devices and at least one Pioneer device,
> > don't worry I'm pretty sure your device doesn't need it.
> >
> > FIXED just means we specify the implicit fb sync ep hardcoded, which
> > is obviously a bit bad but it's there because generic matching
> > doesn't always work.
> 
> Thank you. This confirms my guess. Still no idea why the Scarlett workaround
> I saw somewhere uses the capture endpoint in playback_implicit_fb_quirks
> (I don't remember the details, but has copied the link; we can look at 
> it later
> if you are interested).

Hi Nandakumar,

That's the way implicit feedback works. The feedback for the playback
comes from the capture endpoint.

> 
> > Could you please provide the dyndbg of both working and non-working
> > cases (without implicit_fb=1)? The documentation for doing so is here
> > https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html
> >
> > Please set snd-usb-audio.dyndbg=+p either at boot time or via debugfs
> > before connecting your USB device, then plug it in.
> 
> PFA. I'm yet to figure out my way around debugfs, so I copied dmesg. Just
> noticed that `Creating new sync endpoint #84` is there when the module 
> is loaded
> without `implicit_fb=1`. Also, both capture and playback endpoints report
> `implicit_fb=0` in the log when the module is loaded without 
> `implicit_fb=1`,
> while there is a difference when the module is loaded with `implicit_fb=1`.

I've seen something similiar on Pioneer gear. We have to skip setting up
the sync ep on pcm.c automatically for the capture side.

Maybe I'm wrong but may I ask you to try the below patch? Keep the
"IMPLICIT_FB_GENERIC_DEV(0x1397, 0x0507)," line and "patch -up0 <
patch_name.patch" inside /usr/src/linux/sound/usb then recompile
snd-usb-audio.

Watch your dyndbg. Instead of sync_ep you should see implicit_fb
sync_ep even without passing implicit_fb=1 to modprobe... let's hope it
works. Please share your dyndbg results from dmesg.

By the way, I don't think your clock source workaround is needed if the
device works without it. If it's just a warning on dmesg and the device
still works without the workaround, then please drop the workaround.

Thank you,
Geraldo Nascimento

--- implicit.c	2022-01-14 16:41:53.946606013 -0300
+++ implicit.c	2022-01-14 19:20:39.079610555 -0300
@@ -377,6 +377,11 @@ static int audioformat_capture_quirk(str
 
 	if (is_pioneer_implicit_fb(chip, alts))
 		return 1; /* skip the quirk, also don't handle generic sync EP */
+		
+	if ((USB_ID_VENDOR(chip->usb_id) == 0x1397) &&
+	    (USB_ID_PRODUCT(chip->usb_id) == 0x0507))
+		return 1; /* skip the quirk, also don't handle generic sync EP */
+
 	return 0;
 }
 
> 
> Thank you,
> 
> -- 
> Nandakumar Edamana
> https://nandakumar.org
> 
> GPG Key: https://nandakumar.org/contact/gpgkey.asc
> GPG Key Fingerprint: BA6B 8FDE 644F F861 B638  3E2F 45D6 05FC 646A F75D

> - dmesg output, 2022-01-14
> - clock source workaround is present
> - `IMPLICIT_FB_GENERIC_DEV(0x1397, 0x0507),` line under playback_implicit_fb_quirks in /sound/usb/implicit.c (doesn't really change the feedback mode as per previous attempt)
> - `modprobe snd_usb_audio dyndbg==p` 
> - still non-implicit feedback and stuttering
> 
> [48731.161380] usb 3-3: USB disconnect, device number 19
> [48759.574239] usbcore: deregistering interface driver snd-usb-audio
> [48763.455999] usbcore: registered new interface driver snd-usb-audio
> [48774.731400] usb 3-3: new high-speed USB device number 20 using xhci_hcd
> [48774.858557] usb 3-3: config 1 has an invalid interface number: 5 but max is 3
> [48774.858574] usb 3-3: config 1 has no interface number 3
> [48774.859485] usb 3-3: New USB device found, idVendor=1397, idProduct=0507, bcdDevice= 1.00
> [48774.859515] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [48774.859531] usb 3-3: Product: UMC202HD 192k
> [48774.859543] usb 3-3: Manufacturer: BEHRINGER
> [48774.859551] usb 3-3: SerialNumber: 12345678
> [48875.327447] usb 3-3: USB disconnect, device number 20
> [48890.025235] usbcore: deregistering interface driver snd-usb-audio
> [48931.816944] usbcore: registered new interface driver snd-usb-audio
> [48937.230569] usb 3-3: new high-speed USB device number 21 using xhci_hcd
> [48937.357639] usb 3-3: config 1 has an invalid interface number: 5 but max is 3
> [48937.357656] usb 3-3: config 1 has no interface number 3
> [48937.358633] usb 3-3: New USB device found, idVendor=1397, idProduct=0507, bcdDevice= 1.00
> [48937.358651] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [48937.358658] usb 3-3: Product: UMC202HD 192k
> [48937.358664] usb 3-3: Manufacturer: BEHRINGER
> [48937.358670] usb 3-3: SerialNumber: 12345678
> [49625.890252] usb 3-3: USB disconnect, device number 21
> [49627.573706] usbcore: deregistering interface driver snd-usb-audio
> [49665.802565] usbcore: registered new interface driver snd-usb-audio
> [49672.560875] usb 3-3: new high-speed USB device number 22 using xhci_hcd
> [49672.687974] usb 3-3: config 1 has an invalid interface number: 5 but max is 3
> [49672.687991] usb 3-3: config 1 has no interface number 3
> [49672.689028] usb 3-3: New USB device found, idVendor=1397, idProduct=0507, bcdDevice= 1.00
> [49672.689050] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [49672.689062] usb 3-3: Product: UMC202HD 192k
> [49672.689070] usb 3-3: Manufacturer: BEHRINGER
> [49672.689077] usb 3-3: SerialNumber: 12345678
> [49672.692367] usb 3-3: 1:1: found sync_ep=0x84, iface=1, alt=1, implicit_fb=0
> [49672.692379] usb 3-3: 1:1: add audio endpoint 0x8
> [49672.692409] usb 3-3: Creating new data endpoint #8
> [49672.692417] usb 3-3: Creating new sync endpoint #84
> [49672.692611] usb 3-3: 1:1 Set sample rate 192000, clock 40
> [49672.696512] usb 3-3: 2:1: add audio endpoint 0x88
> [49672.696539] usb 3-3: Creating new data endpoint #88
> [49672.696803] usb 3-3: 2:1 Set sample rate 192000, clock 40
> [49672.700437] usb 3-3: [10] FU [PCM Playback Switch] ch = 2, val = 0/1/1
> [49672.700454] usb 3-3: [10] FU [PCM Playback Switch] ch = 1, val = 0/1/1
> [49672.703760] usb 3-3: [10] FU [PCM Playback Volume] ch = 2, val = -32512/0/256
> [49672.707047] usb 3-3: [10] FU [PCM Playback Volume] ch = 1, val = -32512/0/256
> [49672.707540] usb 3-3: [11] FU [Mic Capture Switch] ch = 2, val = 0/1/1
> [49672.707562] usb 3-3: [11] FU [Mic Capture Switch] ch = 1, val = 0/1/1
> [49672.710665] usb 3-3: [11] FU [Mic Capture Volume] ch = 2, val = -32512/0/256
> [49672.714037] usb 3-3: [11] FU [Mic Capture Volume] ch = 1, val = -32512/0/256
> [49672.862329] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [49672.862341] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [49672.862349] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49672.862668] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [49672.865988] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
> [49672.866010] usb 3-3: Set up 12 URBS, ret=0
> [49672.866016] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [49672.871524] usb 3-3: Closing EP 0x88 (count 1)
> [49672.871531] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49672.872783] usb 3-3: EP 0x88 closed
> [49672.873649] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [49672.873657] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [49672.873664] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49672.873937] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [49672.875980] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
> [49672.875992] usb 3-3: Set up 12 URBS, ret=0
> [49672.875996] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [49672.877285] usb 3-3: Closing EP 0x88 (count 1)
> [49672.877290] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49672.877669] usb 3-3: EP 0x88 closed
> [49672.878685] usb 3-3: Open EP 0x8, iface=1:1, idx=0
> [49672.878695] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [49672.878703] usb 3-3: Open EP 0x84, iface=1:1, idx=1
> [49672.878828] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [49672.878838] usb 3-3: Setting usb interface 1:0 for EP 0x8
> [49672.878968] usb 3-3: 1:1 Set sample rate 48000, clock 40
> [49672.880042] usb 3-3: Setting params for data EP 0x8, pipe 0x41600
> [49672.880062] usb 3-3: Set up 12 URBS, ret=0
> [49672.880068] usb 3-3: Setting usb interface 1:1 for EP 0x8
> [49672.880509] usb 3-3: Setting params for sync EP 0x84, pipe 0x21680
> [49672.880517] usb 3-3: Set up 4 URBS, ret=0
> [49672.883405] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [49672.883414] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [49672.883421] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49672.883605] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [49673.098932] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
> [49673.098958] usb 3-3: Set up 12 URBS, ret=0
> [49673.098966] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [49673.099360] usb 3-3: Closing EP 0x88 (count 1)
> [49673.099368] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49673.099743] usb 3-3: EP 0x88 closed
> [49673.101201] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [49673.101215] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [49673.101227] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49673.101383] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [49673.102494] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
> [49673.102505] usb 3-3: Set up 12 URBS, ret=0
> [49673.102508] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [49673.102892] usb 3-3: Closing EP 0x8 (count 1)
> [49673.102899] usb 3-3: EP 0x8 closed
> [49673.102903] usb 3-3: Closing EP 0x84 (count 1)
> [49673.102907] usb 3-3: Setting usb interface 1:0 for EP 0x84
> [49673.103270] usb 3-3: EP 0x84 closed
> [49673.103325] usb 3-3: Closing EP 0x88 (count 1)
> [49673.103330] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49673.103581] usb 3-3: EP 0x88 closed
> [49673.117689] usb 3-3: Open EP 0x8, iface=1:1, idx=0
> [49673.117709] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [49673.117716] usb 3-3: Open EP 0x84, iface=1:1, idx=1
> [49673.117722] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [49673.117728] usb 3-3: Setting usb interface 1:0 for EP 0x8
> [49673.117873] usb 3-3: 1:1 Set sample rate 48000, clock 40
> [49673.121046] usb 3-3: Setting params for data EP 0x8, pipe 0x41600
> [49673.121067] usb 3-3: Set up 12 URBS, ret=0
> [49673.121074] usb 3-3: Setting usb interface 1:1 for EP 0x8
> [49673.121433] usb 3-3: Setting params for sync EP 0x84, pipe 0x21680
> [49673.121443] usb 3-3: Set up 4 URBS, ret=0
> [49673.122892] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [49673.122903] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [49673.122913] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49673.123054] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [49673.124177] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
> [49673.124189] usb 3-3: Set up 12 URBS, ret=0
> [49673.124192] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [49673.124503] usb 3-3: Closing EP 0x88 (count 1)
> [49673.124508] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49673.124873] usb 3-3: EP 0x88 closed
> [49673.125726] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [49673.125733] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [49673.125739] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49673.125872] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [49673.126932] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
> [49673.126947] usb 3-3: Set up 12 URBS, ret=0
> [49673.126952] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [49673.127204] usb 3-3: Closing EP 0x8 (count 1)
> [49673.127208] usb 3-3: EP 0x8 closed
> [49673.127210] usb 3-3: Closing EP 0x84 (count 1)
> [49673.127212] usb 3-3: Setting usb interface 1:0 for EP 0x84
> [49673.127647] usb 3-3: EP 0x84 closed
> [49673.127724] usb 3-3: Closing EP 0x88 (count 1)
> [49673.127730] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49673.128017] usb 3-3: EP 0x88 closed
> [49673.141142] usb 3-3: Open EP 0x8, iface=1:1, idx=0
> [49673.141154] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=384000, periods=2, implicit_fb=0
> [49673.141161] usb 3-3: Open EP 0x84, iface=1:1, idx=1
> [49673.141168] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=384000, periods=2, implicit_fb=0
> [49673.141174] usb 3-3: Setting usb interface 1:0 for EP 0x8
> [49673.141334] usb 3-3: 1:1 Set sample rate 48000, clock 40
> [49673.142388] usb 3-3: Setting params for data EP 0x8, pipe 0x41600
> [49673.142399] usb 3-3: Set up 12 URBS, ret=0
> [49673.142402] usb 3-3: Setting usb interface 1:1 for EP 0x8
> [49673.142677] usb 3-3: Setting params for sync EP 0x84, pipe 0x21680
> [49673.142682] usb 3-3: Set up 4 URBS, ret=0
> [49673.144794] usb 3-3: Starting data EP 0x8 (running 0)
> [49673.144922] usb 3-3: 12 URBs submitted for EP 0x8
> [49673.144928] usb 3-3: Starting sync EP 0x84 (running 0)
> [49673.144952] usb 3-3: 4 URBs submitted for EP 0x84
> [49673.144957] usb 3-3: 1:1 Start Playback PCM
> [49673.147134] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [49673.147146] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=384000, periods=2, implicit_fb=0
> [49673.147154] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49673.147303] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [49673.149667] usb 3-3: Setting params for data EP 0x88, pipe 0x41680
> [49673.149753] usb 3-3: Set up 12 URBS, ret=0
> [49673.149759] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [49673.152046] usb 3-3: Starting data EP 0x88 (running 0)
> [49673.152132] usb 3-3: 12 URBs submitted for EP 0x88
> [49673.152140] usb 3-3: 2:1 Start Capture PCM
> [49678.149591] usb 3-3: Stopping sync EP 0x84 (running 1)
> [49678.149611] usb 3-3: Stopping data EP 0x8 (running 1)
> [49678.149646] usb 3-3: 1:1 Stop Playback PCM
> [49678.149723] usb 3-3: Closing EP 0x8 (count 1)
> [49678.149726] usb 3-3: EP 0x8 closed
> [49678.149728] usb 3-3: Closing EP 0x84 (count 1)
> [49678.149730] usb 3-3: Setting usb interface 1:0 for EP 0x84
> [49678.150382] usb 3-3: EP 0x84 closed
> [49678.152669] usb 3-3: Stopping data EP 0x88 (running 1)
> [49678.152730] usb 3-3: 2:1 Stop Capture PCM
> [49678.154511] usb 3-3: Closing EP 0x88 (count 1)
> [49678.154530] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [49678.154870] usb 3-3: EP 0x88 closed

> - dmesg output, 2022-01-14
> - clock source workaround is present
> - `IMPLICIT_FB_GENERIC_DEV(0x1397, 0x0507),` line under playback_implicit_fb_quirks in /sound/usb/implicit.c (doesn't really change the feedback mode as per previous attempt)
> - modprobe snd_usb_audio dyndbg==p implicit_fb=1`
> - implicit feedback and no stuttering, but had to switch the profiles many times in pavucontrol
> 
> [49984.668880] usb 3-3: USB disconnect, device number 22
> [50016.322880] usbcore: deregistering interface driver snd-usb-audio
> [50020.574773] usbcore: registered new interface driver snd-usb-audio
> [50028.188416] usb 3-3: new high-speed USB device number 23 using xhci_hcd
> [50028.315600] usb 3-3: config 1 has an invalid interface number: 5 but max is 3
> [50028.315614] usb 3-3: config 1 has no interface number 3
> [50028.317833] usb 3-3: New USB device found, idVendor=1397, idProduct=0507, bcdDevice= 1.00
> [50028.317843] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [50028.317847] usb 3-3: Product: UMC202HD 192k
> [50028.317850] usb 3-3: Manufacturer: BEHRINGER
> [50028.317852] usb 3-3: SerialNumber: 12345678
> [50028.322197] usb 3-3: 1:1: added playback implicit_fb sync_ep 88, iface 2:1
> [50028.322216] usb 3-3: 1:1: add audio endpoint 0x8
> [50028.322234] usb 3-3: Creating new data endpoint #8
> [50028.322238] usb 3-3: Creating new data endpoint #88
> [50028.322398] usb 3-3: 1:1 Set sample rate 192000, clock 40
> [50028.327205] usb 3-3: 2:1: add audio endpoint 0x88
> [50028.327935] usb 3-3: 2:1 Set sample rate 192000, clock 40
> [50028.545091] usb 3-3: [10] FU [PCM Playback Switch] ch = 2, val = 0/1/1
> [50028.545114] usb 3-3: [10] FU [PCM Playback Switch] ch = 1, val = 0/1/1
> [50028.548309] usb 3-3: [10] FU [PCM Playback Volume] ch = 2, val = -32512/0/256
> [50028.551652] usb 3-3: [10] FU [PCM Playback Volume] ch = 1, val = -32512/0/256
> [50028.552073] usb 3-3: [11] FU [Mic Capture Switch] ch = 2, val = 0/1/1
> [50028.552083] usb 3-3: [11] FU [Mic Capture Switch] ch = 1, val = 0/1/1
> [50028.555339] usb 3-3: [11] FU [Mic Capture Volume] ch = 2, val = -32512/0/256
> [50028.558568] usb 3-3: [11] FU [Mic Capture Volume] ch = 1, val = -32512/0/256
> [50028.710395] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [50028.710407] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [50028.710415] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [50028.710861] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [50028.714375] usb 3-3: Setting params for data EP 0x88, pipe 0x41780
> [50028.714396] usb 3-3: Set up 12 URBS, ret=0
> [50028.714402] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [50028.720445] usb 3-3: Closing EP 0x88 (count 1)
> [50028.720455] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [50028.720976] usb 3-3: EP 0x88 closed
> [50028.722099] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [50028.722108] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [50028.722116] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [50028.722379] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [50028.936263] usb 3-3: Setting params for data EP 0x88, pipe 0x41780
> [50028.936294] usb 3-3: Set up 12 URBS, ret=0
> [50028.936298] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [50028.936837] usb 3-3: Closing EP 0x88 (count 1)
> [50028.936843] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [50028.937092] usb 3-3: EP 0x88 closed
> [50028.937931] usb 3-3: Open EP 0x8, iface=1:1, idx=0
> [50028.937937] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=1
> [50028.937942] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [50028.937945] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [50028.937949] usb 3-3: Setting usb interface 1:0 for EP 0x8
> [50028.938093] usb 3-3: 1:1 Set sample rate 48000, clock 40
> [50028.939161] usb 3-3: Setting params for data EP 0x8, pipe 0x41700
> [50028.939181] usb 3-3: Set up 12 URBS, ret=0
> [50028.939185] usb 3-3: Setting usb interface 1:1 for EP 0x8
> [50028.939666] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [50028.939814] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [50028.940905] usb 3-3: Setting params for data EP 0x88, pipe 0x41780
> [50028.940920] usb 3-3: Set up 12 URBS, ret=0
> [50028.940924] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [50028.941203] usb 3-3: Starting data EP 0x8 (running 0)
> [50028.941208] usb 3-3: No URB submission due to implicit fb sync
> [50028.941212] usb 3-3: Starting data EP 0x88 (running 0)
> [50028.941317] usb 3-3: 12 URBs submitted for EP 0x88
> [50028.943332] usb 3-3: Reopened EP 0x88 (count 1)
> [50028.943370] usb 3-3: Closing EP 0x88 (count 2)
> [50028.943996] usb 3-3: Reopened EP 0x88 (count 1)
> [50028.944018] usb 3-3: Stopping data EP 0x88 (running 1)
> [50028.944075] usb 3-3: Stopping data EP 0x8 (running 1)
> [50028.945259] usb 3-3: Closing EP 0x8 (count 1)
> [50028.945268] usb 3-3: Setting usb interface 1:0 for EP 0x8
> [50028.945597] usb 3-3: EP 0x8 closed
> [50028.945601] usb 3-3: Closing EP 0x88 (count 2)
> [50028.945661] usb 3-3: Closing EP 0x88 (count 1)
> [50028.945665] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [50028.945918] usb 3-3: EP 0x88 closed
> [50028.959559] usb 3-3: Open EP 0x8, iface=1:1, idx=0
> [50028.959567] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=1
> [50028.959572] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [50028.959575] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=9600, periods=4, implicit_fb=0
> [50028.959579] usb 3-3: Setting usb interface 1:0 for EP 0x8
> [50028.959709] usb 3-3: 1:1 Set sample rate 48000, clock 40
> [50028.960828] usb 3-3: Setting params for data EP 0x8, pipe 0x41700
> [50028.960846] usb 3-3: Set up 12 URBS, ret=0
> [50028.960851] usb 3-3: Setting usb interface 1:1 for EP 0x8
> [50028.961210] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [50028.961386] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [50028.962494] usb 3-3: Setting params for data EP 0x88, pipe 0x41780
> [50028.962510] usb 3-3: Set up 12 URBS, ret=0
> [50028.962515] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [50028.962812] usb 3-3: Starting data EP 0x8 (running 0)
> [50028.962821] usb 3-3: No URB submission due to implicit fb sync
> [50028.962825] usb 3-3: Starting data EP 0x88 (running 0)
	> [50028.962926] usb 3-3: 12 URBs submitted for EP 0x88
> [50028.963966] usb 3-3: Reopened EP 0x88 (count 1)
> [50028.964002] usb 3-3: Closing EP 0x88 (count 2)
> [50028.965081] usb 3-3: Reopened EP 0x88 (count 1)
> [50028.965121] usb 3-3: Stopping data EP 0x88 (running 1)
> [50028.965210] usb 3-3: Stopping data EP 0x8 (running 1)
> [50028.967243] usb 3-3: Closing EP 0x8 (count 1)
> [50028.967252] usb 3-3: Setting usb interface 1:0 for EP 0x8
> [50028.967827] usb 3-3: EP 0x8 closed
> [50028.967833] usb 3-3: Closing EP 0x88 (count 2)
> [50028.967904] usb 3-3: Closing EP 0x88 (count 1)
> [50028.967909] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [50028.968129] usb 3-3: EP 0x88 closed
> [50028.977906] usb 3-3: Open EP 0x8, iface=1:1, idx=0
> [50028.977932] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=384000, periods=2, implicit_fb=1
> [50028.977941] usb 3-3: Open EP 0x88, iface=2:1, idx=0
> [50028.977947] usb 3-3:   channels=2, rate=48000, format=S32_LE, period_bytes=384000, periods=2, implicit_fb=0
> [50028.977955] usb 3-3: Setting usb interface 1:0 for EP 0x8
> [50028.978116] usb 3-3: 1:1 Set sample rate 48000, clock 40
> [50028.979233] usb 3-3: Setting params for data EP 0x8, pipe 0x41700
> [50028.979250] usb 3-3: Set up 12 URBS, ret=0
> [50028.979257] usb 3-3: Setting usb interface 1:1 for EP 0x8
> [50028.979630] usb 3-3: Setting usb interface 2:0 for EP 0x88
> [50028.979811] usb 3-3: 2:1 Set sample rate 48000, clock 40
> [50028.981603] usb 3-3: Setting params for data EP 0x88, pipe 0x41780
> [50028.981621] usb 3-3: Set up 12 URBS, ret=0
> [50028.981627] usb 3-3: Setting usb interface 2:1 for EP 0x88
> [50028.982096] usb 3-3: Starting data EP 0x8 (running 0)
> [50028.982104] usb 3-3: No URB submission due to implicit fb sync
> [50028.982108] usb 3-3: Starting data EP 0x88 (running 0)
> [50028.982202] usb 3-3: 12 URBs submitted for EP 0x88
> [50028.984552] usb 3-3: 1:1 Start Playback PCM
> [50028.985846] usb 3-3: Reopened EP 0x88 (count 1)
> [50028.987265] usb 3-3: Starting data EP 0x88 (running 1)
> [50028.987277] usb 3-3: 2:1 Start Capture PCM
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Behringer UMC202HD issues and a partial solution
       [not found]               ` <5fba3e63-6fd2-de1c-1564-ac6b8870e730@nandakumar.co.in>
@ 2022-01-16  1:00                 ` Geraldo Nascimento
  2022-01-18 11:20                   ` Nandakumar Edamana
  0 siblings, 1 reply; 11+ messages in thread
From: Geraldo Nascimento @ 2022-01-16  1:00 UTC (permalink / raw)
  To: Nandakumar Edamana; +Cc: ALSA-devel

On Sat, Jan 15, 2022 at 12:29:18PM +0530, Nandakumar Edamana wrote:
> Could compile and reload the module successfully, but the stuttering is 
> still there.

Hi Nandakumar,

OK, my mistake, scratch that patch.

The codepath that activates Implicit Feedback when implicit_fb=1 is
passed to the module as an option is the same that should activate when
the quirk is in place.

Like I said, it's very strange that your device skips implicit feedback
when the quirk is in place, but can pick implicit feedback when
implicit_fb=1 is passed to the module as an option.

I've prepared some printk's hooked up to every codepath I can think of
that will skip implicit feedback. Please test and share your results,
always with dyndbg on.

--- implicit.c	2022-01-14 16:41:53.946606013 -0300
+++ implicit.c	2022-01-15 21:45:15.108655890 -0300
@@ -90,8 +90,10 @@ static int add_implicit_fb_sync_ep(struc
 
 	if (!alts) {
 		iface = usb_ifnum_to_if(chip->dev, ifnum);
-		if (!iface || iface->num_altsetting < 2)
+		if (!iface || iface->num_altsetting < 2) {
+			printk(KERN_WARNING "implicit: add_implicit_fb_sync_ep(): not a usb_host_interface or less than 2 altsettings");
 			return 0;
+		}
 		alts = &iface->altsetting[1];
 	}
 
@@ -242,17 +244,23 @@ static int __add_generic_implicit_fb(str
 	struct usb_endpoint_descriptor *epd;
 
 	alts = snd_usb_get_host_interface(chip, iface, altset);
-	if (!alts)
+	if (!alts) {
+		printk(KERN_WARNING "implicit: __add_generic_implicit_fb(): not a usb_host_interface");
 		return 0;
+	}
 
 	if ((alts->desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC &&
 	     alts->desc.bInterfaceClass != USB_CLASS_AUDIO) ||
-	    alts->desc.bNumEndpoints < 1)
+	    alts->desc.bNumEndpoints < 1) {
+		printk(KERN_WARNING "implicit: __add_generic_implicit_fb(): no endpoints or wrong Interface Class");
 		return 0;
+	}
 	epd = get_endpoint(alts, 0);
 	if (!usb_endpoint_is_isoc_in(epd) ||
-	    (epd->bmAttributes & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC)
+	    (epd->bmAttributes & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC) {
+		printk(KERN_WARNING "implicit: __add_generic_implicit_fb(): not Isochronous IN or not Asynchronous");
 		return 0;
+	}
 	return add_implicit_fb_sync_ep(chip, fmt, epd->bEndpointAddress, 0,
 				       iface, alts);
 }
@@ -262,8 +270,10 @@ static int add_generic_implicit_fb(struc
 				   struct audioformat *fmt,
 				   struct usb_host_interface *alts)
 {
-	if ((fmt->ep_attr & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC)
+	if ((fmt->ep_attr & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC) {
+		printk(KERN_WARNING "implicit: add_generic_implicit_fb(): not Asynchronous");
 		return 0;
+	}
 
 	if (__add_generic_implicit_fb(chip, fmt,
 				      alts->desc.bInterfaceNumber + 1,
@@ -302,8 +312,10 @@ static int audioformat_implicit_fb_quirk
 	if (p) {
 		switch (p->type) {
 		case IMPLICIT_FB_GENERIC:
+			printk(KERN_WARNING "implicit: audioformat_implicit_fb_quirk(): matched GENERIC inside playback_implicit_fb_quirks[]");
 			return add_generic_implicit_fb(chip, fmt, alts);
 		case IMPLICIT_FB_NONE:
+			printk(KERN_WARNING "implicit: audioformat_implicit_fb_quirk(): matched SKIP_DEV inside playback_implicit_fb_quirks[]");
 			return 0; /* No quirk */
 		case IMPLICIT_FB_FIXED:
 			return add_implicit_fb_sync_ep(chip, fmt, p->ep_num, 0,
@@ -311,6 +323,10 @@ static int audioformat_implicit_fb_quirk
 		}
 	}
 
+	else {
+		printk(KERN_WARNING "implicit: audioformat_implicit_fb_quirk(): no matches found inside playback_implicit_fb_quirks[]");
+	}
+
 	/* Special handling for devices with capture quirks */
 	p = find_implicit_fb_entry(chip, capture_implicit_fb_quirks, alts);
 	if (p) {
@@ -354,6 +370,7 @@ static int audioformat_implicit_fb_quirk
 		return add_generic_implicit_fb(chip, fmt, alts);
 
 	/* No quirk */
+	printk(KERN_WARNING "implicit: audioformat_implicit_fb_quirk(): returning 0 because no quirk was found");
 	return 0;
 }
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Behringer UMC202HD issues and a partial solution
  2022-01-16  1:00                 ` Geraldo Nascimento
@ 2022-01-18 11:20                   ` Nandakumar Edamana
  2022-01-18 19:20                     ` Geraldo Nascimento
  0 siblings, 1 reply; 11+ messages in thread
From: Nandakumar Edamana @ 2022-01-18 11:20 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel

I feel like I'm doing something wrong with the build and install 
process. Maybe it's been the case for the last couple of days, in which 
case I'm terribly sorry for the incorrect test results.

The problem is, I don't get any printk() outputs at all. I'd given `echo 
"7" > /proc/sys/kernel/printk`, and I even added a usb_audio_dbg() line, 
which didn't get printed either.

Then I saw this:

$ find /lib/modules/ -name 'snd-usb-audio.ko'|xargs ls
...
/lib/modules/5.15.13/extra/usb/snd-usb-audio.ko
/lib/modules/5.15.13/kernel/sound/usb/snd-usb-audio.ko
...

modprobe is using the kernel/ version while my commands were installing 
the extra/ version.

Then I used the following, which also installed the extra/ version:
sudo make -C /lib/modules/5.15.13/build M=sound modules_install

Are these two versions supposed to exist? What is the solution? Telling 
the kernel build system to choose the correct location or configuring 
modprobe or depmod or something? I tried to look it up, but didn't find 
any official recommendation.

Anyway, I ran this:

# Because I have space constraints
# find /lib/modules/5.15.13/ -name '*.ko' -exec strip --strip-unneeded {} +
# update-initramfs -u -k 5.15.13

That updated the extra/ version of snd-usb-audio. But even after a 
reboot, this is what I get:

# modprobe -r -v snd-usb-audio
rmmod snd_usb_audio
rmmod snd_usbmidi_lib
# modprobe -v snd_usb_audio dyndbg==p
insmod /lib/modules/5.15.13/kernel/sound/usb/snd-usbmidi-lib.ko
insmod /lib/modules/5.15.13/kernel/sound/usb/snd-usb-audio.ko index=-2 
index=-2 index=-2 dyndbg==p
# dmesg |grep 'implicit:'

Another thing is, even though I'd commented out my clock workaround, I'm 
not getting any clock-related warning at all (I'm sure those went away 
after I edited clock.c, and then performed a build+install).

-- 
Nandakumar Edamana
https://nandakumar.org


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Behringer UMC202HD issues and a partial solution
  2022-01-18 11:20                   ` Nandakumar Edamana
@ 2022-01-18 19:20                     ` Geraldo Nascimento
  0 siblings, 0 replies; 11+ messages in thread
From: Geraldo Nascimento @ 2022-01-18 19:20 UTC (permalink / raw)
  To: Nandakumar Edamana; +Cc: alsa-devel

On Tue, Jan 18, 2022 at 04:50:12PM +0530, Nandakumar Edamana wrote:
> I feel like I'm doing something wrong with the build and install 
> process. Maybe it's been the case for the last couple of days, in which 
> case I'm terribly sorry for the incorrect test results.
> 
> The problem is, I don't get any printk() outputs at all. I'd given `echo 
> "7" > /proc/sys/kernel/printk`, and I even added a usb_audio_dbg() line, 
> which didn't get printed either.
> 
> Then I saw this:
> 
> $ find /lib/modules/ -name 'snd-usb-audio.ko'|xargs ls
> ...
> /lib/modules/5.15.13/extra/usb/snd-usb-audio.ko
> /lib/modules/5.15.13/kernel/sound/usb/snd-usb-audio.ko
> ...
> 
> modprobe is using the kernel/ version while my commands were installing 
> the extra/ version.
> 
> Then I used the following, which also installed the extra/ version:
> sudo make -C /lib/modules/5.15.13/build M=sound modules_install
> 
> Are these two versions supposed to exist? What is the solution? Telling 
> the kernel build system to choose the correct location or configuring 
> modprobe or depmod or something? I tried to look it up, but didn't find 
> any official recommendation.

Yes, it will install on extra/ if you are building with the M=sound/usb
option. I guess the 'official' solution is to use the INSTALL_MOD_PATH
environment variable.

But what I do instead is I overwrite
/lib/modules/<kernel_version>/kernel/sound/usb/snd-usb-audio.ko with the newly
built one, and then I run depmod.

> 
> Anyway, I ran this:
> 
> # Because I have space constraints
> # find /lib/modules/5.15.13/ -name '*.ko' -exec strip --strip-unneeded {} +
> # update-initramfs -u -k 5.15.13
> 
> That updated the extra/ version of snd-usb-audio. But even after a 
> reboot, this is what I get:
> 
> # modprobe -r -v snd-usb-audio
> rmmod snd_usb_audio
> rmmod snd_usbmidi_lib
> # modprobe -v snd_usb_audio dyndbg==p
> insmod /lib/modules/5.15.13/kernel/sound/usb/snd-usbmidi-lib.ko
> insmod /lib/modules/5.15.13/kernel/sound/usb/snd-usb-audio.ko index=-2
> index=-2 index=-2 dyndbg==p
> # dmesg |grep 'implicit:'
> 
> Another thing is, even though I'd commented out my clock workaround, I'm 
> not getting any clock-related warning at all (I'm sure those went away 
> after I edited clock.c, and then performed a build+install).

I noticed that on your dmesg logs, that the warning was nowhere to be
found.

Thank you,
Geraldo Nascimento

> 
> -- 
> Nandakumar Edamana
> https://nandakumar.org
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-01-18 19:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 14:37 Behringer UMC202HD issues and a partial solution Nandakumar Edamana
2022-01-13 19:00 ` Geraldo Nascimento
2022-01-14  2:34   ` Nandakumar Edamana
2022-01-14  3:41     ` Geraldo Nascimento
2022-01-14  4:36       ` Nandakumar Edamana
2022-01-14  7:44         ` Geraldo Nascimento
2022-01-14 13:39           ` Nandakumar Edamana
2022-01-14 22:28             ` Geraldo Nascimento
     [not found]               ` <5fba3e63-6fd2-de1c-1564-ac6b8870e730@nandakumar.co.in>
2022-01-16  1:00                 ` Geraldo Nascimento
2022-01-18 11:20                   ` Nandakumar Edamana
2022-01-18 19:20                     ` Geraldo Nascimento

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.