All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] ALSA: usb-audio: generic implicit fb parser fails with M-Audio FastTrack Ultra
@ 2022-02-11 22:49 Matteo Martelli
  2022-02-11 22:49 ` [PATCH 1/1] ALSA: usb-audio: revert to IMPLICIT_FB_FIXED_DEV for " Matteo Martelli
  0 siblings, 1 reply; 4+ messages in thread
From: Matteo Martelli @ 2022-02-11 22:49 UTC (permalink / raw)
  To: Takashi Iwai, Jaroslav Kysela; +Cc: alsa-devel, linux-kernel, Matteo Martelli

Hello, I've recently started to experience periodic XRUNs with my M-Audio
FastTrack Ultra while using JACK.
The XRUNs come systematically at precise intervals, where the period
varies from around 1 min to 6 min depending on the jackd buffer settings.
I found out that issue is reproducible since commit
83b7dcbc51c930fc2079ab6c6fc9d719768321f1.

It looks like the problem is in the add_generic_implicit_fb() function
where (fmt->ep_attr & USB_ENDPOINT_SYNCTYPE) is USB_ENDPOINT_SYNC_ADAPTIVE
instead of the expected USB_ENDPOINT_SYNC_ASYNC. This leads to the
failure of the snd_usb_parse_implicit_fb_quirk(), so I guess the
implicit feedback feature is not used at all, resulting to periodic
XRUNs. However, by retrieving the endpoint descriptor with the
get_endpoint(alts, 0) macro, the endpoint mbAttributes are correct and
match the USB_ENDPOINT_SYNC_ASYNC sync type. Also, the attributes
printed by lsusb are again correct showing the "Asynchronous" type.
In fact, the sync type is set to adaptive for the M-Audio FastTrack
Ultra in the quirks-table.h header file. This was done by the commit
65f04443c96dbda11b8fff21d6390e082846aa3c to work around a playback
issue.

I tested my 0x2080 device with the 5.17-rc1, 5.16, 5.11-rc1, 5.10.
The issue is reproducible with all of them except for the 5.10 where the
implicit feedback was still declared as "fixed".
I also had the chance to have the 0x2081 device tested with kernel
5.16, same issue there.
The following patch is to revert the implicit feedback to "fixed" for the
M-Audio FastTrack Ultra cards until the issue is not entirely covered.

Matteo Martelli (1):
  ALSA: usb-audio: revert to IMPLICIT_FB_FIXED_DEV for M-Audio FastTrack
    Ultra

 sound/usb/implicit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.35.1


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

* [PATCH 1/1] ALSA: usb-audio: revert to IMPLICIT_FB_FIXED_DEV for M-Audio FastTrack Ultra
  2022-02-11 22:49 [PATCH 0/1] ALSA: usb-audio: generic implicit fb parser fails with M-Audio FastTrack Ultra Matteo Martelli
@ 2022-02-11 22:49 ` Matteo Martelli
  2022-02-14  8:45     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Matteo Martelli @ 2022-02-11 22:49 UTC (permalink / raw)
  To: Takashi Iwai, Jaroslav Kysela; +Cc: alsa-devel, linux-kernel, Matteo Martelli

Commit 83b7dcbc51c930fc2079ab6c6fc9d719768321f1 introduced a generic
implicit feedback parser, which fails to execute for M-Audio FastTrack
Ultra sound cards. The issue is with the ENDPOINT_SYNCTYPE check in
add_generic_implicit_fb() where the SYNCTYPE is ADAPTIVE instead of ASYNC.
The reason is that the sync type of the FastTrack output endpoints are
set to adaptive in the quirks table since commit
65f04443c96dbda11b8fff21d6390e082846aa3c.

Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com>
---
 sound/usb/implicit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/usb/implicit.c b/sound/usb/implicit.c
