Behringer UMC202HD issues and a partial solution
Geraldo Nascimento
geraldogabriel at gmail.com
Sun Jan 16 02:00:58 CET 2022
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;
}
More information about the Alsa-devel
mailing list