alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Geraldo Nascimento <geraldogabriel@gmail.com>
To: Nandakumar Edamana <nandakumar@nandakumar.co.in>
Cc: alsa-devel@alsa-project.org
Subject: Re: Behringer UMC202HD issues and a partial solution
Date: Fri, 14 Jan 2022 04:44:39 -0300	[thread overview]
Message-ID: <YeEp5xUjf1DAeGTY@geday> (raw)
In-Reply-To: <e30962b0-931c-83b4-12fb-aa5e377b4f4d@nandakumar.co.in>

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
> 

  reply	other threads:[~2022-01-14  7:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YeEp5xUjf1DAeGTY@geday \
    --to=geraldogabriel@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=nandakumar@nandakumar.co.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).