index 70319c822c10..2d444ec74202 100644
--- a/sound/usb/implicit.c
+++ b/sound/usb/implicit.c
@@ -47,13 +47,13 @@ struct snd_usb_implicit_fb_match {
 static const struct snd_usb_implicit_fb_match playback_implicit_fb_quirks[] = {
 	/* Generic matching */
 	IMPLICIT_FB_GENERIC_DEV(0x0499, 0x1509), /* Steinberg UR22 */
-	IMPLICIT_FB_GENERIC_DEV(0x0763, 0x2080), /* M-Audio FastTrack Ultra */
-	IMPLICIT_FB_GENERIC_DEV(0x0763, 0x2081), /* M-Audio FastTrack Ultra */
 	IMPLICIT_FB_GENERIC_DEV(0x0763, 0x2030), /* M-Audio Fast Track C400 */
 	IMPLICIT_FB_GENERIC_DEV(0x0763, 0x2031), /* M-Audio Fast Track C600 */
 
 	/* Fixed EP */
 	/* FIXME: check the availability of generic matching */
+	IMPLICIT_FB_FIXED_DEV(0x0763, 0x2080, 0x81, 2), /* M-Audio FastTrack Ultra */
+	IMPLICIT_FB_FIXED_DEV(0x0763, 0x2081, 0x81, 2), /* M-Audio FastTrack Ultra */
 	IMPLICIT_FB_FIXED_DEV(0x2466, 0x8010, 0x81, 2), /* Fractal Audio Axe-Fx III */
 	IMPLICIT_FB_FIXED_DEV(0x31e9, 0x0001, 0x81, 2), /* Solid State Logic SSL2 */
 	IMPLICIT_FB_FIXED_DEV(0x31e9, 0x0002, 0x81, 2), /* Solid State Logic SSL2+ */
-- 
2.35.1


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

* Re: [PATCH 1/1] ALSA: usb-audio: revert to IMPLICIT_FB_FIXED_DEV for M-Audio FastTrack Ultra
  2022-02-11 22:49 ` [PATCH 1/1] ALSA: usb-audio: revert to IMPLICIT_FB_FIXED_DEV for " Matteo Martelli
@ 2022-02-14  8:45     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-02-14  8:45 UTC (permalink / raw)
  To: Matteo Martelli; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel

On Fri, 11 Feb 2022 23:49:13 +0100,
Matteo Martelli wrote:
> 
> Commit 83b7dcbc51c930fc2079ab6c6fc9d719768321f1 introduced a generic
> implicit feedback parser, which fails to execute for M-Audio FastTrack
> Ultra sound cards. The issue is with the ENDPOINT_SYNCTYPE check in
> add_generic_implicit_fb() where the SYNCTYPE is ADAPTIVE instead of ASYNC.
> The reason is that the sync type of the FastTrack output endpoints are
> set to adaptive in the quirks table since commit
> 65f04443c96dbda11b8fff21d6390e082846aa3c.
> 
> Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com>

Thanks, applied now.


Takashi

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

* Re: [PATCH 1/1] ALSA: usb-audio: revert to IMPLICIT_FB_FIXED_DEV for M-Audio FastTrack Ultra
@ 2022-02-14  8:45     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-02-14  8:45 UTC (permalink / raw)
  To: Matteo Martelli; +Cc: alsa-devel, linux-kernel

On Fri, 11 Feb 2022 23:49:13 +0100,
Matteo Martelli wrote:
> 
> Commit 83b7dcbc51c930fc2079ab6c6fc9d719768321f1 introduced a generic
> implicit feedback parser, which fails to execute for M-Audio FastTrack
> Ultra sound cards. The issue is with the ENDPOINT_SYNCTYPE check in
> add_generic_implicit_fb() where the SYNCTYPE is ADAPTIVE instead of ASYNC.
> The reason is that the sync type of the FastTrack output endpoints are
> set to adaptive in the quirks table since commit
> 65f04443c96dbda11b8fff21d6390e082846aa3c.
> 
> Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com>

Thanks, applied now.


Takashi

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

end of thread, other threads:[~2022-02-14  8:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 22:49 [PATCH 0/1] ALSA: usb-audio: generic implicit fb parser fails with M-Audio FastTrack Ultra Matteo Martelli
2022-02-11 22:49 ` [PATCH 1/1] ALSA: usb-audio: revert to IMPLICIT_FB_FIXED_DEV for " Matteo Martelli
2022-02-14  8:45   ` Takashi Iwai
2022-02-14  8:45     ` Takashi Iwai

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.