mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Geraldo Nascimento <geraldogabriel@gmail.com>
Cc: Hanh Kieu <hhkieu@gmail.com>,
	perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: add Pioneer DJ DDJ-SZ support
Date: Mon, 07 Sep 2026 09:56:53 +0200	[thread overview]
Message-ID: <87pkyp335m.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAEsQvcsG_Q2uZQ8Q_MBhUyhY+n4HymMsuowSHfk-CHCBj6mbzQ@mail.gmail.com>

On Sat, 05 Sep 2026 08:19:37 +0200,
Geraldo Nascimento wrote:
> 
> On Sat, Sep 5, 2026 at 2:35 AM Hanh Kieu <hhkieu@gmail.com> wrote:
> >
> > Hi Geraldo,
> >
> > I looked further into the is_pioneer_implicit_fb() check you pointed out.
> >
> > It seems the DATA case is intentional. In the original Pioneer DJM-900NXS2 work, Fabian Lesniak described the observed behavior as:
> >
> > “the playback streams also tries to start the capture endpoint as sync source.”
> >
> > https://gist.github.com/flesniak/074ab23bbc833663b782f44174eae6a4
> >
> > Takashi Iwai later formalized this in the Pioneer implicit-feedback handling, explicitly accepting either USB_ENDPOINT_USAGE_DATA or USB_ENDPOINT_USAGE_IMPLICIT_FB for the secondary IN endpoint before passing it to add_implicit_fb_sync_ep():
> >
> > https://github.com/torvalds/linux/commit/167c9dc84ec384c0940359e067301883ad2b42a8
> >
> 
> Every other Pioneer device has that USB_ENDPOINT_USAGE_IMPLICIT_FB
> on the IN endpoint. Yours would be the first without it in the IN
> endpoint. Unless
> your hardware doesn't rely on implicit feedback for syncing then there's a good
> chance that implicit.c short-circuiting and still picking up implicit
> feedback for you
> isn't correct, but what you need to do is cool down now and wait for proper
> maintainer response which takes time.

Accepting both DATA and IMPLICIT_FB usages is intentional, yes.
But I don't follow what's the problem there -- in this case, the
bmAttributes of the secondary EP shows it's DATA, no?  Then this check
must pass.

The condition is:

	if (!usb_endpoint_is_isoc_in(epd) ||
	    (epd->bmAttributes & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC ||
	    ((epd->bmAttributes & USB_ENDPOINT_USAGE_MASK) !=
	     USB_ENDPOINT_USAGE_DATA &&
	     (epd->bmAttributes & USB_ENDPOINT_USAGE_MASK) !=
	     USB_ENDPOINT_USAGE_IMPLICIT_FB))
		return false;

	return false;

... and maybe it's better to be rewritten like:

	sync = (epd->bmAttributes & USB_ENDPOINT_SYNCTYPE);
	usage = (epd->bmAttributes & USB_ENDPOINT_USAGE_MASK);

	if (usb_endpoint_is_isoc_in(epd) &&
	    sync == USB_ENDPOINT_SYNC_ASYNC &&
	    (usage == USB_ENDPOINT_USAGE_DATA ||
	     usage == USB_ENDPOINT_USAGE_IMPLICIT_FB))
		return true;

	return false;

So it should return true.
Please double-check which test actually fails.


thanks,

Takashi

  reply	other threads:[~2026-09-07  7:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 23:16 Hanh Kieu
2026-09-04  3:59 ` Geraldo Nascimento
2026-09-04 18:20   ` Hanh Kieu
2026-09-05  3:30     ` Geraldo Nascimento
     [not found]       ` <CAEWo5SpV6eyHo-tn+hKX4s98uCjGJg5Dz9fMkoWNDNqgofJ5og@mail.gmail.com>
2026-09-05  6:19         ` Geraldo Nascimento
2026-09-07  7:56           ` Takashi Iwai [this message]
2026-09-07 23:47             ` Geraldo Nascimento
2026-09-08  6:32               ` Takashi Iwai

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=87pkyp335m.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=geraldogabriel@gmail.com \
    --cc=hhkieu@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /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

all inboxes | Powered by JetHome®