All of lore.kernel.org
 help / color / mirror / Atom feed
* Implicit feedback on BOSS GT-1, the saga continues...
@ 2021-04-07 19:54 Mike Oliphant
  2021-04-07 20:08 ` Geraldo Nascimento
  0 siblings, 1 reply; 48+ messages in thread
From: Mike Oliphant @ 2021-04-07 19:54 UTC (permalink / raw)
  To: alsa-devel

I had thought that the recent implicit feedback changes were fully working
on the BOSS GT-1, but it turns out that I just hadn't tested well enough.

Audio playback and capture works, but with periodic dropouts. I get the
exact same behavior as I did with the quirk to completely disable implicit
feedback. Without the implicit feedback, you get dropouts from clock drift
- how bad probably varies from card to card. On mine it is every second or
so.

If I switch playback feedback for the GT-1 to generic by doing
"IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old behavior,
which is that playback completely fails to start.

With generic playback feedback, and using my previous patch to endpoint.c
to avoid playback waiting on capture mentioned here:

https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html

playback and capture work perfectly for me.

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-07 19:54 Implicit feedback on BOSS GT-1, the saga continues Mike Oliphant
@ 2021-04-07 20:08 ` Geraldo Nascimento
  2021-04-07 20:16   ` Mike Oliphant
  2021-04-07 20:18   ` Lucas
  0 siblings, 2 replies; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-07 20:08 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: alsa-devel

Hey Mike, did you catch the latest patch by Takashi Iwai for capture quirky
devices?

You can find it here:
https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/

Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <oliphant@nostatic.org>
escreveu:

> I had thought that the recent implicit feedback changes were fully working
> on the BOSS GT-1, but it turns out that I just hadn't tested well enough.
>
> Audio playback and capture works, but with periodic dropouts. I get the
> exact same behavior as I did with the quirk to completely disable implicit
> feedback. Without the implicit feedback, you get dropouts from clock drift
> - how bad probably varies from card to card. On mine it is every second or
> so.
>
> If I switch playback feedback for the GT-1 to generic by doing
> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old behavior,
> which is that playback completely fails to start.
>
> With generic playback feedback, and using my previous patch to endpoint.c
> to avoid playback waiting on capture mentioned here:
>
>
> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>
> playback and capture work perfectly for me.
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-07 20:08 ` Geraldo Nascimento
@ 2021-04-07 20:16   ` Mike Oliphant
  2021-04-07 20:35     ` Geraldo Nascimento
  2021-04-07 20:18   ` Lucas
  1 sibling, 1 reply; 48+ messages in thread
From: Mike Oliphant @ 2021-04-07 20:16 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel

Hi Geraldo - I don't have that patch applied, but it shouldn't make any
behavioral difference - it just seems to be simplifying the code.

The issue is that the BOSS GT-1 *does* need implicit feedback on playback
to avoid clock timing issues, and the current behavior is disabling that
feedback.

Mike

On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <geraldogabriel@gmail.com>
wrote:

> Hey Mike, did you catch the latest patch by Takashi Iwai for capture
> quirky devices?
>
> You can find it here:
> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>
> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <oliphant@nostatic.org>
> escreveu:
>
>> I had thought that the recent implicit feedback changes were fully working
>> on the BOSS GT-1, but it turns out that I just hadn't tested well enough.
>>
>> Audio playback and capture works, but with periodic dropouts. I get the
>> exact same behavior as I did with the quirk to completely disable implicit
>> feedback. Without the implicit feedback, you get dropouts from clock drift
>> - how bad probably varies from card to card. On mine it is every second or
>> so.
>>
>> If I switch playback feedback for the GT-1 to generic by doing
>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old
>> behavior,
>> which is that playback completely fails to start.
>>
>> With generic playback feedback, and using my previous patch to endpoint.c
>> to avoid playback waiting on capture mentioned here:
>>
>>
>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>
>> playback and capture work perfectly for me.
>>
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-07 20:08 ` Geraldo Nascimento
  2021-04-07 20:16   ` Mike Oliphant
@ 2021-04-07 20:18   ` Lucas
  2021-04-07 20:23     ` Lucas
  2021-04-07 20:24     ` Mike Oliphant
  1 sibling, 2 replies; 48+ messages in thread
From: Lucas @ 2021-04-07 20:18 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mike Oliphant

I didn't notice anything wrong when I added my Roland device IDs to your
patch's method.  Its information can be found here, but I really doubt it
applies to your issue, other than Takashi Iwai's simplified
capture-quirk-only table patch (which Geraldo already mentioned):

https://bugzilla.kernel.org/show_bug.cgi?id=212519

Since I built my patch upon your previous patch, is there anything I can do
to test it on my devices for you?

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-07 20:18   ` Lucas
@ 2021-04-07 20:23     ` Lucas
  2021-04-07 20:24     ` Mike Oliphant
  1 sibling, 0 replies; 48+ messages in thread
From: Lucas @ 2021-04-07 20:23 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mike Oliphant

Of course, I did have some tiny clicks when testing the Roland Boutique
D-05... Could that be the same thing you're experiencing on the BOSS G-1?
I describe it there as "little quiet occasional clicks sounding something
like dust on an LP record's play".

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-07 20:18   ` Lucas
  2021-04-07 20:23     ` Lucas
@ 2021-04-07 20:24     ` Mike Oliphant
  2021-04-07 20:26       ` Mike Oliphant
  1 sibling, 1 reply; 48+ messages in thread
From: Mike Oliphant @ 2021-04-07 20:24 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel

Hi Lucas,

These are the changes I have made for the GT-1. Note that I also disabled
the capture implicit feedback since it does not seem to be needed (although
it still works for me if it is enabled).

If you think about it, it makes sense that playback is using capture for
implicit feedback, and not vice versa.

Mike

---

diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 102d53515..99d8b50d4 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -1375,7 +1375,7 @@ int snd_usb_endpoint_start(struct snd_usb_endpoint
*ep)
        if (!ep_state_update(ep, EP_STATE_STOPPED, EP_STATE_RUNNING))
                goto __error;

-       if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
+       if (false) { //snd_usb_endpoint_implicit_feedback_sink(ep)) {
                for (i = 0; i < ep->nurbs; i++) {
                        struct snd_urb_ctx *ctx = ep->urb + i;
                        list_add_tail(&ctx->ready_list,
&ep->ready_playback_urbs);
diff --git a/sound/usb/implicit.c b/sound/usb/implicit.c
index 11a85e66a..ee4243421 100644
--- a/sound/usb/implicit.c
+++ b/sound/usb/implicit.c
@@ -75,7 +75,7 @@ static const struct snd_usb_implicit_fb_match
playback_implicit_fb_quirks[] = {
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171),   /* BOSS RC-505 */
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185),   /* BOSS GP-10 */
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189),   /* BOSS GT-100v2 */
-       IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6),   /* BOSS GT-1 */
+       IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6),        /* BOSS GT-1 */
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8),   /* BOSS Katana */
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5),   /* BOSS GT-001 */
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
@@ -89,7 +89,7 @@ static const struct snd_usb_implicit_fb_match
capture_implicit_fb_quirks[] = {
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505 */
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS GT-100v2
*/
-       IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
+//     IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana */
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */

On Wed, Apr 7, 2021 at 1:18 PM Lucas <jaffa225man@gmail.com> wrote:

> I didn't notice anything wrong when I added my Roland device IDs to your
> patch's method.  Its information can be found here, but I really doubt it
> applies to your issue, other than Takashi Iwai's simplified
> capture-quirk-only table patch (which Geraldo already mentioned):
>
> https://bugzilla.kernel.org/show_bug.cgi?id=212519
>
> Since I built my patch upon your previous patch, is there anything I can
> do to test it on my devices for you?
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-07 20:24     ` Mike Oliphant
@ 2021-04-07 20:26       ` Mike Oliphant
  0 siblings, 0 replies; 48+ messages in thread
From: Mike Oliphant @ 2021-04-07 20:26 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel

Lucas - yes, the issue that occurs is that you get sporadic small pops or
clicks in the audio stream.

Mike

On Wed, Apr 7, 2021 at 1:24 PM Mike Oliphant <oliphant@nostatic.org> wrote:

> Hi Lucas,
>
> These are the changes I have made for the GT-1. Note that I also disabled
> the capture implicit feedback since it does not seem to be needed (although
> it still works for me if it is enabled).
>
> If you think about it, it makes sense that playback is using capture for
> implicit feedback, and not vice versa.
>
> Mike
>
> ---
>
> diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
> index 102d53515..99d8b50d4 100644
> --- a/sound/usb/endpoint.c
> +++ b/sound/usb/endpoint.c
> @@ -1375,7 +1375,7 @@ int snd_usb_endpoint_start(struct snd_usb_endpoint
> *ep)
>         if (!ep_state_update(ep, EP_STATE_STOPPED, EP_STATE_RUNNING))
>                 goto __error;
>
> -       if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
> +       if (false) { //snd_usb_endpoint_implicit_feedback_sink(ep)) {
>                 for (i = 0; i < ep->nurbs; i++) {
>                         struct snd_urb_ctx *ctx = ep->urb + i;
>                         list_add_tail(&ctx->ready_list,
> &ep->ready_playback_urbs);
> diff --git a/sound/usb/implicit.c b/sound/usb/implicit.c
> index 11a85e66a..ee4243421 100644
> --- a/sound/usb/implicit.c
> +++ b/sound/usb/implicit.c
> @@ -75,7 +75,7 @@ static const struct snd_usb_implicit_fb_match
> playback_implicit_fb_quirks[] = {
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171),   /* BOSS RC-505 */
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185),   /* BOSS GP-10 */
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189),   /* BOSS GT-100v2 */
> -       IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6),   /* BOSS GT-1 */
> +       IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6),        /* BOSS GT-1 */
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8),   /* BOSS Katana */
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5),   /* BOSS GT-001 */
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
> @@ -89,7 +89,7 @@ static const struct snd_usb_implicit_fb_match
> capture_implicit_fb_quirks[] = {
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505
> */
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS
> GT-100v2 */
> -       IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
> +//     IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana
> */
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001
> */
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */
>
> On Wed, Apr 7, 2021 at 1:18 PM Lucas <jaffa225man@gmail.com> wrote:
>
>> I didn't notice anything wrong when I added my Roland device IDs to your
>> patch's method.  Its information can be found here, but I really doubt it
>> applies to your issue, other than Takashi Iwai's simplified
>> capture-quirk-only table patch (which Geraldo already mentioned):
>>
>> https://bugzilla.kernel.org/show_bug.cgi?id=212519
>>
>> Since I built my patch upon your previous patch, is there anything I can
>> do to test it on my devices for you?
>>
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-07 20:16   ` Mike Oliphant
@ 2021-04-07 20:35     ` Geraldo Nascimento
  2021-04-08  0:38       ` Mike Oliphant
  0 siblings, 1 reply; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-07 20:35 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: alsa-devel

Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <oliphant@nostatic.org>
escreveu:

> Hi Geraldo - I don't have that patch applied, but it shouldn't make any
> behavioral difference - it just seems to be simplifying the code.
>

Point taken.


> The issue is that the BOSS GT-1 *does* need implicit feedback on playback
> to avoid clock timing issues, and the current behavior is disabling that
> feedback.
>

Mike, would you mind posting some dyndbg logs for both the stock behaviour
and your endpoint.c/generic quirk modified behaviour?

Just add snd_usb_audio.dyndbg=+p to your kernel options and please share
the logs.


> Mike
>
> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
> geraldogabriel@gmail.com> wrote:
>
>> Hey Mike, did you catch the latest patch by Takashi Iwai for capture
>> quirky devices?
>>
>> You can find it here:
>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>
>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <oliphant@nostatic.org>
>> escreveu:
>>
>>> I had thought that the recent implicit feedback changes were fully
>>> working
>>> on the BOSS GT-1, but it turns out that I just hadn't tested well enough.
>>>
>>> Audio playback and capture works, but with periodic dropouts. I get the
>>> exact same behavior as I did with the quirk to completely disable
>>> implicit
>>> feedback. Without the implicit feedback, you get dropouts from clock
>>> drift
>>> - how bad probably varies from card to card. On mine it is every second
>>> or
>>> so.
>>>
>>> If I switch playback feedback for the GT-1 to generic by doing
>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old
>>> behavior,
>>> which is that playback completely fails to start.
>>>
>>> With generic playback feedback, and using my previous patch to endpoint.c
>>> to avoid playback waiting on capture mentioned here:
>>>
>>>
>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>
>>> playback and capture work perfectly for me.
>>>
>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-07 20:35     ` Geraldo Nascimento
@ 2021-04-08  0:38       ` Mike Oliphant
  2021-04-08  2:26         ` Geraldo Nascimento
  0 siblings, 1 reply; 48+ messages in thread
From: Mike Oliphant @ 2021-04-08  0:38 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel

Geraldo - here is the dmesg output when starting up jackd for
capture/playback:

With my patch:

[  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
[  136.734088] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
period_bytes=256, periods=2, implicit_fb=0
[  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
[  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
[  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
[  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70480
[  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
[  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
[  136.734468] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
period_bytes=256, periods=2, implicit_fb=1
[  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
[  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
[  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
[  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
[  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68400
[  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
[  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
[  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
[  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
[  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
[  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
[  136.740634] usb 3-1.2: 2:1 Start Capture PCM
[  136.740635] usb 3-1.2: 1:1 Start Playback PCM


With the unpatched kernel:

[  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
[  344.813210] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
period_bytes=256, periods=2, implicit_fb=1
[  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
[  344.813215] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
period_bytes=256, periods=2, implicit_fb=0
[  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
[  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
[  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
[  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70580
[  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
[  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
[  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
[  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
[  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68500
[  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
[  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
[  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
[  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
[  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
[  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
[  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
[  344.819538] usb 3-1.2: 2:1 Start Capture PCM
[  344.819540] usb 3-1.2: 1:1 Start Playback PCM
[  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
[  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
[  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
[  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
[  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
[  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
[  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
[  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
[  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
[  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
[  344.833891] usb 3-1.2: 2:1 Start Capture PCM
[  344.833893] usb 3-1.2: 1:1 Start Playback PCM

On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <geraldogabriel@gmail.com>
wrote:

> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <oliphant@nostatic.org>
> escreveu:
>
>> Hi Geraldo - I don't have that patch applied, but it shouldn't make any
>> behavioral difference - it just seems to be simplifying the code.
>>
>
> Point taken.
>
>
>> The issue is that the BOSS GT-1 *does* need implicit feedback on playback
>> to avoid clock timing issues, and the current behavior is disabling that
>> feedback.
>>
>
> Mike, would you mind posting some dyndbg logs for both the stock behaviour
> and your endpoint.c/generic quirk modified behaviour?
>
> Just add snd_usb_audio.dyndbg=+p to your kernel options and please share
> the logs.
>
>
>> Mike
>>
>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>> geraldogabriel@gmail.com> wrote:
>>
>>> Hey Mike, did you catch the latest patch by Takashi Iwai for capture
>>> quirky devices?
>>>
>>> You can find it here:
>>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>>
>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <oliphant@nostatic.org>
>>> escreveu:
>>>
>>>> I had thought that the recent implicit feedback changes were fully
>>>> working
>>>> on the BOSS GT-1, but it turns out that I just hadn't tested well
>>>> enough.
>>>>
>>>> Audio playback and capture works, but with periodic dropouts. I get the
>>>> exact same behavior as I did with the quirk to completely disable
>>>> implicit
>>>> feedback. Without the implicit feedback, you get dropouts from clock
>>>> drift
>>>> - how bad probably varies from card to card. On mine it is every second
>>>> or
>>>> so.
>>>>
>>>> If I switch playback feedback for the GT-1 to generic by doing
>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old
>>>> behavior,
>>>> which is that playback completely fails to start.
>>>>
>>>> With generic playback feedback, and using my previous patch to
>>>> endpoint.c
>>>> to avoid playback waiting on capture mentioned here:
>>>>
>>>>
>>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>>
>>>> playback and capture work perfectly for me.
>>>>
>>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08  0:38       ` Mike Oliphant
@ 2021-04-08  2:26         ` Geraldo Nascimento
  2021-04-08  2:46           ` Mike Oliphant
  0 siblings, 1 reply; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-08  2:26 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: alsa-devel

Thanks, Mike, one thing I can tell you right off the bat is that if you
turn implicit feedback sync on for both endpoints at the same time like you
mentioned, without your workaround inside endpoint.c, they most likely will
stall because they would both be waiting for each other to start.

Have you tried engaging the generic implicit feedback sync just for the
playback, thereby commenting out the capture implicit feedback entries, and
re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside endpoint.c?
Does playback still fail to start?

If you choose to perform this simple test please share with us the test's
dyndbg logs right from the moment you turn on the device, not just after
you start jackd.

Sorry for the endless do-this, do-that. Such is the pace of teledebugging


Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <oliphant@nostatic.org>
escreveu:

> Geraldo - here is the dmesg output when starting up jackd for
> capture/playback:
>
> With my patch:
>
> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
> [  136.734088] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
> period_bytes=256, periods=2, implicit_fb=0
> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70480
> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
> [  136.734468] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
> period_bytes=256, periods=2, implicit_fb=1
> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68400
> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
>
>
> With the unpatched kernel:
>
> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
> [  344.813210] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
> period_bytes=256, periods=2, implicit_fb=1
> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
> [  344.813215] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
> period_bytes=256, periods=2, implicit_fb=0
> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70580
> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68500
> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
>
> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
> geraldogabriel@gmail.com> wrote:
>
>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <oliphant@nostatic.org>
>> escreveu:
>>
>>> Hi Geraldo - I don't have that patch applied, but it shouldn't make any
>>> behavioral difference - it just seems to be simplifying the code.
>>>
>>
>> Point taken.
>>
>>
>>> The issue is that the BOSS GT-1 *does* need implicit feedback on
>>> playback to avoid clock timing issues, and the current behavior is
>>> disabling that feedback.
>>>
>>
>> Mike, would you mind posting some dyndbg logs for both the stock
>> behaviour and your endpoint.c/generic quirk modified behaviour?
>>
>> Just add snd_usb_audio.dyndbg=+p to your kernel options and please share
>> the logs.
>>
>>
>>> Mike
>>>
>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>>> geraldogabriel@gmail.com> wrote:
>>>
>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for capture
>>>> quirky devices?
>>>>
>>>> You can find it here:
>>>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>>>
>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <oliphant@nostatic.org>
>>>> escreveu:
>>>>
>>>>> I had thought that the recent implicit feedback changes were fully
>>>>> working
>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested well
>>>>> enough.
>>>>>
>>>>> Audio playback and capture works, but with periodic dropouts. I get the
>>>>> exact same behavior as I did with the quirk to completely disable
>>>>> implicit
>>>>> feedback. Without the implicit feedback, you get dropouts from clock
>>>>> drift
>>>>> - how bad probably varies from card to card. On mine it is every
>>>>> second or
>>>>> so.
>>>>>
>>>>> If I switch playback feedback for the GT-1 to generic by doing
>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old
>>>>> behavior,
>>>>> which is that playback completely fails to start.
>>>>>
>>>>> With generic playback feedback, and using my previous patch to
>>>>> endpoint.c
>>>>> to avoid playback waiting on capture mentioned here:
>>>>>
>>>>>
>>>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>>>
>>>>> playback and capture work perfectly for me.
>>>>>
>>>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08  2:26         ` Geraldo Nascimento
@ 2021-04-08  2:46           ` Mike Oliphant
  2021-04-08  3:08             ` Lucas
       [not found]             ` <CAEsQvcsCJUi8eP_t8MGUKf0zSf7Zmqiof8b0fmk-XhZtUScbmg@mail.gmail.com>
  0 siblings, 2 replies; 48+ messages in thread
From: Mike Oliphant @ 2021-04-08  2:46 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel

Hi Geraldo - I had the same thought and I have tried enabling playback
feedback while turning off capture feedback without my endpoint patch. It
doesn't work - at least not on the GT-1. Playback/capture fails to start.

Speaking of testing, if you (or anyone else following this discussion) have
one of these Roland/BOSS devices, it would be great if you could try
testing with playback feedback enabled and my endpoint.c workaround.

Mike

On Wed, Apr 7, 2021 at 7:21 PM Geraldo Nascimento <geraldogabriel@gmail.com>
wrote:

> Thanks, Mike, one thing I can tell you right off the bat is that if you
> turn implicit feedback sync on for both endpoints at the same time like you
> mentioned, without your workaround inside endpoint.c, they most likely will
> stall because they would both be waiting for each other to start.
>
> Have you tried engaging the generic implicit feedback sync just for the
> playback, thereby commenting out the capture implicit feedback entries, and
> re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside endpoint.c?
> Does playback still fail to start?
>
> If you choose to perform this simple test please share with us the test's
> dyndbg logs right from the moment you turn on the device, not just after
> you start jackd.
>
> Sorry for the endless do-this, do-that. Such is the pace of teledebugging
>
>
> Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <oliphant@nostatic.org>
> escreveu:
>
>> Geraldo - here is the dmesg output when starting up jackd for
>> capture/playback:
>>
>> With my patch:
>>
>> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>> [  136.734088] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>> period_bytes=256, periods=2, implicit_fb=0
>> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70480
>> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
>> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>> [  136.734468] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>> period_bytes=256, periods=2, implicit_fb=1
>> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
>> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68400
>> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
>> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
>> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
>> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
>> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
>> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
>> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
>> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
>>
>>
>> With the unpatched kernel:
>>
>> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>> [  344.813210] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>> period_bytes=256, periods=2, implicit_fb=1
>> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>> [  344.813215] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>> period_bytes=256, periods=2, implicit_fb=0
>> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70580
>> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
>> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68500
>> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
>> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
>> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
>> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
>> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
>> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
>> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
>> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
>> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
>> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
>> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
>> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
>> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
>> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
>> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
>> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
>> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
>> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
>> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
>> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
>> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
>>
>> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
>> geraldogabriel@gmail.com> wrote:
>>
>>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <oliphant@nostatic.org>
>>> escreveu:
>>>
>>>> Hi Geraldo - I don't have that patch applied, but it shouldn't make any
>>>> behavioral difference - it just seems to be simplifying the code.
>>>>
>>>
>>> Point taken.
>>>
>>>
>>>> The issue is that the BOSS GT-1 *does* need implicit feedback on
>>>> playback to avoid clock timing issues, and the current behavior is
>>>> disabling that feedback.
>>>>
>>>
>>> Mike, would you mind posting some dyndbg logs for both the stock
>>> behaviour and your endpoint.c/generic quirk modified behaviour?
>>>
>>> Just add snd_usb_audio.dyndbg=+p to your kernel options and please share
>>> the logs.
>>>
>>>
>>>> Mike
>>>>
>>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>>>> geraldogabriel@gmail.com> wrote:
>>>>
>>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for capture
>>>>> quirky devices?
>>>>>
>>>>> You can find it here:
>>>>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>>>>
>>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <oliphant@nostatic.org>
>>>>> escreveu:
>>>>>
>>>>>> I had thought that the recent implicit feedback changes were fully
>>>>>> working
>>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested well
>>>>>> enough.
>>>>>>
>>>>>> Audio playback and capture works, but with periodic dropouts. I get
>>>>>> the
>>>>>> exact same behavior as I did with the quirk to completely disable
>>>>>> implicit
>>>>>> feedback. Without the implicit feedback, you get dropouts from clock
>>>>>> drift
>>>>>> - how bad probably varies from card to card. On mine it is every
>>>>>> second or
>>>>>> so.
>>>>>>
>>>>>> If I switch playback feedback for the GT-1 to generic by doing
>>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old
>>>>>> behavior,
>>>>>> which is that playback completely fails to start.
>>>>>>
>>>>>> With generic playback feedback, and using my previous patch to
>>>>>> endpoint.c
>>>>>> to avoid playback waiting on capture mentioned here:
>>>>>>
>>>>>>
>>>>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>>>>
>>>>>> playback and capture work perfectly for me.
>>>>>>
>>>>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08  2:46           ` Mike Oliphant
@ 2021-04-08  3:08             ` Lucas
  2021-04-08  3:25               ` Lucas
       [not found]             ` <CAEsQvcsCJUi8eP_t8MGUKf0zSf7Zmqiof8b0fmk-XhZtUScbmg@mail.gmail.com>
  1 sibling, 1 reply; 48+ messages in thread
From: Lucas @ 2021-04-08  3:08 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: alsa-devel, Geraldo Nascimento

That sounds like a good test.  I'm building it with the patch you posted
earlier today, except pertaining to my Roland Boutique D-05 ID.  It will
take a while before I have the result, though.  Also, that
"snd_usb_audio.dyndbg=+p" is just a kernel boot (not build) option,
correct?:
I hope so, or I'll have to start the build over yet again. ;)

On Wed, Apr 7, 2021 at 9:48 PM Mike Oliphant <oliphant@nostatic.org> wrote:

> Hi Geraldo - I had the same thought and I have tried enabling playback
> feedback while turning off capture feedback without my endpoint patch. It
> doesn't work - at least not on the GT-1. Playback/capture fails to start.
>
> Speaking of testing, if you (or anyone else following this discussion) have
> one of these Roland/BOSS devices, it would be great if you could try
> testing with playback feedback enabled and my endpoint.c workaround.
>
> Mike
>
> On Wed, Apr 7, 2021 at 7:21 PM Geraldo Nascimento <
> geraldogabriel@gmail.com>
> wrote:
>
> > Thanks, Mike, one thing I can tell you right off the bat is that if you
> > turn implicit feedback sync on for both endpoints at the same time like
> you
> > mentioned, without your workaround inside endpoint.c, they most likely
> will
> > stall because they would both be waiting for each other to start.
> >
> > Have you tried engaging the generic implicit feedback sync just for the
> > playback, thereby commenting out the capture implicit feedback entries,
> and
> > re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside
> endpoint.c?
> > Does playback still fail to start?
> >
> > If you choose to perform this simple test please share with us the test's
> > dyndbg logs right from the moment you turn on the device, not just after
> > you start jackd.
> >
> > Sorry for the endless do-this, do-that. Such is the pace of teledebugging
> >
> >
> > Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <oliphant@nostatic.org>
> > escreveu:
> >
> >> Geraldo - here is the dmesg output when starting up jackd for
> >> capture/playback:
> >>
> >> With my patch:
> >>
> >> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
> >> [  136.734088] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
> >> period_bytes=256, periods=2, implicit_fb=0
> >> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
> >> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
> >> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
> >> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70480
> >> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
> >> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
> >> [  136.734468] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
> >> period_bytes=256, periods=2, implicit_fb=1
> >> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
> >> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
> >> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
> >> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
> >> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68400
> >> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
> >> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
> >> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
> >> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
> >> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
> >> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
> >> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
> >> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
> >>
> >>
> >> With the unpatched kernel:
> >>
> >> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
> >> [  344.813210] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
> >> period_bytes=256, periods=2, implicit_fb=1
> >> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
> >> [  344.813215] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
> >> period_bytes=256, periods=2, implicit_fb=0
> >> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
> >> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
> >> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
> >> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70580
> >> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
> >> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
> >> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
> >> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
> >> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68500
> >> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
> >> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
> >> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
> >> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
> >> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
> >> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
> >> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
> >> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
> >> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
> >> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
> >> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
> >> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
> >> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
> >> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
> >> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
> >> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
> >> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
> >> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
> >> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
> >> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
> >> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
> >>
> >> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
> >> geraldogabriel@gmail.com> wrote:
> >>
> >>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <oliphant@nostatic.org>
> >>> escreveu:
> >>>
> >>>> Hi Geraldo - I don't have that patch applied, but it shouldn't make
> any
> >>>> behavioral difference - it just seems to be simplifying the code.
> >>>>
> >>>
> >>> Point taken.
> >>>
> >>>
> >>>> The issue is that the BOSS GT-1 *does* need implicit feedback on
> >>>> playback to avoid clock timing issues, and the current behavior is
> >>>> disabling that feedback.
> >>>>
> >>>
> >>> Mike, would you mind posting some dyndbg logs for both the stock
> >>> behaviour and your endpoint.c/generic quirk modified behaviour?
> >>>
> >>> Just add snd_usb_audio.dyndbg=+p to your kernel options and please
> share
> >>> the logs.
> >>>
> >>>
> >>>> Mike
> >>>>
> >>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
> >>>> geraldogabriel@gmail.com> wrote:
> >>>>
> >>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for capture
> >>>>> quirky devices?
> >>>>>
> >>>>> You can find it here:
> >>>>>
> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
> >>>>>
> >>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <oliphant@nostatic.org
> >
> >>>>> escreveu:
> >>>>>
> >>>>>> I had thought that the recent implicit feedback changes were fully
> >>>>>> working
> >>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested well
> >>>>>> enough.
> >>>>>>
> >>>>>> Audio playback and capture works, but with periodic dropouts. I get
> >>>>>> the
> >>>>>> exact same behavior as I did with the quirk to completely disable
> >>>>>> implicit
> >>>>>> feedback. Without the implicit feedback, you get dropouts from clock
> >>>>>> drift
> >>>>>> - how bad probably varies from card to card. On mine it is every
> >>>>>> second or
> >>>>>> so.
> >>>>>>
> >>>>>> If I switch playback feedback for the GT-1 to generic by doing
> >>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old
> >>>>>> behavior,
> >>>>>> which is that playback completely fails to start.
> >>>>>>
> >>>>>> With generic playback feedback, and using my previous patch to
> >>>>>> endpoint.c
> >>>>>> to avoid playback waiting on capture mentioned here:
> >>>>>>
> >>>>>>
> >>>>>>
> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
> >>>>>>
> >>>>>> playback and capture work perfectly for me.
> >>>>>>
> >>>>>
>


-- 
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm
On a related note, also see https://www.fsf.org/campaigns/surveillance

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08  3:08             ` Lucas
@ 2021-04-08  3:25               ` Lucas
  0 siblings, 0 replies; 48+ messages in thread
From: Lucas @ 2021-04-08  3:25 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: alsa-devel, Geraldo Nascimento

Oh, nevermind about the dyndbg, a quick search shows it's a kernel module
option (modprobe.d) for my case:
https://www.kernel.org/doc/html/v4.15/admin-guide/dynamic-debug-howto.html


On Wed, Apr 7, 2021 at 10:08 PM Lucas <jaffa225man@gmail.com> wrote:

> That sounds like a good test.  I'm building it with the patch you posted
> earlier today, except pertaining to my Roland Boutique D-05 ID.  It will
> take a while before I have the result, though.  Also, that
> "snd_usb_audio.dyndbg=+p" is just a kernel boot (not build) option,
> correct?:
> I hope so, or I'll have to start the build over yet again. ;)
>
> On Wed, Apr 7, 2021 at 9:48 PM Mike Oliphant <oliphant@nostatic.org>
> wrote:
>
>> Hi Geraldo - I had the same thought and I have tried enabling playback
>> feedback while turning off capture feedback without my endpoint patch. It
>> doesn't work - at least not on the GT-1. Playback/capture fails to start.
>>
>> Speaking of testing, if you (or anyone else following this discussion)
>> have
>> one of these Roland/BOSS devices, it would be great if you could try
>> testing with playback feedback enabled and my endpoint.c workaround.
>>
>> Mike
>>
>> On Wed, Apr 7, 2021 at 7:21 PM Geraldo Nascimento <
>> geraldogabriel@gmail.com>
>> wrote:
>>
>> > Thanks, Mike, one thing I can tell you right off the bat is that if you
>> > turn implicit feedback sync on for both endpoints at the same time like
>> you
>> > mentioned, without your workaround inside endpoint.c, they most likely
>> will
>> > stall because they would both be waiting for each other to start.
>> >
>> > Have you tried engaging the generic implicit feedback sync just for the
>> > playback, thereby commenting out the capture implicit feedback entries,
>> and
>> > re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside
>> endpoint.c?
>> > Does playback still fail to start?
>> >
>> > If you choose to perform this simple test please share with us the
>> test's
>> > dyndbg logs right from the moment you turn on the device, not just after
>> > you start jackd.
>> >
>> > Sorry for the endless do-this, do-that. Such is the pace of
>> teledebugging
>> >
>> >
>> > Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <oliphant@nostatic.org>
>> > escreveu:
>> >
>> >> Geraldo - here is the dmesg output when starting up jackd for
>> >> capture/playback:
>> >>
>> >> With my patch:
>> >>
>> >> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>> >> [  136.734088] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>> >> period_bytes=256, periods=2, implicit_fb=0
>> >> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>> >> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>> >> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>> >> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70480
>> >> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
>> >> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>> >> [  136.734468] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>> >> period_bytes=256, periods=2, implicit_fb=1
>> >> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
>> >> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>> >> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>> >> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>> >> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68400
>> >> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
>> >> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
>> >> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
>> >> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
>> >> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
>> >> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
>> >> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
>> >> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
>> >>
>> >>
>> >> With the unpatched kernel:
>> >>
>> >> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>> >> [  344.813210] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>> >> period_bytes=256, periods=2, implicit_fb=1
>> >> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>> >> [  344.813215] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>> >> period_bytes=256, periods=2, implicit_fb=0
>> >> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>> >> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>> >> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>> >> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70580
>> >> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
>> >> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>> >> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>> >> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>> >> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68500
>> >> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
>> >> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
>> >> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
>> >> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
>> >> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
>> >> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
>> >> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
>> >> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
>> >> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
>> >> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
>> >> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
>> >> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
>> >> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
>> >> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
>> >> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
>> >> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
>> >> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
>> >> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
>> >> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
>> >> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
>> >> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
>> >>
>> >> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
>> >> geraldogabriel@gmail.com> wrote:
>> >>
>> >>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <oliphant@nostatic.org>
>> >>> escreveu:
>> >>>
>> >>>> Hi Geraldo - I don't have that patch applied, but it shouldn't make
>> any
>> >>>> behavioral difference - it just seems to be simplifying the code.
>> >>>>
>> >>>
>> >>> Point taken.
>> >>>
>> >>>
>> >>>> The issue is that the BOSS GT-1 *does* need implicit feedback on
>> >>>> playback to avoid clock timing issues, and the current behavior is
>> >>>> disabling that feedback.
>> >>>>
>> >>>
>> >>> Mike, would you mind posting some dyndbg logs for both the stock
>> >>> behaviour and your endpoint.c/generic quirk modified behaviour?
>> >>>
>> >>> Just add snd_usb_audio.dyndbg=+p to your kernel options and please
>> share
>> >>> the logs.
>> >>>
>> >>>
>> >>>> Mike
>> >>>>
>> >>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>> >>>> geraldogabriel@gmail.com> wrote:
>> >>>>
>> >>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for capture
>> >>>>> quirky devices?
>> >>>>>
>> >>>>> You can find it here:
>> >>>>>
>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>> >>>>>
>> >>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <
>> oliphant@nostatic.org>
>> >>>>> escreveu:
>> >>>>>
>> >>>>>> I had thought that the recent implicit feedback changes were fully
>> >>>>>> working
>> >>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested well
>> >>>>>> enough.
>> >>>>>>
>> >>>>>> Audio playback and capture works, but with periodic dropouts. I get
>> >>>>>> the
>> >>>>>> exact same behavior as I did with the quirk to completely disable
>> >>>>>> implicit
>> >>>>>> feedback. Without the implicit feedback, you get dropouts from
>> clock
>> >>>>>> drift
>> >>>>>> - how bad probably varies from card to card. On mine it is every
>> >>>>>> second or
>> >>>>>> so.
>> >>>>>>
>> >>>>>> If I switch playback feedback for the GT-1 to generic by doing
>> >>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old
>> >>>>>> behavior,
>> >>>>>> which is that playback completely fails to start.
>> >>>>>>
>> >>>>>> With generic playback feedback, and using my previous patch to
>> >>>>>> endpoint.c
>> >>>>>> to avoid playback waiting on capture mentioned here:
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>> >>>>>>
>> >>>>>> playback and capture work perfectly for me.
>> >>>>>>
>> >>>>>
>>
>
>
> --
> Protect your digital freedom and privacy, eliminate DRM, learn more at
> http://www.defectivebydesign.org/what_is_drm
> On a related note, also see https://www.fsf.org/campaigns/surveillance
>


-- 
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm
On a related note, also see https://www.fsf.org/campaigns/surveillance

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
       [not found]             ` <CAEsQvcsCJUi8eP_t8MGUKf0zSf7Zmqiof8b0fmk-XhZtUScbmg@mail.gmail.com>
@ 2021-04-08  5:05               ` Geraldo Nascimento
  2021-04-08  5:36                 ` Lucas
  2021-04-08 19:17                 ` Geraldo Nascimento
  0 siblings, 2 replies; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-08  5:05 UTC (permalink / raw)
  To: Lucas, alsa-devel, Mike Oliphant

>
> Mike, I just realize I missed reply-to-all once again.

In case you were wondering, I was looking for a sync_ep event right in the
start of the loading of snd-usb-audio. It happens inside pcm.c. If you see
one of those specifically let me know.

With my Pioneer device, the DDJ-SR2, snd-usb-audio recognized the device's
implicit feedback EP as sync_ep and that prevented JACK from starting.

Em Qua, 7 de abr de 2021 23:47, Mike Oliphant <oliphant@nostatic.org>
> escreveu:
>
>> Hi Geraldo - I had the same thought and I have tried enabling playback
>> feedback while turning off capture feedback without my endpoint patch. It
>> doesn't work - at least not on the GT-1. Playback/capture fails to start.
>>
>
> Would you mind sharing the dyndbg logs for the failure case from the point
> you connect the device, and trying to start JACK?
>
> Sometimes failures elucidate more than success cases.
>
>
>> Speaking of testing, if you (or anyone else following this discussion)
>> have one of these Roland/BOSS devices, it would be great if you could try
>> testing with playback feedback enabled and my endpoint.c workaround.
>>
>
> I don't have the hardware, but I'm sure it works. The problem is that
> endpoint.c code really shouldn't be disabled unless all the other options
> fail, and even then, I'm not so sure the maintainers will be so willing to
> disable it. So let's keep some other options on the table by debugging a
> little further.
>
> Thank you,
> Geraldo
>
>
>> Mike
>>
>> On Wed, Apr 7, 2021 at 7:21 PM Geraldo Nascimento <
>> geraldogabriel@gmail.com> wrote:
>>
>>> Thanks, Mike, one thing I can tell you right off the bat is that if you
>>> turn implicit feedback sync on for both endpoints at the same time like you
>>> mentioned, without your workaround inside endpoint.c, they most likely will
>>> stall because they would both be waiting for each other to start.
>>>
>>> Have you tried engaging the generic implicit feedback sync just for the
>>> playback, thereby commenting out the capture implicit feedback entries, and
>>> re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside endpoint.c?
>>> Does playback still fail to start?
>>>
>>> If you choose to perform this simple test please share with us the
>>> test's dyndbg logs right from the moment you turn on the device, not just
>>> after you start jackd.
>>>
>>> Sorry for the endless do-this, do-that. Such is the pace of teledebugging
>>>
>>>
>>> Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <oliphant@nostatic.org>
>>> escreveu:
>>>
>>>> Geraldo - here is the dmesg output when starting up jackd for
>>>> capture/playback:
>>>>
>>>> With my patch:
>>>>
>>>> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>> [  136.734088] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>> period_bytes=256, periods=2, implicit_fb=0
>>>> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70480
>>>> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
>>>> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>> [  136.734468] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>> period_bytes=256, periods=2, implicit_fb=1
>>>> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
>>>> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68400
>>>> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
>>>> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
>>>> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
>>>> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
>>>> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
>>>> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
>>>>
>>>>
>>>> With the unpatched kernel:
>>>>
>>>> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>> [  344.813210] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>> period_bytes=256, periods=2, implicit_fb=1
>>>> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>> [  344.813215] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>> period_bytes=256, periods=2, implicit_fb=0
>>>> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70580
>>>> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
>>>> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68500
>>>> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
>>>> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
>>>> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
>>>> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
>>>> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
>>>> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
>>>> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
>>>> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
>>>> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
>>>> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
>>>> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
>>>> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
>>>> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
>>>> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
>>>> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
>>>>
>>>> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
>>>> geraldogabriel@gmail.com> wrote:
>>>>
>>>>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <oliphant@nostatic.org>
>>>>> escreveu:
>>>>>
>>>>>> Hi Geraldo - I don't have that patch applied, but it shouldn't make
>>>>>> any behavioral difference - it just seems to be simplifying the code.
>>>>>>
>>>>>
>>>>> Point taken.
>>>>>
>>>>>
>>>>>> The issue is that the BOSS GT-1 *does* need implicit feedback on
>>>>>> playback to avoid clock timing issues, and the current behavior is
>>>>>> disabling that feedback.
>>>>>>
>>>>>
>>>>> Mike, would you mind posting some dyndbg logs for both the stock
>>>>> behaviour and your endpoint.c/generic quirk modified behaviour?
>>>>>
>>>>> Just add snd_usb_audio.dyndbg=+p to your kernel options and please
>>>>> share the logs.
>>>>>
>>>>>
>>>>>> Mike
>>>>>>
>>>>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>
>>>>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for capture
>>>>>>> quirky devices?
>>>>>>>
>>>>>>> You can find it here:
>>>>>>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>>>>>>
>>>>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <oliphant@nostatic.org>
>>>>>>> escreveu:
>>>>>>>
>>>>>>>> I had thought that the recent implicit feedback changes were fully
>>>>>>>> working
>>>>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested well
>>>>>>>> enough.
>>>>>>>>
>>>>>>>> Audio playback and capture works, but with periodic dropouts. I get
>>>>>>>> the
>>>>>>>> exact same behavior as I did with the quirk to completely disable
>>>>>>>> implicit
>>>>>>>> feedback. Without the implicit feedback, you get dropouts from
>>>>>>>> clock drift
>>>>>>>> - how bad probably varies from card to card. On mine it is every
>>>>>>>> second or
>>>>>>>> so.
>>>>>>>>
>>>>>>>> If I switch playback feedback for the GT-1 to generic by doing
>>>>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old
>>>>>>>> behavior,
>>>>>>>> which is that playback completely fails to start.
>>>>>>>>
>>>>>>>> With generic playback feedback, and using my previous patch to
>>>>>>>> endpoint.c
>>>>>>>> to avoid playback waiting on capture mentioned here:
>>>>>>>>
>>>>>>>>
>>>>>>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>>>>>>
>>>>>>>> playback and capture work perfectly for me.
>>>>>>>>
>>>>>>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08  5:05               ` Geraldo Nascimento
@ 2021-04-08  5:36                 ` Lucas
  2021-04-08  6:14                   ` Geraldo Nascimento
  2021-04-08 15:56                   ` Mike Oliphant
  2021-04-08 19:17                 ` Geraldo Nascimento
  1 sibling, 2 replies; 48+ messages in thread
From: Lucas @ 2021-04-08  5:36 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel, Mike Oliphant

Well, I just got back from testing Mike's suggestion of setting the Roland
Boutique D-05 as a playback quirk, disabling its capture quirk, and setting
that endpoint test section to always be skipped.  Sure, enough, the D-05's
playback is now perfectly crystal clear without the crackles associated
with an LP record.

This is just a guess until I recompile again, but my capture from the D-05
reports a read error, seemingly just as the vanilla mainline kernel does,
and I think it's because I disabled its capture quirk line.  So, it seems
to me that the D-05 needs both quirk table entries, whether or not the GT-1
does.

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08  5:36                 ` Lucas
@ 2021-04-08  6:14                   ` Geraldo Nascimento
  2021-04-08  8:40                     ` Lucas
  2021-04-08 15:56                   ` Mike Oliphant
  1 sibling, 1 reply; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-08  6:14 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel, Mike Oliphant

Em Qui, 8 de abr de 2021 02:36, Lucas <jaffa225man@gmail.com> escreveu:

> Well, I just got back from testing Mike's suggestion of setting the Roland
> Boutique D-05 as a playback quirk, disabling its capture quirk, and setting
> that endpoint test section to always be skipped.  Sure, enough, the D-05's
> playback is now perfectly crystal clear without the crackles associated
> with an LP record.
>

I know that feeling and it is wonderful.


> This is just a guess until I recompile again, but my capture from the D-05
> reports a read error, seemingly just as the vanilla mainline kernel does,
> and I think it's because I disabled its capture quirk line.  So, it seems
> to me that the D-05 needs both quirk table entries, whether or not the GT-1
> does.
>

Looking back to Mike's 2019 post
https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161733.html
we see the output of lsusb -v for the BOSS GT-1 and clearly we see that
0x8e is the implicit feedback sync EP, at least if we are to trust lsusb
-v. Therefore Mike is on the right track that the GT-1 implicit feedback
sync is for playback only.

>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08  6:14                   ` Geraldo Nascimento
@ 2021-04-08  8:40                     ` Lucas
  0 siblings, 0 replies; 48+ messages in thread
From: Lucas @ 2021-04-08  8:40 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel, Mike Oliphant

Yes it is a wonderful feeling!

I plan to revert these changes tomorrow to test something else better, but
will be happy to keep trying any suggestions, especially if they can be
made to be more independent.

Thanks, Geraldo, you just taught me something I didn't know about lsusb,
but it'll still probably be a stretch for me to learn enough about
endpoints to feel comfortable talking about them.

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08  5:36                 ` Lucas
  2021-04-08  6:14                   ` Geraldo Nascimento
@ 2021-04-08 15:56                   ` Mike Oliphant
  1 sibling, 0 replies; 48+ messages in thread
From: Mike Oliphant @ 2021-04-08 15:56 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel, Geraldo Nascimento

Lucas - great to hear that the endpoint patch fixed your crackles!

I'm curious if you get any different results enabling feedback on the
capture endpoint. I'm also curious about the output from "lsusb -v" for
your device and whether the implicit feedback setup looks like the GT-1.

I'm not exactly sure what it even means to have the capture endpoint set up
with implicit feedback as most of the implicit feedback code seems to deal
only with playback. The bit of code in endpoint.c that I patched out, for
example, only runs on playback endpoints.

I *think* the existing code may effectively just be completely turning off
implicit feedback for these devices. This results in audio playback/capture
that "works", but is susceptible to pops/crackles due to small timing
mismatches.

Mike

On Wed, Apr 7, 2021 at 10:36 PM Lucas <jaffa225man@gmail.com> wrote:

> Well, I just got back from testing Mike's suggestion of setting the Roland
> Boutique D-05 as a playback quirk, disabling its capture quirk, and setting
> that endpoint test section to always be skipped.  Sure, enough, the D-05's
> playback is now perfectly crystal clear without the crackles associated
> with an LP record.
>
> This is just a guess until I recompile again, but my capture from the D-05
> reports a read error, seemingly just as the vanilla mainline kernel does,
> and I think it's because I disabled its capture quirk line.  So, it seems
> to me that the D-05 needs both quirk table entries, whether or not the GT-1
> does.
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08  5:05               ` Geraldo Nascimento
  2021-04-08  5:36                 ` Lucas
@ 2021-04-08 19:17                 ` Geraldo Nascimento
  2021-04-08 19:42                   ` Mike Oliphant
  1 sibling, 1 reply; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-08 19:17 UTC (permalink / raw)
  To: Lucas, alsa-devel, Mike Oliphant

Hey Mike, got another question for you, sorry about that.

If you comment out your GT-1 IMPLICIT_FB_GENERIC_DEV() entry and instead
let audioformat_implicit_fb_quirk() call add_roland_implicit_fb() with
everything else customized your way, your custom endpoint.c etc., does it
still work? And does it work crystal clear?

I'm sorry about this test this, test that, provide the dyndbg logs attitude
but I'm honestly just trying to help you write the best patch possible.

Thank you,
Geraldo

Em Qui, 8 de abr de 2021 02:05, Geraldo Nascimento <geraldogabriel@gmail.com>
escreveu:

> Mike, I just realize I missed reply-to-all once again.
>
> In case you were wondering, I was looking for a sync_ep event right in the
> start of the loading of snd-usb-audio. It happens inside pcm.c. If you see
> one of those specifically let me know.
>
> With my Pioneer device, the DDJ-SR2, snd-usb-audio recognized the device's
> implicit feedback EP as sync_ep and that prevented JACK from starting.
>
> Em Qua, 7 de abr de 2021 23:47, Mike Oliphant <oliphant@nostatic.org>
>> escreveu:
>>
>>> Hi Geraldo - I had the same thought and I have tried enabling playback
>>> feedback while turning off capture feedback without my endpoint patch. It
>>> doesn't work - at least not on the GT-1. Playback/capture fails to start.
>>>
>>
>> Would you mind sharing the dyndbg logs for the failure case from the
>> point you connect the device, and trying to start JACK?
>>
>> Sometimes failures elucidate more than success cases.
>>
>>
>>> Speaking of testing, if you (or anyone else following this discussion)
>>> have one of these Roland/BOSS devices, it would be great if you could try
>>> testing with playback feedback enabled and my endpoint.c workaround.
>>>
>>
>> I don't have the hardware, but I'm sure it works. The problem is that
>> endpoint.c code really shouldn't be disabled unless all the other options
>> fail, and even then, I'm not so sure the maintainers will be so willing to
>> disable it. So let's keep some other options on the table by debugging a
>> little further.
>>
>> Thank you,
>> Geraldo
>>
>>
>>> Mike
>>>
>>> On Wed, Apr 7, 2021 at 7:21 PM Geraldo Nascimento <
>>> geraldogabriel@gmail.com> wrote:
>>>
>>>> Thanks, Mike, one thing I can tell you right off the bat is that if you
>>>> turn implicit feedback sync on for both endpoints at the same time like you
>>>> mentioned, without your workaround inside endpoint.c, they most likely will
>>>> stall because they would both be waiting for each other to start.
>>>>
>>>> Have you tried engaging the generic implicit feedback sync just for the
>>>> playback, thereby commenting out the capture implicit feedback entries, and
>>>> re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside endpoint.c?
>>>> Does playback still fail to start?
>>>>
>>>> If you choose to perform this simple test please share with us the
>>>> test's dyndbg logs right from the moment you turn on the device, not just
>>>> after you start jackd.
>>>>
>>>> Sorry for the endless do-this, do-that. Such is the pace of
>>>> teledebugging
>>>>
>>>>
>>>> Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <oliphant@nostatic.org>
>>>> escreveu:
>>>>
>>>>> Geraldo - here is the dmesg output when starting up jackd for
>>>>> capture/playback:
>>>>>
>>>>> With my patch:
>>>>>
>>>>> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>> [  136.734088] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>> period_bytes=256, periods=2, implicit_fb=0
>>>>> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70480
>>>>> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
>>>>> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>> [  136.734468] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>> period_bytes=256, periods=2, implicit_fb=1
>>>>> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
>>>>> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68400
>>>>> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
>>>>> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
>>>>> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
>>>>> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
>>>>> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
>>>>>
>>>>>
>>>>> With the unpatched kernel:
>>>>>
>>>>> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>> [  344.813210] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>> period_bytes=256, periods=2, implicit_fb=1
>>>>> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>> [  344.813215] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>> period_bytes=256, periods=2, implicit_fb=0
>>>>> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe 0x70580
>>>>> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
>>>>> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68500
>>>>> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
>>>>> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
>>>>> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
>>>>> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
>>>>> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
>>>>> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
>>>>> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
>>>>> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
>>>>> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
>>>>> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
>>>>> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
>>>>>
>>>>> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
>>>>> geraldogabriel@gmail.com> wrote:
>>>>>
>>>>>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <oliphant@nostatic.org>
>>>>>> escreveu:
>>>>>>
>>>>>>> Hi Geraldo - I don't have that patch applied, but it shouldn't make
>>>>>>> any behavioral difference - it just seems to be simplifying the code.
>>>>>>>
>>>>>>
>>>>>> Point taken.
>>>>>>
>>>>>>
>>>>>>> The issue is that the BOSS GT-1 *does* need implicit feedback on
>>>>>>> playback to avoid clock timing issues, and the current behavior is
>>>>>>> disabling that feedback.
>>>>>>>
>>>>>>
>>>>>> Mike, would you mind posting some dyndbg logs for both the stock
>>>>>> behaviour and your endpoint.c/generic quirk modified behaviour?
>>>>>>
>>>>>> Just add snd_usb_audio.dyndbg=+p to your kernel options and please
>>>>>> share the logs.
>>>>>>
>>>>>>
>>>>>>> Mike
>>>>>>>
>>>>>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for
>>>>>>>> capture quirky devices?
>>>>>>>>
>>>>>>>> You can find it here:
>>>>>>>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>>>>>>>
>>>>>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <
>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>
>>>>>>>>> I had thought that the recent implicit feedback changes were fully
>>>>>>>>> working
>>>>>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested well
>>>>>>>>> enough.
>>>>>>>>>
>>>>>>>>> Audio playback and capture works, but with periodic dropouts. I
>>>>>>>>> get the
>>>>>>>>> exact same behavior as I did with the quirk to completely disable
>>>>>>>>> implicit
>>>>>>>>> feedback. Without the implicit feedback, you get dropouts from
>>>>>>>>> clock drift
>>>>>>>>> - how bad probably varies from card to card. On mine it is every
>>>>>>>>> second or
>>>>>>>>> so.
>>>>>>>>>
>>>>>>>>> If I switch playback feedback for the GT-1 to generic by doing
>>>>>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old
>>>>>>>>> behavior,
>>>>>>>>> which is that playback completely fails to start.
>>>>>>>>>
>>>>>>>>> With generic playback feedback, and using my previous patch to
>>>>>>>>> endpoint.c
>>>>>>>>> to avoid playback waiting on capture mentioned here:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>>>>>>>
>>>>>>>>> playback and capture work perfectly for me.
>>>>>>>>>
>>>>>>>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08 19:17                 ` Geraldo Nascimento
@ 2021-04-08 19:42                   ` Mike Oliphant
  2021-04-08 20:14                     ` Geraldo Nascimento
  0 siblings, 1 reply; 48+ messages in thread
From: Mike Oliphant @ 2021-04-08 19:42 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: Lucas, alsa-devel

Hi Geraldo - yes. In fact, that is how I've been operating for the past
year or so before the recent implicit feedback changes. I use the GT-1 most
every day as a guitar interface and it works perfectly.

The GT-1 (and I suspect many of the other Roland/BOSS devices) doesn't seem
to be quirky at all with regard to implicit feedback setup - it works
exactly as the endpoint definitions say it should.

Where the GT-1 *does* seem to be quirky is that is doesn't seem to want to
send capture data until it receives some playback data - hence my
endpoint.c patch. Although whether this behavior is quirky or typical I
don't know. I do know that the GT-1 does not claim to be USB class
compliant. It requires custom drivers on Windows and macOS and does not
work at all with iOS, so it definitely seems to be somewhat non-standard.

Mike

On Thu, Apr 8, 2021 at 12:13 PM Geraldo Nascimento <geraldogabriel@gmail.com>
wrote:

> Hey Mike, got another question for you, sorry about that.
>
> If you comment out your GT-1 IMPLICIT_FB_GENERIC_DEV() entry and instead
> let audioformat_implicit_fb_quirk() call add_roland_implicit_fb() with
> everything else customized your way, your custom endpoint.c etc., does it
> still work? And does it work crystal clear?
>
> I'm sorry about this test this, test that, provide the dyndbg logs
> attitude but I'm honestly just trying to help you write the best patch
> possible.
>
> Thank you,
> Geraldo
>
> Em Qui, 8 de abr de 2021 02:05, Geraldo Nascimento <
> geraldogabriel@gmail.com> escreveu:
>
>> Mike, I just realize I missed reply-to-all once again.
>>
>> In case you were wondering, I was looking for a sync_ep event right in
>> the start of the loading of snd-usb-audio. It happens inside pcm.c. If you
>> see one of those specifically let me know.
>>
>> With my Pioneer device, the DDJ-SR2, snd-usb-audio recognized the
>> device's implicit feedback EP as sync_ep and that prevented JACK from
>> starting.
>>
>> Em Qua, 7 de abr de 2021 23:47, Mike Oliphant <oliphant@nostatic.org>
>>> escreveu:
>>>
>>>> Hi Geraldo - I had the same thought and I have tried enabling playback
>>>> feedback while turning off capture feedback without my endpoint patch. It
>>>> doesn't work - at least not on the GT-1. Playback/capture fails to start.
>>>>
>>>
>>> Would you mind sharing the dyndbg logs for the failure case from the
>>> point you connect the device, and trying to start JACK?
>>>
>>> Sometimes failures elucidate more than success cases.
>>>
>>>
>>>> Speaking of testing, if you (or anyone else following this discussion)
>>>> have one of these Roland/BOSS devices, it would be great if you could try
>>>> testing with playback feedback enabled and my endpoint.c workaround.
>>>>
>>>
>>> I don't have the hardware, but I'm sure it works. The problem is that
>>> endpoint.c code really shouldn't be disabled unless all the other options
>>> fail, and even then, I'm not so sure the maintainers will be so willing to
>>> disable it. So let's keep some other options on the table by debugging a
>>> little further.
>>>
>>> Thank you,
>>> Geraldo
>>>
>>>
>>>> Mike
>>>>
>>>> On Wed, Apr 7, 2021 at 7:21 PM Geraldo Nascimento <
>>>> geraldogabriel@gmail.com> wrote:
>>>>
>>>>> Thanks, Mike, one thing I can tell you right off the bat is that if
>>>>> you turn implicit feedback sync on for both endpoints at the same time like
>>>>> you mentioned, without your workaround inside endpoint.c, they most likely
>>>>> will stall because they would both be waiting for each other to start.
>>>>>
>>>>> Have you tried engaging the generic implicit feedback sync just for
>>>>> the playback, thereby commenting out the capture implicit feedback entries,
>>>>> and re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside
>>>>> endpoint.c? Does playback still fail to start?
>>>>>
>>>>> If you choose to perform this simple test please share with us the
>>>>> test's dyndbg logs right from the moment you turn on the device, not just
>>>>> after you start jackd.
>>>>>
>>>>> Sorry for the endless do-this, do-that. Such is the pace of
>>>>> teledebugging
>>>>>
>>>>>
>>>>> Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <oliphant@nostatic.org>
>>>>> escreveu:
>>>>>
>>>>>> Geraldo - here is the dmesg output when starting up jackd for
>>>>>> capture/playback:
>>>>>>
>>>>>> With my patch:
>>>>>>
>>>>>> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>> [  136.734088] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>> period_bytes=256, periods=2, implicit_fb=0
>>>>>> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>> 0x70480
>>>>>> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>> [  136.734468] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>> period_bytes=256, periods=2, implicit_fb=1
>>>>>> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
>>>>>> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68400
>>>>>> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
>>>>>> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
>>>>>> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
>>>>>> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>
>>>>>>
>>>>>> With the unpatched kernel:
>>>>>>
>>>>>> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>> [  344.813210] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>> period_bytes=256, periods=2, implicit_fb=1
>>>>>> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>> [  344.813215] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>> period_bytes=256, periods=2, implicit_fb=0
>>>>>> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>> 0x70580
>>>>>> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe 0x68500
>>>>>> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
>>>>>> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
>>>>>> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
>>>>>> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
>>>>>> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
>>>>>> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
>>>>>> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
>>>>>> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
>>>>>> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
>>>>>> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
>>>>>> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>
>>>>>> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>
>>>>>>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <oliphant@nostatic.org>
>>>>>>> escreveu:
>>>>>>>
>>>>>>>> Hi Geraldo - I don't have that patch applied, but it shouldn't make
>>>>>>>> any behavioral difference - it just seems to be simplifying the code.
>>>>>>>>
>>>>>>>
>>>>>>> Point taken.
>>>>>>>
>>>>>>>
>>>>>>>> The issue is that the BOSS GT-1 *does* need implicit feedback on
>>>>>>>> playback to avoid clock timing issues, and the current behavior is
>>>>>>>> disabling that feedback.
>>>>>>>>
>>>>>>>
>>>>>>> Mike, would you mind posting some dyndbg logs for both the stock
>>>>>>> behaviour and your endpoint.c/generic quirk modified behaviour?
>>>>>>>
>>>>>>> Just add snd_usb_audio.dyndbg=+p to your kernel options and please
>>>>>>> share the logs.
>>>>>>>
>>>>>>>
>>>>>>>> Mike
>>>>>>>>
>>>>>>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for
>>>>>>>>> capture quirky devices?
>>>>>>>>>
>>>>>>>>> You can find it here:
>>>>>>>>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>>>>>>>>
>>>>>>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <
>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>
>>>>>>>>>> I had thought that the recent implicit feedback changes were
>>>>>>>>>> fully working
>>>>>>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested well
>>>>>>>>>> enough.
>>>>>>>>>>
>>>>>>>>>> Audio playback and capture works, but with periodic dropouts. I
>>>>>>>>>> get the
>>>>>>>>>> exact same behavior as I did with the quirk to completely disable
>>>>>>>>>> implicit
>>>>>>>>>> feedback. Without the implicit feedback, you get dropouts from
>>>>>>>>>> clock drift
>>>>>>>>>> - how bad probably varies from card to card. On mine it is every
>>>>>>>>>> second or
>>>>>>>>>> so.
>>>>>>>>>>
>>>>>>>>>> If I switch playback feedback for the GT-1 to generic by doing
>>>>>>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous old
>>>>>>>>>> behavior,
>>>>>>>>>> which is that playback completely fails to start.
>>>>>>>>>>
>>>>>>>>>> With generic playback feedback, and using my previous patch to
>>>>>>>>>> endpoint.c
>>>>>>>>>> to avoid playback waiting on capture mentioned here:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>>>>>>>>
>>>>>>>>>> playback and capture work perfectly for me.
>>>>>>>>>>
>>>>>>>>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08 19:42                   ` Mike Oliphant
@ 2021-04-08 20:14                     ` Geraldo Nascimento
  2021-04-08 20:31                       ` Lucas
  2021-04-08 20:54                       ` Mike Oliphant
  0 siblings, 2 replies; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-08 20:14 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: Lucas, alsa-devel

Em Qui, 8 de abr de 2021 16:42, Mike Oliphant <oliphant@nostatic.org>
escreveu:

> Hi Geraldo - yes. In fact, that is how I've been operating for the past
> year or so before the recent implicit feedback changes. I use the GT-1 most
> every day as a guitar interface and it works perfectly.
>

Thanks Mike, but I'm not sure I understand. You have been operating with
implicit feedback sync on the playback for the past year? I thought that
was a new idea?

The key point here is that with a stock kernel you have to comment out the
IMPLICIT_FB_SKIP_DEV() entry for the GT-1 for the Roland code inside
audioformat_implicit_fb_quirk properly kick in.

I was suggesting you try your workaround without adding a
IMPLICIT_FB_GENERIC_DEV() for your device.


> The GT-1 (and I suspect many of the other Roland/BOSS devices) doesn't
> seem to be quirky at all with regard to implicit feedback setup - it works
> exactly as the endpoint definitions say it should.
>
> Where the GT-1 *does* seem to be quirky is that is doesn't seem to want to
> send capture data until it receives some playback data - hence my
> endpoint.c patch.
>

If that is true then there's definitely a need to rewrite endpoint.c. But
it could be something else, Mike. One thing is certain: the present kernel
behaviour is far from the ideal.

I insist: engage implicit feedback sync for the playback, disable it for
the captures and inspect your dyndbg logs for the failure cases in starting
JACK that happen when you don't patch endpoint.c.

If you see something related to sync_ep then the problem lies elsewhere,
specifically inside pcm.c

Although whether this behavior is quirky or typical I don't know. I do know
> that the GT-1 does not claim to be USB class compliant. It requires custom
> drivers on Windows and macOS and does not work at all with iOS, so it
> definitely seems to be somewhat non-standard.
>

Non-standard to say the least. I really hope that's not the case or it'll
give Takashi Iwai plenty of headache ;-)


> Mike
>
> On Thu, Apr 8, 2021 at 12:13 PM Geraldo Nascimento <
> geraldogabriel@gmail.com> wrote:
>
>> Hey Mike, got another question for you, sorry about that.
>>
>> If you comment out your GT-1 IMPLICIT_FB_GENERIC_DEV() entry and instead
>> let audioformat_implicit_fb_quirk() call add_roland_implicit_fb() with
>> everything else customized your way, your custom endpoint.c etc., does it
>> still work? And does it work crystal clear?
>>
>> I'm sorry about this test this, test that, provide the dyndbg logs
>> attitude but I'm honestly just trying to help you write the best patch
>> possible.
>>
>> Thank you,
>> Geraldo
>>
>> Em Qui, 8 de abr de 2021 02:05, Geraldo Nascimento <
>> geraldogabriel@gmail.com> escreveu:
>>
>>> Mike, I just realize I missed reply-to-all once again.
>>>
>>> In case you were wondering, I was looking for a sync_ep event right in
>>> the start of the loading of snd-usb-audio. It happens inside pcm.c. If you
>>> see one of those specifically let me know.
>>>
>>> With my Pioneer device, the DDJ-SR2, snd-usb-audio recognized the
>>> device's implicit feedback EP as sync_ep and that prevented JACK from
>>> starting.
>>>
>>> Em Qua, 7 de abr de 2021 23:47, Mike Oliphant <oliphant@nostatic.org>
>>>> escreveu:
>>>>
>>>>> Hi Geraldo - I had the same thought and I have tried enabling playback
>>>>> feedback while turning off capture feedback without my endpoint patch. It
>>>>> doesn't work - at least not on the GT-1. Playback/capture fails to start.
>>>>>
>>>>
>>>> Would you mind sharing the dyndbg logs for the failure case from the
>>>> point you connect the device, and trying to start JACK?
>>>>
>>>> Sometimes failures elucidate more than success cases.
>>>>
>>>>
>>>>> Speaking of testing, if you (or anyone else following this discussion)
>>>>> have one of these Roland/BOSS devices, it would be great if you could try
>>>>> testing with playback feedback enabled and my endpoint.c workaround.
>>>>>
>>>>
>>>> I don't have the hardware, but I'm sure it works. The problem is that
>>>> endpoint.c code really shouldn't be disabled unless all the other options
>>>> fail, and even then, I'm not so sure the maintainers will be so willing to
>>>> disable it. So let's keep some other options on the table by debugging a
>>>> little further.
>>>>
>>>> Thank you,
>>>> Geraldo
>>>>
>>>>
>>>>> Mike
>>>>>
>>>>> On Wed, Apr 7, 2021 at 7:21 PM Geraldo Nascimento <
>>>>> geraldogabriel@gmail.com> wrote:
>>>>>
>>>>>> Thanks, Mike, one thing I can tell you right off the bat is that if
>>>>>> you turn implicit feedback sync on for both endpoints at the same time like
>>>>>> you mentioned, without your workaround inside endpoint.c, they most likely
>>>>>> will stall because they would both be waiting for each other to start.
>>>>>>
>>>>>> Have you tried engaging the generic implicit feedback sync just for
>>>>>> the playback, thereby commenting out the capture implicit feedback entries,
>>>>>> and re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside
>>>>>> endpoint.c? Does playback still fail to start?
>>>>>>
>>>>>> If you choose to perform this simple test please share with us the
>>>>>> test's dyndbg logs right from the moment you turn on the device, not just
>>>>>> after you start jackd.
>>>>>>
>>>>>> Sorry for the endless do-this, do-that. Such is the pace of
>>>>>> teledebugging
>>>>>>
>>>>>>
>>>>>> Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <oliphant@nostatic.org>
>>>>>> escreveu:
>>>>>>
>>>>>>> Geraldo - here is the dmesg output when starting up jackd for
>>>>>>> capture/playback:
>>>>>>>
>>>>>>> With my patch:
>>>>>>>
>>>>>>> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>>> [  136.734088] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>> period_bytes=256, periods=2, implicit_fb=0
>>>>>>> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>>> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>>> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>>> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>>> 0x70480
>>>>>>> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>>> [  136.734468] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>> period_bytes=256, periods=2, implicit_fb=1
>>>>>>> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
>>>>>>> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>>> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>>> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>>> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe
>>>>>>> 0x68400
>>>>>>> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
>>>>>>> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
>>>>>>> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>
>>>>>>>
>>>>>>> With the unpatched kernel:
>>>>>>>
>>>>>>> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>>> [  344.813210] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>> period_bytes=256, periods=2, implicit_fb=1
>>>>>>> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>>> [  344.813215] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>> period_bytes=256, periods=2, implicit_fb=0
>>>>>>> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>>> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>>> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>>> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>>> 0x70580
>>>>>>> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>>> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>>> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>>> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe
>>>>>>> 0x68500
>>>>>>> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
>>>>>>> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
>>>>>>> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>>> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>>> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
>>>>>>> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
>>>>>>> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
>>>>>>> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
>>>>>>> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
>>>>>>> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>>> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>>> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>
>>>>>>> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>
>>>>>>>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <
>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>
>>>>>>>>> Hi Geraldo - I don't have that patch applied, but it shouldn't
>>>>>>>>> make any behavioral difference - it just seems to be simplifying the code.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Point taken.
>>>>>>>>
>>>>>>>>
>>>>>>>>> The issue is that the BOSS GT-1 *does* need implicit feedback on
>>>>>>>>> playback to avoid clock timing issues, and the current behavior is
>>>>>>>>> disabling that feedback.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Mike, would you mind posting some dyndbg logs for both the stock
>>>>>>>> behaviour and your endpoint.c/generic quirk modified behaviour?
>>>>>>>>
>>>>>>>> Just add snd_usb_audio.dyndbg=+p to your kernel options and please
>>>>>>>> share the logs.
>>>>>>>>
>>>>>>>>
>>>>>>>>> Mike
>>>>>>>>>
>>>>>>>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for
>>>>>>>>>> capture quirky devices?
>>>>>>>>>>
>>>>>>>>>> You can find it here:
>>>>>>>>>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>>>>>>>>>
>>>>>>>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <
>>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>>
>>>>>>>>>>> I had thought that the recent implicit feedback changes were
>>>>>>>>>>> fully working
>>>>>>>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested
>>>>>>>>>>> well enough.
>>>>>>>>>>>
>>>>>>>>>>> Audio playback and capture works, but with periodic dropouts. I
>>>>>>>>>>> get the
>>>>>>>>>>> exact same behavior as I did with the quirk to completely
>>>>>>>>>>> disable implicit
>>>>>>>>>>> feedback. Without the implicit feedback, you get dropouts from
>>>>>>>>>>> clock drift
>>>>>>>>>>> - how bad probably varies from card to card. On mine it is every
>>>>>>>>>>> second or
>>>>>>>>>>> so.
>>>>>>>>>>>
>>>>>>>>>>> If I switch playback feedback for the GT-1 to generic by doing
>>>>>>>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous
>>>>>>>>>>> old behavior,
>>>>>>>>>>> which is that playback completely fails to start.
>>>>>>>>>>>
>>>>>>>>>>> With generic playback feedback, and using my previous patch to
>>>>>>>>>>> endpoint.c
>>>>>>>>>>> to avoid playback waiting on capture mentioned here:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>>>>>>>>>
>>>>>>>>>>> playback and capture work perfectly for me.
>>>>>>>>>>>
>>>>>>>>>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08 20:14                     ` Geraldo Nascimento
@ 2021-04-08 20:31                       ` Lucas
  2021-04-08 21:05                         ` Geraldo Nascimento
  2021-04-08 20:54                       ` Mike Oliphant
  1 sibling, 1 reply; 48+ messages in thread
From: Lucas @ 2021-04-08 20:31 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel, Mike Oliphant

It's easy enough to get the lsusb -v output you wanted, but I plan to build
one kernel for another topic next.  After that, I'll try re-enabling your
code plus the capture quirk table entry.

Here's lsusb -v for the Roland Boutique D-05, but it seems the endpoints
are the same addresses:
Bus 002 Device 005: ID 0582:01ff Roland Corp. Boutique
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0
  bDeviceProtocol       255
  bMaxPacketSize0        64
  idVendor           0x0582 Roland Corp.
  idProduct          0x01ff
  bcdDevice            1.00
  iManufacturer           1 Roland
  iProduct                2 Boutique
  iSerial                 3 BQ_D382DDA054B5533321C1F1743
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x010e
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      2
      iInterface              0
      ** UNRECOGNIZED:  06 24 f1 01 00 00
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      2
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 01 00 01 00
      ** UNRECOGNIZED:  0b 24 02 01 02 04 18 01 00 77 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0d  EP 13 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0070  1x 112 bytes
        bInterval               1
        INTERFACE CLASS:  06 24 f1 04 12 00
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      2
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 01 00 01 00
      ** UNRECOGNIZED:  0b 24 02 01 02 04 18 01 00 77 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0d  EP 13 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0070  1x 112 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      1
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      1
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 07 00 01 00
      ** UNRECOGNIZED:  0b 24 02 01 02 04 18 01 00 77 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8e  EP 14 IN
        bmAttributes           37
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x0070  1x 112 bytes
        bInterval               1
        INTERFACE CLASS:  06 24 f1 04 12 00
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol      1
      iInterface              0
      ** UNRECOGNIZED:  07 24 01 07 00 01 00
      ** UNRECOGNIZED:  0b 24 02 01 02 04 18 01 00 77 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8e  EP 14 IN
        bmAttributes           37
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x0070  1x 112 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      3
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  06 24 f1 02 01 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      3
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               4

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08 20:14                     ` Geraldo Nascimento
  2021-04-08 20:31                       ` Lucas
@ 2021-04-08 20:54                       ` Mike Oliphant
  2021-04-08 21:24                         ` Geraldo Nascimento
  1 sibling, 1 reply; 48+ messages in thread
From: Mike Oliphant @ 2021-04-08 20:54 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: Lucas, alsa-devel

Geraldo - the implicit feedback stuff is by no means new - it's been there
for quite some time. The recent changes just refactored it a bit.

Mike

On Thu, Apr 8, 2021 at 1:09 PM Geraldo Nascimento <geraldogabriel@gmail.com>
wrote:

> Em Qui, 8 de abr de 2021 16:42, Mike Oliphant <oliphant@nostatic.org>
> escreveu:
>
>> Hi Geraldo - yes. In fact, that is how I've been operating for the past
>> year or so before the recent implicit feedback changes. I use the GT-1 most
>> every day as a guitar interface and it works perfectly.
>>
>
> Thanks Mike, but I'm not sure I understand. You have been operating with
> implicit feedback sync on the playback for the past year? I thought that
> was a new idea?
>
> The key point here is that with a stock kernel you have to comment out the
> IMPLICIT_FB_SKIP_DEV() entry for the GT-1 for the Roland code inside
> audioformat_implicit_fb_quirk properly kick in.
>
> I was suggesting you try your workaround without adding a
> IMPLICIT_FB_GENERIC_DEV() for your device.
>
>
>> The GT-1 (and I suspect many of the other Roland/BOSS devices) doesn't
>> seem to be quirky at all with regard to implicit feedback setup - it works
>> exactly as the endpoint definitions say it should.
>>
>> Where the GT-1 *does* seem to be quirky is that is doesn't seem to want
>> to send capture data until it receives some playback data - hence my
>> endpoint.c patch.
>>
>
> If that is true then there's definitely a need to rewrite endpoint.c. But
> it could be something else, Mike. One thing is certain: the present kernel
> behaviour is far from the ideal.
>
> I insist: engage implicit feedback sync for the playback, disable it for
> the captures and inspect your dyndbg logs for the failure cases in starting
> JACK that happen when you don't patch endpoint.c.
>
> If you see something related to sync_ep then the problem lies elsewhere,
> specifically inside pcm.c
>
> Although whether this behavior is quirky or typical I don't know. I do
>> know that the GT-1 does not claim to be USB class compliant. It requires
>> custom drivers on Windows and macOS and does not work at all with iOS, so
>> it definitely seems to be somewhat non-standard.
>>
>
> Non-standard to say the least. I really hope that's not the case or it'll
> give Takashi Iwai plenty of headache ;-)
>
>
>> Mike
>>
>> On Thu, Apr 8, 2021 at 12:13 PM Geraldo Nascimento <
>> geraldogabriel@gmail.com> wrote:
>>
>>> Hey Mike, got another question for you, sorry about that.
>>>
>>> If you comment out your GT-1 IMPLICIT_FB_GENERIC_DEV() entry and instead
>>> let audioformat_implicit_fb_quirk() call add_roland_implicit_fb() with
>>> everything else customized your way, your custom endpoint.c etc., does it
>>> still work? And does it work crystal clear?
>>>
>>> I'm sorry about this test this, test that, provide the dyndbg logs
>>> attitude but I'm honestly just trying to help you write the best patch
>>> possible.
>>>
>>> Thank you,
>>> Geraldo
>>>
>>> Em Qui, 8 de abr de 2021 02:05, Geraldo Nascimento <
>>> geraldogabriel@gmail.com> escreveu:
>>>
>>>> Mike, I just realize I missed reply-to-all once again.
>>>>
>>>> In case you were wondering, I was looking for a sync_ep event right in
>>>> the start of the loading of snd-usb-audio. It happens inside pcm.c. If you
>>>> see one of those specifically let me know.
>>>>
>>>> With my Pioneer device, the DDJ-SR2, snd-usb-audio recognized the
>>>> device's implicit feedback EP as sync_ep and that prevented JACK from
>>>> starting.
>>>>
>>>> Em Qua, 7 de abr de 2021 23:47, Mike Oliphant <oliphant@nostatic.org>
>>>>> escreveu:
>>>>>
>>>>>> Hi Geraldo - I had the same thought and I have tried enabling
>>>>>> playback feedback while turning off capture feedback without my endpoint
>>>>>> patch. It doesn't work - at least not on the GT-1. Playback/capture fails
>>>>>> to start.
>>>>>>
>>>>>
>>>>> Would you mind sharing the dyndbg logs for the failure case from the
>>>>> point you connect the device, and trying to start JACK?
>>>>>
>>>>> Sometimes failures elucidate more than success cases.
>>>>>
>>>>>
>>>>>> Speaking of testing, if you (or anyone else following this
>>>>>> discussion) have one of these Roland/BOSS devices, it would be great if you
>>>>>> could try testing with playback feedback enabled and my endpoint.c
>>>>>> workaround.
>>>>>>
>>>>>
>>>>> I don't have the hardware, but I'm sure it works. The problem is that
>>>>> endpoint.c code really shouldn't be disabled unless all the other options
>>>>> fail, and even then, I'm not so sure the maintainers will be so willing to
>>>>> disable it. So let's keep some other options on the table by debugging a
>>>>> little further.
>>>>>
>>>>> Thank you,
>>>>> Geraldo
>>>>>
>>>>>
>>>>>> Mike
>>>>>>
>>>>>> On Wed, Apr 7, 2021 at 7:21 PM Geraldo Nascimento <
>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>
>>>>>>> Thanks, Mike, one thing I can tell you right off the bat is that if
>>>>>>> you turn implicit feedback sync on for both endpoints at the same time like
>>>>>>> you mentioned, without your workaround inside endpoint.c, they most likely
>>>>>>> will stall because they would both be waiting for each other to start.
>>>>>>>
>>>>>>> Have you tried engaging the generic implicit feedback sync just for
>>>>>>> the playback, thereby commenting out the capture implicit feedback entries,
>>>>>>> and re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside
>>>>>>> endpoint.c? Does playback still fail to start?
>>>>>>>
>>>>>>> If you choose to perform this simple test please share with us the
>>>>>>> test's dyndbg logs right from the moment you turn on the device, not just
>>>>>>> after you start jackd.
>>>>>>>
>>>>>>> Sorry for the endless do-this, do-that. Such is the pace of
>>>>>>> teledebugging
>>>>>>>
>>>>>>>
>>>>>>> Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <oliphant@nostatic.org>
>>>>>>> escreveu:
>>>>>>>
>>>>>>>> Geraldo - here is the dmesg output when starting up jackd for
>>>>>>>> capture/playback:
>>>>>>>>
>>>>>>>> With my patch:
>>>>>>>>
>>>>>>>> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>>>> [  136.734088] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>>> period_bytes=256, periods=2, implicit_fb=0
>>>>>>>> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>>>> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>>>> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>>>> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>>>> 0x70480
>>>>>>>> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>>>> [  136.734468] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>>> period_bytes=256, periods=2, implicit_fb=1
>>>>>>>> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
>>>>>>>> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>>>> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>>>> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>>>> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe
>>>>>>>> 0x68400
>>>>>>>> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
>>>>>>>> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
>>>>>>>> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>>
>>>>>>>>
>>>>>>>> With the unpatched kernel:
>>>>>>>>
>>>>>>>> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>>>> [  344.813210] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>>> period_bytes=256, periods=2, implicit_fb=1
>>>>>>>> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>>>> [  344.813215] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>>> period_bytes=256, periods=2, implicit_fb=0
>>>>>>>> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>>>> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>>>> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>>>> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>>>> 0x70580
>>>>>>>> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>>>> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>>>> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>>>> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe
>>>>>>>> 0x68500
>>>>>>>> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
>>>>>>>> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
>>>>>>>> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>>>> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>>>> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
>>>>>>>> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
>>>>>>>> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
>>>>>>>> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
>>>>>>>> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
>>>>>>>> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>>>> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>>>> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>>
>>>>>>>> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <
>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>
>>>>>>>>>> Hi Geraldo - I don't have that patch applied, but it shouldn't
>>>>>>>>>> make any behavioral difference - it just seems to be simplifying the code.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Point taken.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> The issue is that the BOSS GT-1 *does* need implicit feedback on
>>>>>>>>>> playback to avoid clock timing issues, and the current behavior is
>>>>>>>>>> disabling that feedback.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Mike, would you mind posting some dyndbg logs for both the stock
>>>>>>>>> behaviour and your endpoint.c/generic quirk modified behaviour?
>>>>>>>>>
>>>>>>>>> Just add snd_usb_audio.dyndbg=+p to your kernel options and please
>>>>>>>>> share the logs.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Mike
>>>>>>>>>>
>>>>>>>>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>>>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for
>>>>>>>>>>> capture quirky devices?
>>>>>>>>>>>
>>>>>>>>>>> You can find it here:
>>>>>>>>>>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>>>>>>>>>>
>>>>>>>>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <
>>>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>>>
>>>>>>>>>>>> I had thought that the recent implicit feedback changes were
>>>>>>>>>>>> fully working
>>>>>>>>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested
>>>>>>>>>>>> well enough.
>>>>>>>>>>>>
>>>>>>>>>>>> Audio playback and capture works, but with periodic dropouts. I
>>>>>>>>>>>> get the
>>>>>>>>>>>> exact same behavior as I did with the quirk to completely
>>>>>>>>>>>> disable implicit
>>>>>>>>>>>> feedback. Without the implicit feedback, you get dropouts from
>>>>>>>>>>>> clock drift
>>>>>>>>>>>> - how bad probably varies from card to card. On mine it is
>>>>>>>>>>>> every second or
>>>>>>>>>>>> so.
>>>>>>>>>>>>
>>>>>>>>>>>> If I switch playback feedback for the GT-1 to generic by doing
>>>>>>>>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous
>>>>>>>>>>>> old behavior,
>>>>>>>>>>>> which is that playback completely fails to start.
>>>>>>>>>>>>
>>>>>>>>>>>> With generic playback feedback, and using my previous patch to
>>>>>>>>>>>> endpoint.c
>>>>>>>>>>>> to avoid playback waiting on capture mentioned here:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>>>>>>>>>>
>>>>>>>>>>>> playback and capture work perfectly for me.
>>>>>>>>>>>>
>>>>>>>>>>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08 20:31                       ` Lucas
@ 2021-04-08 21:05                         ` Geraldo Nascimento
  2021-04-08 21:21                           ` Lucas
  0 siblings, 1 reply; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-08 21:05 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel, Mike Oliphant

Em Qui, 8 de abr de 2021 17:31, Lucas <jaffa225man@gmail.com> escreveu:

> It's easy enough to get the lsusb -v output you wanted, but I plan to
> build one kernel for another topic next.  After that, I'll try re-enabling
> your code plus the capture quirk table entry.
>

No need to rebuild the kernel, Lucas, cd to /usr/src/linux and make -C .
M=sound/usb

This will rebuild the usb sound modules only, which will taint the kernel
but at least will spare you some time and some reboots.

After building the modules, modprobe -r the modules you want to reload,
copy the relevant .ko files to the proper place inside /lib/modules and use
the depmod command.



> Here's lsusb -v for the Roland Boutique D-05, but it seems the endpoints
> are the same addresses:
> Bus 002 Device 005: ID 0582:01ff Roland Corp. Boutique
> Couldn't open device, some information will be missing
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
>   bDeviceClass          255 Vendor Specific Class
>   bDeviceSubClass         0
>   bDeviceProtocol       255
>   bMaxPacketSize0        64
>   idVendor           0x0582 Roland Corp.
>   idProduct          0x01ff
>   bcdDevice            1.00
>   iManufacturer           1 Roland
>   iProduct                2 Boutique
>   iSerial                 3 BQ_D382DDA054B5533321C1F1743
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength       0x010e
>     bNumInterfaces          4
>     bConfigurationValue     1
>     iConfiguration          0
>     bmAttributes         0x80
>       (Bus Powered)
>     MaxPower              500mA
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           0
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass    255 Vendor Specific Subclass
>       bInterfaceProtocol      0
>       iInterface              0
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        1
>       bAlternateSetting       0
>       bNumEndpoints           0
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      2
>       bInterfaceProtocol      2
>       iInterface              0
>       ** UNRECOGNIZED:  06 24 f1 01 00 00
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        1
>       bAlternateSetting       1
>       bNumEndpoints           1
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      2
>       bInterfaceProtocol      2
>       iInterface              0
>       ** UNRECOGNIZED:  07 24 01 01 00 01 00
>       ** UNRECOGNIZED:  0b 24 02 01 02 04 18 01 00 77 01
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x0d  EP 13 OUT
>         bmAttributes            5
>           Transfer Type            Isochronous
>           Synch Type               Asynchronous
>           Usage Type               Data
>         wMaxPacketSize     0x0070  1x 112 bytes
>         bInterval               1
>         INTERFACE CLASS:  06 24 f1 04 12 00
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        1
>       bAlternateSetting       2
>       bNumEndpoints           1
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      2
>       bInterfaceProtocol      2
>       iInterface              0
>       ** UNRECOGNIZED:  07 24 01 01 00 01 00
>       ** UNRECOGNIZED:  0b 24 02 01 02 04 18 01 00 77 01
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x0d  EP 13 OUT
>         bmAttributes            5
>           Transfer Type            Isochronous
>           Synch Type               Asynchronous
>           Usage Type               Data
>         wMaxPacketSize     0x0070  1x 112 bytes
>         bInterval               1
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        2
>       bAlternateSetting       0
>       bNumEndpoints           0
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      2
>       bInterfaceProtocol      1
>       iInterface              0
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        2
>       bAlternateSetting       1
>       bNumEndpoints           1
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      2
>       bInterfaceProtocol      1
>       iInterface              0
>       ** UNRECOGNIZED:  07 24 01 07 00 01 00
>       ** UNRECOGNIZED:  0b 24 02 01 02 04 18 01 00 77 01
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x8e  EP 14 IN
>         bmAttributes           37
>           Transfer Type            Isochronous
>           Synch Type               Asynchronous
>           Usage Type               Implicit feedback Data
>         wMaxPacketSize     0x0070  1x 112 bytes
>         bInterval               1
>         INTERFACE CLASS:  06 24 f1 04 12 00
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        2
>       bAlternateSetting       2
>       bNumEndpoints           1
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      2
>       bInterfaceProtocol      1
>       iInterface              0
>       ** UNRECOGNIZED:  07 24 01 07 00 01 00
>       ** UNRECOGNIZED:  0b 24 02 01 02 04 18 01 00 77 01
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x8e  EP 14 IN
>         bmAttributes           37
>           Transfer Type            Isochronous
>           Synch Type               Asynchronous
>           Usage Type               Implicit feedback Data
>         wMaxPacketSize     0x0070  1x 112 bytes
>         bInterval               1
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        3
>       bAlternateSetting       0
>       bNumEndpoints           2
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      3
>       bInterfaceProtocol      0
>       iInterface              0
>       ** UNRECOGNIZED:  06 24 f1 02 01 01
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x03  EP 3 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               1
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x84  EP 4 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0200  1x 512 bytes
>         bInterval               0
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        3
>       bAlternateSetting       1
>       bNumEndpoints           2
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass      3
>       bInterfaceProtocol      0
>       iInterface              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x03  EP 3 OUT
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0040  1x 64 bytes
>         bInterval               4
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x85  EP 5 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0040  1x 64 bytes
>         bInterval               4
>
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08 21:05                         ` Geraldo Nascimento
@ 2021-04-08 21:21                           ` Lucas
  0 siblings, 0 replies; 48+ messages in thread
From: Lucas @ 2021-04-08 21:21 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel, Mike Oliphant

Thanks for the tips Geraldo, but with an effort to avoid anything that
might be forgotten or is more difficult to undo, I've been building my
kernel the debian suggested method of "make deb-pkg" (with -j4 added to
speed it up) in /usr/src/linux-5.11.9/, and something like "dpkg -i
../linux-image-5.11.9_5.11.9_amd64.deb".  The "make -j4 deb-pkg" command
runs "make clean" first, every time.  To make matters even worse, my boot
partition is too small to hold more than 4 modern kernels, so I "apt-get
remove linux-image-5.11.9" each time before building the next test.  Each
build takes about two hours...  :)  I'm not complaining, though.  I'm just
trying to explain why I have been doing it this way.  I'm sure you're
right, though, that your commands would be spiffy. ;)

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08 20:54                       ` Mike Oliphant
@ 2021-04-08 21:24                         ` Geraldo Nascimento
  2021-04-08 22:02                           ` Mike Oliphant
  0 siblings, 1 reply; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-08 21:24 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: Lucas, alsa-devel

Mike, could you test the following patch instead of your own modifications?

Lucas, you can test it too, just modify it for your devices.

Since I don't own any Roland devices this is of course completely untested,
but it's worth a try.

--- implicit.c.git      2021-04-04 20:51:57.226754632 -0300
+++ implicit.c  2021-04-08 18:15:02.971301050 -0300
@@ -75,7 +75,7 @@ static const struct snd_usb_implicit_fb_
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171),   /* BOSS RC-505 */
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185),   /* BOSS GP-10 */
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189),   /* BOSS GT-100v2 */
-       IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6),   /* BOSS GT-1 */
+       //IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8),   /* BOSS Katana */
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5),   /* BOSS GT-001 */
        IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
@@ -89,7 +89,7 @@ static const struct snd_usb_implicit_fb_
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505 */
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS GT-100v2
*/
-       IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
+       //IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana */
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
        IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */
@@ -339,8 +339,19 @@ int snd_usb_parse_implicit_fb_quirk(stru
                                    struct audioformat *fmt,
                                    struct usb_host_interface *alts)
 {
-       if (fmt->endpoint & USB_DIR_IN)
+        bool isRolandGT1;
+
+        if (alts->desc.bInterfaceClass == USB_CLASS_VENDOR_SPEC &&
+            (USB_ID_VENDOR(chip->usb_id) == 0x0582 &&
+             USB_ID_PRODUCT(chip->usb_id) == 0x01d6 /* BOSS GT-1 */))
+            isRolandGT1 = true;
+
+       if (fmt->endpoint & USB_DIR_IN) {
+                if (isRolandGT1 == true)
+                    return 1;
                return audioformat_capture_quirk(chip, fmt, alts);
+       }
+
        else
                return audioformat_implicit_fb_quirk(chip, fmt, alts);
 }

On Thu, Apr 8, 2021 at 5:54 PM Mike Oliphant <oliphant@nostatic.org> wrote:

> Geraldo - the implicit feedback stuff is by no means new - it's been there
> for quite some time. The recent changes just refactored it a bit.
>
> Mike
>
> On Thu, Apr 8, 2021 at 1:09 PM Geraldo Nascimento <
> geraldogabriel@gmail.com> wrote:
>
>> Em Qui, 8 de abr de 2021 16:42, Mike Oliphant <oliphant@nostatic.org>
>> escreveu:
>>
>>> Hi Geraldo - yes. In fact, that is how I've been operating for the past
>>> year or so before the recent implicit feedback changes. I use the GT-1 most
>>> every day as a guitar interface and it works perfectly.
>>>
>>
>> Thanks Mike, but I'm not sure I understand. You have been operating with
>> implicit feedback sync on the playback for the past year? I thought that
>> was a new idea?
>>
>> The key point here is that with a stock kernel you have to comment out
>> the IMPLICIT_FB_SKIP_DEV() entry for the GT-1 for the Roland code inside
>> audioformat_implicit_fb_quirk properly kick in.
>>
>> I was suggesting you try your workaround without adding a
>> IMPLICIT_FB_GENERIC_DEV() for your device.
>>
>>
>>> The GT-1 (and I suspect many of the other Roland/BOSS devices) doesn't
>>> seem to be quirky at all with regard to implicit feedback setup - it works
>>> exactly as the endpoint definitions say it should.
>>>
>>> Where the GT-1 *does* seem to be quirky is that is doesn't seem to want
>>> to send capture data until it receives some playback data - hence my
>>> endpoint.c patch.
>>>
>>
>> If that is true then there's definitely a need to rewrite endpoint.c. But
>> it could be something else, Mike. One thing is certain: the present kernel
>> behaviour is far from the ideal.
>>
>> I insist: engage implicit feedback sync for the playback, disable it for
>> the captures and inspect your dyndbg logs for the failure cases in starting
>> JACK that happen when you don't patch endpoint.c.
>>
>> If you see something related to sync_ep then the problem lies elsewhere,
>> specifically inside pcm.c
>>
>> Although whether this behavior is quirky or typical I don't know. I do
>>> know that the GT-1 does not claim to be USB class compliant. It requires
>>> custom drivers on Windows and macOS and does not work at all with iOS, so
>>> it definitely seems to be somewhat non-standard.
>>>
>>
>> Non-standard to say the least. I really hope that's not the case or it'll
>> give Takashi Iwai plenty of headache ;-)
>>
>>
>>> Mike
>>>
>>> On Thu, Apr 8, 2021 at 12:13 PM Geraldo Nascimento <
>>> geraldogabriel@gmail.com> wrote:
>>>
>>>> Hey Mike, got another question for you, sorry about that.
>>>>
>>>> If you comment out your GT-1 IMPLICIT_FB_GENERIC_DEV() entry and
>>>> instead let audioformat_implicit_fb_quirk() call add_roland_implicit_fb()
>>>> with everything else customized your way, your custom endpoint.c etc., does
>>>> it still work? And does it work crystal clear?
>>>>
>>>> I'm sorry about this test this, test that, provide the dyndbg logs
>>>> attitude but I'm honestly just trying to help you write the best patch
>>>> possible.
>>>>
>>>> Thank you,
>>>> Geraldo
>>>>
>>>> Em Qui, 8 de abr de 2021 02:05, Geraldo Nascimento <
>>>> geraldogabriel@gmail.com> escreveu:
>>>>
>>>>> Mike, I just realize I missed reply-to-all once again.
>>>>>
>>>>> In case you were wondering, I was looking for a sync_ep event right in
>>>>> the start of the loading of snd-usb-audio. It happens inside pcm.c. If you
>>>>> see one of those specifically let me know.
>>>>>
>>>>> With my Pioneer device, the DDJ-SR2, snd-usb-audio recognized the
>>>>> device's implicit feedback EP as sync_ep and that prevented JACK from
>>>>> starting.
>>>>>
>>>>> Em Qua, 7 de abr de 2021 23:47, Mike Oliphant <oliphant@nostatic.org>
>>>>>> escreveu:
>>>>>>
>>>>>>> Hi Geraldo - I had the same thought and I have tried enabling
>>>>>>> playback feedback while turning off capture feedback without my endpoint
>>>>>>> patch. It doesn't work - at least not on the GT-1. Playback/capture fails
>>>>>>> to start.
>>>>>>>
>>>>>>
>>>>>> Would you mind sharing the dyndbg logs for the failure case from the
>>>>>> point you connect the device, and trying to start JACK?
>>>>>>
>>>>>> Sometimes failures elucidate more than success cases.
>>>>>>
>>>>>>
>>>>>>> Speaking of testing, if you (or anyone else following this
>>>>>>> discussion) have one of these Roland/BOSS devices, it would be great if you
>>>>>>> could try testing with playback feedback enabled and my endpoint.c
>>>>>>> workaround.
>>>>>>>
>>>>>>
>>>>>> I don't have the hardware, but I'm sure it works. The problem is that
>>>>>> endpoint.c code really shouldn't be disabled unless all the other options
>>>>>> fail, and even then, I'm not so sure the maintainers will be so willing to
>>>>>> disable it. So let's keep some other options on the table by debugging a
>>>>>> little further.
>>>>>>
>>>>>> Thank you,
>>>>>> Geraldo
>>>>>>
>>>>>>
>>>>>>> Mike
>>>>>>>
>>>>>>> On Wed, Apr 7, 2021 at 7:21 PM Geraldo Nascimento <
>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>
>>>>>>>> Thanks, Mike, one thing I can tell you right off the bat is that if
>>>>>>>> you turn implicit feedback sync on for both endpoints at the same time like
>>>>>>>> you mentioned, without your workaround inside endpoint.c, they most likely
>>>>>>>> will stall because they would both be waiting for each other to start.
>>>>>>>>
>>>>>>>> Have you tried engaging the generic implicit feedback sync just for
>>>>>>>> the playback, thereby commenting out the capture implicit feedback entries,
>>>>>>>> and re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside
>>>>>>>> endpoint.c? Does playback still fail to start?
>>>>>>>>
>>>>>>>> If you choose to perform this simple test please share with us the
>>>>>>>> test's dyndbg logs right from the moment you turn on the device, not just
>>>>>>>> after you start jackd.
>>>>>>>>
>>>>>>>> Sorry for the endless do-this, do-that. Such is the pace of
>>>>>>>> teledebugging
>>>>>>>>
>>>>>>>>
>>>>>>>> Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <
>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>
>>>>>>>>> Geraldo - here is the dmesg output when starting up jackd for
>>>>>>>>> capture/playback:
>>>>>>>>>
>>>>>>>>> With my patch:
>>>>>>>>>
>>>>>>>>> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>>>>> [  136.734088] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>>>> period_bytes=256, periods=2, implicit_fb=0
>>>>>>>>> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>>>>> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>>>>> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>>>>> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>>>>> 0x70480
>>>>>>>>> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>>> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>>>>> [  136.734468] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>>>> period_bytes=256, periods=2, implicit_fb=1
>>>>>>>>> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
>>>>>>>>> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>>>>> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>>>>> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>>>>> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe
>>>>>>>>> 0x68400
>>>>>>>>> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>>> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>>> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
>>>>>>>>> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>>> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>>> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
>>>>>>>>> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>>> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> With the unpatched kernel:
>>>>>>>>>
>>>>>>>>> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>>>>> [  344.813210] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>>>> period_bytes=256, periods=2, implicit_fb=1
>>>>>>>>> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>>>>> [  344.813215] usb 3-1.2:   channels=2, rate=44100, format=S32_LE,
>>>>>>>>> period_bytes=256, periods=2, implicit_fb=0
>>>>>>>>> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>>>>> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>>>>> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>>>>> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>>>>> 0x70580
>>>>>>>>> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>>> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>>>>> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>>>>> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>>>>> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe
>>>>>>>>> 0x68500
>>>>>>>>> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
>>>>>>>>> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
>>>>>>>>> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>>> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>>>>> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>>> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>>> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>>>>> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>>> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>>> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
>>>>>>>>> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
>>>>>>>>> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
>>>>>>>>> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
>>>>>>>>> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
>>>>>>>>> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>>> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>>>>> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>>> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>>> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>>>>> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>>> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>>>
>>>>>>>>> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
>>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <
>>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>>
>>>>>>>>>>> Hi Geraldo - I don't have that patch applied, but it shouldn't
>>>>>>>>>>> make any behavioral difference - it just seems to be simplifying the code.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Point taken.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> The issue is that the BOSS GT-1 *does* need implicit feedback on
>>>>>>>>>>> playback to avoid clock timing issues, and the current behavior is
>>>>>>>>>>> disabling that feedback.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Mike, would you mind posting some dyndbg logs for both the stock
>>>>>>>>>> behaviour and your endpoint.c/generic quirk modified behaviour?
>>>>>>>>>>
>>>>>>>>>> Just add snd_usb_audio.dyndbg=+p to your kernel options and
>>>>>>>>>> please share the logs.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Mike
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>>>>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for
>>>>>>>>>>>> capture quirky devices?
>>>>>>>>>>>>
>>>>>>>>>>>> You can find it here:
>>>>>>>>>>>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>>>>>>>>>>>
>>>>>>>>>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <
>>>>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>>>>
>>>>>>>>>>>>> I had thought that the recent implicit feedback changes were
>>>>>>>>>>>>> fully working
>>>>>>>>>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested
>>>>>>>>>>>>> well enough.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Audio playback and capture works, but with periodic dropouts.
>>>>>>>>>>>>> I get the
>>>>>>>>>>>>> exact same behavior as I did with the quirk to completely
>>>>>>>>>>>>> disable implicit
>>>>>>>>>>>>> feedback. Without the implicit feedback, you get dropouts from
>>>>>>>>>>>>> clock drift
>>>>>>>>>>>>> - how bad probably varies from card to card. On mine it is
>>>>>>>>>>>>> every second or
>>>>>>>>>>>>> so.
>>>>>>>>>>>>>
>>>>>>>>>>>>> If I switch playback feedback for the GT-1 to generic by doing
>>>>>>>>>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous
>>>>>>>>>>>>> old behavior,
>>>>>>>>>>>>> which is that playback completely fails to start.
>>>>>>>>>>>>>
>>>>>>>>>>>>> With generic playback feedback, and using my previous patch to
>>>>>>>>>>>>> endpoint.c
>>>>>>>>>>>>> to avoid playback waiting on capture mentioned here:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>>>>>>>>>>>
>>>>>>>>>>>>> playback and capture work perfectly for me.
>>>>>>>>>>>>>
>>>>>>>>>>>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08 21:24                         ` Geraldo Nascimento
@ 2021-04-08 22:02                           ` Mike Oliphant
  2021-04-09  1:04                             ` Geraldo Nascimento
  0 siblings, 1 reply; 48+ messages in thread
From: Mike Oliphant @ 2021-04-08 22:02 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: Lucas, alsa-devel

Geraldo - not sure what your patch was intended to do, but it results in
the same behavior. With implicit feedback enabled for playback but without
the endpoint.c patch, playback fails to initialize. I'm including the dmesg
log below. The key message is the "No URB submission due to implicit fb
sync" line, which is what the endpoint.c patch avoids.

Mike

-- device plugged in

[ 1066.587414] usb 4-1.2: new high-speed USB device number 12 using ehci-pci
[ 1066.697993] usb 4-1.2: New USB device found, idVendor=0582,
idProduct=01d6, bcdDevice= 0.00
[ 1066.698013] usb 4-1.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[ 1066.698020] usb 4-1.2: Product: GT-1
[ 1066.698024] usb 4-1.2: Manufacturer: BOSS
[ 1066.701638] usb 4-1.2: 1:1: added playback implicit_fb sync_ep 8e, iface
2:1
[ 1066.701655] usb 4-1.2: 1:1: add audio endpoint 0xd
[ 1066.701680] usb 4-1.2: Creating new data endpoint #d
[ 1066.701682] usb 4-1.2: Creating new data endpoint #8e
[ 1066.701828] usb 4-1.2: 1:1 Set sample rate 44100, clock 0
[ 1066.702337] usb 4-1.2: 2:1: add audio endpoint 0x8e
[ 1066.702522] usb 4-1.2: 2:1 Set sample rate 44100, clock 0

-- jackd started for capture/playback

[ 1072.455008] usb 4-1.2: Open EP 0x8e, iface=2:1, idx=0
[ 1072.455016] usb 4-1.2:   channels=2, rate=44100, format=S32_LE,
period_bytes=256, periods=2, implicit_fb=0
[ 1072.455020] usb 4-1.2: Setting usb interface 2:0 for EP 0x8e
[ 1072.455096] usb 4-1.2: Setting usb interface 2:1 for EP 0x8e
[ 1072.455286] usb 4-1.2: 2:1 Set sample rate 44100, clock 0
[ 1072.455296] usb 4-1.2: Setting params for data EP 0x8e, pipe 0x70c80
[ 1072.455316] usb 4-1.2: Set up 12 URBS, ret=0
[ 1072.455418] usb 4-1.2: Open EP 0xd, iface=1:1, idx=0
[ 1072.455421] usb 4-1.2:   channels=2, rate=44100, format=S32_LE,
period_bytes=256, periods=2, implicit_fb=1
[ 1072.455425] usb 4-1.2: Reopened EP 0x8e (count 1)
[ 1072.455442] usb 4-1.2: Setting usb interface 1:0 for EP 0xd
[ 1072.455633] usb 4-1.2: Setting usb interface 1:1 for EP 0xd
[ 1072.455741] usb 4-1.2: 1:1 Set sample rate 44100, clock 0
[ 1072.455747] usb 4-1.2: Setting params for data EP 0xd, pipe 0x68c00
[ 1072.455754] usb 4-1.2: Set up 12 URBS, ret=0
[ 1072.455784] usb 4-1.2: Starting data EP 0xd (running 0)
[ 1072.455788] usb 4-1.2: No URB submission due to implicit fb sync
[ 1072.455790] usb 4-1.2: Starting data EP 0x8e (running 0)
[ 1072.455828] usb 4-1.2: 12 URBs submitted for EP 0x8e
[ 1072.461297] usb 4-1.2: Starting data EP 0x8e (running 1)
[ 1072.461313] usb 4-1.2: 2:1 Start Capture PCM
[ 1072.461316] usb 4-1.2: 1:1 Start Playback PCM
[ 1073.549291] usb 4-1.2: Stopping data EP 0x8e (running 2)
[ 1073.549297] usb 4-1.2: 2:1 Stop Capture PCM
[ 1073.549300] usb 4-1.2: Stopping data EP 0x8e (running 1)
[ 1073.549307] usb 4-1.2: Stopping data EP 0xd (running 1)
[ 1073.549309] usb 4-1.2: 1:1 Stop Playback PCM
[ 1073.581795] usb 4-1.2: Closing EP 0x8e (count 2)
[ 1073.581814] usb 4-1.2: Closing EP 0xd (count 1)
[ 1073.581816] usb 4-1.2: Setting usb interface 1:0 for EP 0xd
[ 1073.582098] usb 4-1.2: EP 0xd closed
[ 1073.582102] usb 4-1.2: Closing EP 0x8e (count 1)
[ 1073.582104] usb 4-1.2: Setting usb interface 2:0 for EP 0x8e
[ 1073.582331] usb 4-1.2: EP 0x8e closed

-- jackd fails to start

On Thu, Apr 8, 2021 at 2:28 PM Geraldo Nascimento <geraldogabriel@gmail.com>
wrote:

> Mike, could you test the following patch instead of your own modifications?
>
> Lucas, you can test it too, just modify it for your devices.
>
> Since I don't own any Roland devices this is of course completely
> untested, but it's worth a try.
>
> --- implicit.c.git      2021-04-04 20:51:57.226754632 -0300
> +++ implicit.c  2021-04-08 18:15:02.971301050 -0300
> @@ -75,7 +75,7 @@ static const struct snd_usb_implicit_fb_
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171),   /* BOSS RC-505 */
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185),   /* BOSS GP-10 */
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189),   /* BOSS GT-100v2 */
> -       IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6),   /* BOSS GT-1 */
> +       //IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8),   /* BOSS Katana */
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5),   /* BOSS GT-001 */
>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
> @@ -89,7 +89,7 @@ static const struct snd_usb_implicit_fb_
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505
> */
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS
> GT-100v2 */
> -       IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
> +       //IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1
> */
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana
> */
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001
> */
>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */
> @@ -339,8 +339,19 @@ int snd_usb_parse_implicit_fb_quirk(stru
>                                     struct audioformat *fmt,
>                                     struct usb_host_interface *alts)
>  {
> -       if (fmt->endpoint & USB_DIR_IN)
> +        bool isRolandGT1;
> +
> +        if (alts->desc.bInterfaceClass == USB_CLASS_VENDOR_SPEC &&
> +            (USB_ID_VENDOR(chip->usb_id) == 0x0582 &&
> +             USB_ID_PRODUCT(chip->usb_id) == 0x01d6 /* BOSS GT-1 */))
> +            isRolandGT1 = true;
> +
> +       if (fmt->endpoint & USB_DIR_IN) {
> +                if (isRolandGT1 == true)
> +                    return 1;
>                 return audioformat_capture_quirk(chip, fmt, alts);
> +       }
> +
>         else
>                 return audioformat_implicit_fb_quirk(chip, fmt, alts);
>  }
>
> On Thu, Apr 8, 2021 at 5:54 PM Mike Oliphant <oliphant@nostatic.org>
> wrote:
>
>> Geraldo - the implicit feedback stuff is by no means new - it's been
>> there for quite some time. The recent changes just refactored it a bit.
>>
>> Mike
>>
>> On Thu, Apr 8, 2021 at 1:09 PM Geraldo Nascimento <
>> geraldogabriel@gmail.com> wrote:
>>
>>> Em Qui, 8 de abr de 2021 16:42, Mike Oliphant <oliphant@nostatic.org>
>>> escreveu:
>>>
>>>> Hi Geraldo - yes. In fact, that is how I've been operating for the past
>>>> year or so before the recent implicit feedback changes. I use the GT-1 most
>>>> every day as a guitar interface and it works perfectly.
>>>>
>>>
>>> Thanks Mike, but I'm not sure I understand. You have been operating with
>>> implicit feedback sync on the playback for the past year? I thought that
>>> was a new idea?
>>>
>>> The key point here is that with a stock kernel you have to comment out
>>> the IMPLICIT_FB_SKIP_DEV() entry for the GT-1 for the Roland code inside
>>> audioformat_implicit_fb_quirk properly kick in.
>>>
>>> I was suggesting you try your workaround without adding a
>>> IMPLICIT_FB_GENERIC_DEV() for your device.
>>>
>>>
>>>> The GT-1 (and I suspect many of the other Roland/BOSS devices) doesn't
>>>> seem to be quirky at all with regard to implicit feedback setup - it works
>>>> exactly as the endpoint definitions say it should.
>>>>
>>>> Where the GT-1 *does* seem to be quirky is that is doesn't seem to want
>>>> to send capture data until it receives some playback data - hence my
>>>> endpoint.c patch.
>>>>
>>>
>>> If that is true then there's definitely a need to rewrite endpoint.c.
>>> But it could be something else, Mike. One thing is certain: the present
>>> kernel behaviour is far from the ideal.
>>>
>>> I insist: engage implicit feedback sync for the playback, disable it for
>>> the captures and inspect your dyndbg logs for the failure cases in starting
>>> JACK that happen when you don't patch endpoint.c.
>>>
>>> If you see something related to sync_ep then the problem lies elsewhere,
>>> specifically inside pcm.c
>>>
>>> Although whether this behavior is quirky or typical I don't know. I do
>>>> know that the GT-1 does not claim to be USB class compliant. It requires
>>>> custom drivers on Windows and macOS and does not work at all with iOS, so
>>>> it definitely seems to be somewhat non-standard.
>>>>
>>>
>>> Non-standard to say the least. I really hope that's not the case or
>>> it'll give Takashi Iwai plenty of headache ;-)
>>>
>>>
>>>> Mike
>>>>
>>>> On Thu, Apr 8, 2021 at 12:13 PM Geraldo Nascimento <
>>>> geraldogabriel@gmail.com> wrote:
>>>>
>>>>> Hey Mike, got another question for you, sorry about that.
>>>>>
>>>>> If you comment out your GT-1 IMPLICIT_FB_GENERIC_DEV() entry and
>>>>> instead let audioformat_implicit_fb_quirk() call add_roland_implicit_fb()
>>>>> with everything else customized your way, your custom endpoint.c etc., does
>>>>> it still work? And does it work crystal clear?
>>>>>
>>>>> I'm sorry about this test this, test that, provide the dyndbg logs
>>>>> attitude but I'm honestly just trying to help you write the best patch
>>>>> possible.
>>>>>
>>>>> Thank you,
>>>>> Geraldo
>>>>>
>>>>> Em Qui, 8 de abr de 2021 02:05, Geraldo Nascimento <
>>>>> geraldogabriel@gmail.com> escreveu:
>>>>>
>>>>>> Mike, I just realize I missed reply-to-all once again.
>>>>>>
>>>>>> In case you were wondering, I was looking for a sync_ep event right
>>>>>> in the start of the loading of snd-usb-audio. It happens inside pcm.c. If
>>>>>> you see one of those specifically let me know.
>>>>>>
>>>>>> With my Pioneer device, the DDJ-SR2, snd-usb-audio recognized the
>>>>>> device's implicit feedback EP as sync_ep and that prevented JACK from
>>>>>> starting.
>>>>>>
>>>>>> Em Qua, 7 de abr de 2021 23:47, Mike Oliphant <oliphant@nostatic.org>
>>>>>>> escreveu:
>>>>>>>
>>>>>>>> Hi Geraldo - I had the same thought and I have tried enabling
>>>>>>>> playback feedback while turning off capture feedback without my endpoint
>>>>>>>> patch. It doesn't work - at least not on the GT-1. Playback/capture fails
>>>>>>>> to start.
>>>>>>>>
>>>>>>>
>>>>>>> Would you mind sharing the dyndbg logs for the failure case from the
>>>>>>> point you connect the device, and trying to start JACK?
>>>>>>>
>>>>>>> Sometimes failures elucidate more than success cases.
>>>>>>>
>>>>>>>
>>>>>>>> Speaking of testing, if you (or anyone else following this
>>>>>>>> discussion) have one of these Roland/BOSS devices, it would be great if you
>>>>>>>> could try testing with playback feedback enabled and my endpoint.c
>>>>>>>> workaround.
>>>>>>>>
>>>>>>>
>>>>>>> I don't have the hardware, but I'm sure it works. The problem is
>>>>>>> that endpoint.c code really shouldn't be disabled unless all the other
>>>>>>> options fail, and even then, I'm not so sure the maintainers will be so
>>>>>>> willing to disable it. So let's keep some other options on the table by
>>>>>>> debugging a little further.
>>>>>>>
>>>>>>> Thank you,
>>>>>>> Geraldo
>>>>>>>
>>>>>>>
>>>>>>>> Mike
>>>>>>>>
>>>>>>>> On Wed, Apr 7, 2021 at 7:21 PM Geraldo Nascimento <
>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Thanks, Mike, one thing I can tell you right off the bat is that
>>>>>>>>> if you turn implicit feedback sync on for both endpoints at the same time
>>>>>>>>> like you mentioned, without your workaround inside endpoint.c, they most
>>>>>>>>> likely will stall because they would both be waiting for each other to
>>>>>>>>> start.
>>>>>>>>>
>>>>>>>>> Have you tried engaging the generic implicit feedback sync just
>>>>>>>>> for the playback, thereby commenting out the capture implicit feedback
>>>>>>>>> entries, and re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside
>>>>>>>>> endpoint.c? Does playback still fail to start?
>>>>>>>>>
>>>>>>>>> If you choose to perform this simple test please share with us the
>>>>>>>>> test's dyndbg logs right from the moment you turn on the device, not just
>>>>>>>>> after you start jackd.
>>>>>>>>>
>>>>>>>>> Sorry for the endless do-this, do-that. Such is the pace of
>>>>>>>>> teledebugging
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <
>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>
>>>>>>>>>> Geraldo - here is the dmesg output when starting up jackd for
>>>>>>>>>> capture/playback:
>>>>>>>>>>
>>>>>>>>>> With my patch:
>>>>>>>>>>
>>>>>>>>>> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>>>>>> [  136.734088] usb 3-1.2:   channels=2, rate=44100,
>>>>>>>>>> format=S32_LE, period_bytes=256, periods=2, implicit_fb=0
>>>>>>>>>> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>>>>>> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>>>>>> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>>>>>> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>>>>>> 0x70480
>>>>>>>>>> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>>>> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>>>>>> [  136.734468] usb 3-1.2:   channels=2, rate=44100,
>>>>>>>>>> format=S32_LE, period_bytes=256, periods=2, implicit_fb=1
>>>>>>>>>> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
>>>>>>>>>> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>>>>>> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>>>>>> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>>>>>> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe
>>>>>>>>>> 0x68400
>>>>>>>>>> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>>>> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>>>> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
>>>>>>>>>> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>>>> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>>>> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
>>>>>>>>>> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>>>> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> With the unpatched kernel:
>>>>>>>>>>
>>>>>>>>>> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>>>>>> [  344.813210] usb 3-1.2:   channels=2, rate=44100,
>>>>>>>>>> format=S32_LE, period_bytes=256, periods=2, implicit_fb=1
>>>>>>>>>> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>>>>>> [  344.813215] usb 3-1.2:   channels=2, rate=44100,
>>>>>>>>>> format=S32_LE, period_bytes=256, periods=2, implicit_fb=0
>>>>>>>>>> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>>>>>> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>>>>>> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>>>>>> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>>>>>> 0x70580
>>>>>>>>>> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>>>> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>>>>>> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>>>>>> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>>>>>> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe
>>>>>>>>>> 0x68500
>>>>>>>>>> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
>>>>>>>>>> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
>>>>>>>>>> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>>>> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>>>>>> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>>>> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>>>> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>>>>>> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>>>> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>>>> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
>>>>>>>>>> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
>>>>>>>>>> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
>>>>>>>>>> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
>>>>>>>>>> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
>>>>>>>>>> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>>>> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>>>>>> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>>>> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>>>> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>>>>>> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>>>> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>>>>
>>>>>>>>>> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
>>>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <
>>>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>>>
>>>>>>>>>>>> Hi Geraldo - I don't have that patch applied, but it shouldn't
>>>>>>>>>>>> make any behavioral difference - it just seems to be simplifying the code.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Point taken.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> The issue is that the BOSS GT-1 *does* need implicit feedback
>>>>>>>>>>>> on playback to avoid clock timing issues, and the current behavior is
>>>>>>>>>>>> disabling that feedback.
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Mike, would you mind posting some dyndbg logs for both the stock
>>>>>>>>>>> behaviour and your endpoint.c/generic quirk modified behaviour?
>>>>>>>>>>>
>>>>>>>>>>> Just add snd_usb_audio.dyndbg=+p to your kernel options and
>>>>>>>>>>> please share the logs.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Mike
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>>>>>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for
>>>>>>>>>>>>> capture quirky devices?
>>>>>>>>>>>>>
>>>>>>>>>>>>> You can find it here:
>>>>>>>>>>>>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>>>>>>>>>>>>
>>>>>>>>>>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <
>>>>>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I had thought that the recent implicit feedback changes were
>>>>>>>>>>>>>> fully working
>>>>>>>>>>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested
>>>>>>>>>>>>>> well enough.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Audio playback and capture works, but with periodic dropouts.
>>>>>>>>>>>>>> I get the
>>>>>>>>>>>>>> exact same behavior as I did with the quirk to completely
>>>>>>>>>>>>>> disable implicit
>>>>>>>>>>>>>> feedback. Without the implicit feedback, you get dropouts
>>>>>>>>>>>>>> from clock drift
>>>>>>>>>>>>>> - how bad probably varies from card to card. On mine it is
>>>>>>>>>>>>>> every second or
>>>>>>>>>>>>>> so.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> If I switch playback feedback for the GT-1 to generic by doing
>>>>>>>>>>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the previous
>>>>>>>>>>>>>> old behavior,
>>>>>>>>>>>>>> which is that playback completely fails to start.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> With generic playback feedback, and using my previous patch
>>>>>>>>>>>>>> to endpoint.c
>>>>>>>>>>>>>> to avoid playback waiting on capture mentioned here:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> playback and capture work perfectly for me.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-08 22:02                           ` Mike Oliphant
@ 2021-04-09  1:04                             ` Geraldo Nascimento
  2021-04-09  1:54                               ` Lucas
  0 siblings, 1 reply; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-09  1:04 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: Lucas, alsa-devel

Em Qui, 8 de abr de 2021 19:02, Mike Oliphant <oliphant@nostatic.org>
escreveu:

> Geraldo - not sure what your patch was intended to do, but it results in
> the same behavior.
>

Mike, sorry I thought it was obvious that the patch prevented pcm.c from
accidentally picking up the implicit feedback EP as sync EP. That cropped
up in your early 2020 post
https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161733.html
so I thought it was worth a shot.

Mainly I'm sorry I start to believe you when you say these Roland / BOSS
devices may be quirky enough to actually need some kind of kickstart
workaround.

But I warn you it won't be easy-peasy to get this patch accepted, and so...
the saga continues...


With implicit feedback enabled for playback but without the endpoint.c
> patch, playback fails to initialize. I'm including the dmesg log below. The
> key message is the "No URB submission due to implicit fb sync" line, which
> is what the endpoint.c patch avoids.
>

The only way to be 100% sure is to see what the Windows or Mac working
driver does. Now I'm not suggesting you do some reverse engineering to
prove beyond all doubts that your case for one more new quirk system inside
ALSA is needed.

But I'm suggesting you submit your patch to the maintainer obviously not
using the generic implicit feedback static entry to a device that has
already another entry that specifies implicit feedback in the other
direction.

That will only create even more confusion. You said my patch works for you
if you modify endpoint.c. Are you sure you get crystal clear sound from my
patch plus your endpoint.c patch?



Mike
>
> -- device plugged in
>
> [ 1066.587414] usb 4-1.2: new high-speed USB device number 12 using
> ehci-pci
> [ 1066.697993] usb 4-1.2: New USB device found, idVendor=0582,
> idProduct=01d6, bcdDevice= 0.00
> [ 1066.698013] usb 4-1.2: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [ 1066.698020] usb 4-1.2: Product: GT-1
> [ 1066.698024] usb 4-1.2: Manufacturer: BOSS
> [ 1066.701638] usb 4-1.2: 1:1: added playback implicit_fb sync_ep 8e,
> iface 2:1
> [ 1066.701655] usb 4-1.2: 1:1: add audio endpoint 0xd
> [ 1066.701680] usb 4-1.2: Creating new data endpoint #d
> [ 1066.701682] usb 4-1.2: Creating new data endpoint #8e
> [ 1066.701828] usb 4-1.2: 1:1 Set sample rate 44100, clock 0
> [ 1066.702337] usb 4-1.2: 2:1: add audio endpoint 0x8e
> [ 1066.702522] usb 4-1.2: 2:1 Set sample rate 44100, clock 0
>
> -- jackd started for capture/playback
>
> [ 1072.455008] usb 4-1.2: Open EP 0x8e, iface=2:1, idx=0
> [ 1072.455016] usb 4-1.2:   channels=2, rate=44100, format=S32_LE,
> period_bytes=256, periods=2, implicit_fb=0
> [ 1072.455020] usb 4-1.2: Setting usb interface 2:0 for EP 0x8e
> [ 1072.455096] usb 4-1.2: Setting usb interface 2:1 for EP 0x8e
> [ 1072.455286] usb 4-1.2: 2:1 Set sample rate 44100, clock 0
> [ 1072.455296] usb 4-1.2: Setting params for data EP 0x8e, pipe 0x70c80
> [ 1072.455316] usb 4-1.2: Set up 12 URBS, ret=0
> [ 1072.455418] usb 4-1.2: Open EP 0xd, iface=1:1, idx=0
> [ 1072.455421] usb 4-1.2:   channels=2, rate=44100, format=S32_LE,
> period_bytes=256, periods=2, implicit_fb=1
> [ 1072.455425] usb 4-1.2: Reopened EP 0x8e (count 1)
> [ 1072.455442] usb 4-1.2: Setting usb interface 1:0 for EP 0xd
> [ 1072.455633] usb 4-1.2: Setting usb interface 1:1 for EP 0xd
> [ 1072.455741] usb 4-1.2: 1:1 Set sample rate 44100, clock 0
> [ 1072.455747] usb 4-1.2: Setting params for data EP 0xd, pipe 0x68c00
> [ 1072.455754] usb 4-1.2: Set up 12 URBS, ret=0
> [ 1072.455784] usb 4-1.2: Starting data EP 0xd (running 0)
> [ 1072.455788] usb 4-1.2: No URB submission due to implicit fb sync
> [ 1072.455790] usb 4-1.2: Starting data EP 0x8e (running 0)
> [ 1072.455828] usb 4-1.2: 12 URBs submitted for EP 0x8e
> [ 1072.461297] usb 4-1.2: Starting data EP 0x8e (running 1)
> [ 1072.461313] usb 4-1.2: 2:1 Start Capture PCM
> [ 1072.461316] usb 4-1.2: 1:1 Start Playback PCM
> [ 1073.549291] usb 4-1.2: Stopping data EP 0x8e (running 2)
> [ 1073.549297] usb 4-1.2: 2:1 Stop Capture PCM
> [ 1073.549300] usb 4-1.2: Stopping data EP 0x8e (running 1)
> [ 1073.549307] usb 4-1.2: Stopping data EP 0xd (running 1)
> [ 1073.549309] usb 4-1.2: 1:1 Stop Playback PCM
> [ 1073.581795] usb 4-1.2: Closing EP 0x8e (count 2)
> [ 1073.581814] usb 4-1.2: Closing EP 0xd (count 1)
> [ 1073.581816] usb 4-1.2: Setting usb interface 1:0 for EP 0xd
> [ 1073.582098] usb 4-1.2: EP 0xd closed
> [ 1073.582102] usb 4-1.2: Closing EP 0x8e (count 1)
> [ 1073.582104] usb 4-1.2: Setting usb interface 2:0 for EP 0x8e
> [ 1073.582331] usb 4-1.2: EP 0x8e closed
>
> -- jackd fails to start
>
> On Thu, Apr 8, 2021 at 2:28 PM Geraldo Nascimento <
> geraldogabriel@gmail.com> wrote:
>
>> Mike, could you test the following patch instead of your own
>> modifications?
>>
>> Lucas, you can test it too, just modify it for your devices.
>>
>> Since I don't own any Roland devices this is of course completely
>> untested, but it's worth a try.
>>
>> --- implicit.c.git      2021-04-04 20:51:57.226754632 -0300
>> +++ implicit.c  2021-04-08 18:15:02.971301050 -0300
>> @@ -75,7 +75,7 @@ static const struct snd_usb_implicit_fb_
>>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171),   /* BOSS RC-505 */
>>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185),   /* BOSS GP-10 */
>>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189),   /* BOSS GT-100v2 */
>> -       IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6),   /* BOSS GT-1 */
>> +       //IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
>>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8),   /* BOSS Katana */
>>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5),   /* BOSS GT-001 */
>>         IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
>> @@ -89,7 +89,7 @@ static const struct snd_usb_implicit_fb_
>>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505
>> */
>>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10
>> */
>>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS
>> GT-100v2 */
>> -       IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
>> +       //IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1
>> */
>>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana
>> */
>>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001
>> */
>>         IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10
>> */
>> @@ -339,8 +339,19 @@ int snd_usb_parse_implicit_fb_quirk(stru
>>                                     struct audioformat *fmt,
>>                                     struct usb_host_interface *alts)
>>  {
>> -       if (fmt->endpoint & USB_DIR_IN)
>> +        bool isRolandGT1;
>> +
>> +        if (alts->desc.bInterfaceClass == USB_CLASS_VENDOR_SPEC &&
>> +            (USB_ID_VENDOR(chip->usb_id) == 0x0582 &&
>> +             USB_ID_PRODUCT(chip->usb_id) == 0x01d6 /* BOSS GT-1 */))
>> +            isRolandGT1 = true;
>> +
>> +       if (fmt->endpoint & USB_DIR_IN) {
>> +                if (isRolandGT1 == true)
>> +                    return 1;
>>                 return audioformat_capture_quirk(chip, fmt, alts);
>> +       }
>> +
>>         else
>>                 return audioformat_implicit_fb_quirk(chip, fmt, alts);
>>  }
>>
>> On Thu, Apr 8, 2021 at 5:54 PM Mike Oliphant <oliphant@nostatic.org>
>> wrote:
>>
>>> Geraldo - the implicit feedback stuff is by no means new - it's been
>>> there for quite some time. The recent changes just refactored it a bit.
>>>
>>> Mike
>>>
>>> On Thu, Apr 8, 2021 at 1:09 PM Geraldo Nascimento <
>>> geraldogabriel@gmail.com> wrote:
>>>
>>>> Em Qui, 8 de abr de 2021 16:42, Mike Oliphant <oliphant@nostatic.org>
>>>> escreveu:
>>>>
>>>>> Hi Geraldo - yes. In fact, that is how I've been operating for the
>>>>> past year or so before the recent implicit feedback changes. I use the GT-1
>>>>> most every day as a guitar interface and it works perfectly.
>>>>>
>>>>
>>>> Thanks Mike, but I'm not sure I understand. You have been operating
>>>> with implicit feedback sync on the playback for the past year? I thought
>>>> that was a new idea?
>>>>
>>>> The key point here is that with a stock kernel you have to comment out
>>>> the IMPLICIT_FB_SKIP_DEV() entry for the GT-1 for the Roland code inside
>>>> audioformat_implicit_fb_quirk properly kick in.
>>>>
>>>> I was suggesting you try your workaround without adding a
>>>> IMPLICIT_FB_GENERIC_DEV() for your device.
>>>>
>>>>
>>>>> The GT-1 (and I suspect many of the other Roland/BOSS devices) doesn't
>>>>> seem to be quirky at all with regard to implicit feedback setup - it works
>>>>> exactly as the endpoint definitions say it should.
>>>>>
>>>>> Where the GT-1 *does* seem to be quirky is that is doesn't seem to
>>>>> want to send capture data until it receives some playback data - hence my
>>>>> endpoint.c patch.
>>>>>
>>>>
>>>> If that is true then there's definitely a need to rewrite endpoint.c.
>>>> But it could be something else, Mike. One thing is certain: the present
>>>> kernel behaviour is far from the ideal.
>>>>
>>>> I insist: engage implicit feedback sync for the playback, disable it
>>>> for the captures and inspect your dyndbg logs for the failure cases in
>>>> starting JACK that happen when you don't patch endpoint.c.
>>>>
>>>> If you see something related to sync_ep then the problem lies
>>>> elsewhere, specifically inside pcm.c
>>>>
>>>> Although whether this behavior is quirky or typical I don't know. I do
>>>>> know that the GT-1 does not claim to be USB class compliant. It requires
>>>>> custom drivers on Windows and macOS and does not work at all with iOS, so
>>>>> it definitely seems to be somewhat non-standard.
>>>>>
>>>>
>>>> Non-standard to say the least. I really hope that's not the case or
>>>> it'll give Takashi Iwai plenty of headache ;-)
>>>>
>>>>
>>>>> Mike
>>>>>
>>>>> On Thu, Apr 8, 2021 at 12:13 PM Geraldo Nascimento <
>>>>> geraldogabriel@gmail.com> wrote:
>>>>>
>>>>>> Hey Mike, got another question for you, sorry about that.
>>>>>>
>>>>>> If you comment out your GT-1 IMPLICIT_FB_GENERIC_DEV() entry and
>>>>>> instead let audioformat_implicit_fb_quirk() call add_roland_implicit_fb()
>>>>>> with everything else customized your way, your custom endpoint.c etc., does
>>>>>> it still work? And does it work crystal clear?
>>>>>>
>>>>>> I'm sorry about this test this, test that, provide the dyndbg logs
>>>>>> attitude but I'm honestly just trying to help you write the best patch
>>>>>> possible.
>>>>>>
>>>>>> Thank you,
>>>>>> Geraldo
>>>>>>
>>>>>> Em Qui, 8 de abr de 2021 02:05, Geraldo Nascimento <
>>>>>> geraldogabriel@gmail.com> escreveu:
>>>>>>
>>>>>>> Mike, I just realize I missed reply-to-all once again.
>>>>>>>
>>>>>>> In case you were wondering, I was looking for a sync_ep event right
>>>>>>> in the start of the loading of snd-usb-audio. It happens inside pcm.c. If
>>>>>>> you see one of those specifically let me know.
>>>>>>>
>>>>>>> With my Pioneer device, the DDJ-SR2, snd-usb-audio recognized the
>>>>>>> device's implicit feedback EP as sync_ep and that prevented JACK from
>>>>>>> starting.
>>>>>>>
>>>>>>> Em Qua, 7 de abr de 2021 23:47, Mike Oliphant <oliphant@nostatic.org>
>>>>>>>> escreveu:
>>>>>>>>
>>>>>>>>> Hi Geraldo - I had the same thought and I have tried enabling
>>>>>>>>> playback feedback while turning off capture feedback without my endpoint
>>>>>>>>> patch. It doesn't work - at least not on the GT-1. Playback/capture fails
>>>>>>>>> to start.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Would you mind sharing the dyndbg logs for the failure case from
>>>>>>>> the point you connect the device, and trying to start JACK?
>>>>>>>>
>>>>>>>> Sometimes failures elucidate more than success cases.
>>>>>>>>
>>>>>>>>
>>>>>>>>> Speaking of testing, if you (or anyone else following this
>>>>>>>>> discussion) have one of these Roland/BOSS devices, it would be great if you
>>>>>>>>> could try testing with playback feedback enabled and my endpoint.c
>>>>>>>>> workaround.
>>>>>>>>>
>>>>>>>>
>>>>>>>> I don't have the hardware, but I'm sure it works. The problem is
>>>>>>>> that endpoint.c code really shouldn't be disabled unless all the other
>>>>>>>> options fail, and even then, I'm not so sure the maintainers will be so
>>>>>>>> willing to disable it. So let's keep some other options on the table by
>>>>>>>> debugging a little further.
>>>>>>>>
>>>>>>>> Thank you,
>>>>>>>> Geraldo
>>>>>>>>
>>>>>>>>
>>>>>>>>> Mike
>>>>>>>>>
>>>>>>>>> On Wed, Apr 7, 2021 at 7:21 PM Geraldo Nascimento <
>>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Thanks, Mike, one thing I can tell you right off the bat is that
>>>>>>>>>> if you turn implicit feedback sync on for both endpoints at the same time
>>>>>>>>>> like you mentioned, without your workaround inside endpoint.c, they most
>>>>>>>>>> likely will stall because they would both be waiting for each other to
>>>>>>>>>> start.
>>>>>>>>>>
>>>>>>>>>> Have you tried engaging the generic implicit feedback sync just
>>>>>>>>>> for the playback, thereby commenting out the capture implicit feedback
>>>>>>>>>> entries, and re-enabling snd_usb_endpoint_implicit_feedback_sink(ep) inside
>>>>>>>>>> endpoint.c? Does playback still fail to start?
>>>>>>>>>>
>>>>>>>>>> If you choose to perform this simple test please share with us
>>>>>>>>>> the test's dyndbg logs right from the moment you turn on the device, not
>>>>>>>>>> just after you start jackd.
>>>>>>>>>>
>>>>>>>>>> Sorry for the endless do-this, do-that. Such is the pace of
>>>>>>>>>> teledebugging
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Em Qua, 7 de abr de 2021 21:38, Mike Oliphant <
>>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>>
>>>>>>>>>>> Geraldo - here is the dmesg output when starting up jackd for
>>>>>>>>>>> capture/playback:
>>>>>>>>>>>
>>>>>>>>>>> With my patch:
>>>>>>>>>>>
>>>>>>>>>>> [  136.734081] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>>>>>>> [  136.734088] usb 3-1.2:   channels=2, rate=44100,
>>>>>>>>>>> format=S32_LE, period_bytes=256, periods=2, implicit_fb=0
>>>>>>>>>>> [  136.734092] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>>>>>>> [  136.734233] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>>>>>>> [  136.734381] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>>>>>>> [  136.734388] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>>>>>>> 0x70480
>>>>>>>>>>> [  136.734394] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>>>>> [  136.734466] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>>>>>>> [  136.734468] usb 3-1.2:   channels=2, rate=44100,
>>>>>>>>>>> format=S32_LE, period_bytes=256, periods=2, implicit_fb=1
>>>>>>>>>>> [  136.734471] usb 3-1.2: Reopened EP 0x8e (count 1)
>>>>>>>>>>> [  136.734473] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>>>>>>> [  136.734605] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>>>>>>> [  136.734762] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>>>>>>> [  136.734774] usb 3-1.2: Setting params for data EP 0xd, pipe
>>>>>>>>>>> 0x68400
>>>>>>>>>>> [  136.734781] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>>>>> [  136.734830] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>>>>> [  136.734873] usb 3-1.2: 12 URBs submitted for EP 0xd
>>>>>>>>>>> [  136.734876] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>>>>> [  136.734906] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>>>>> [  136.740627] usb 3-1.2: Starting data EP 0x8e (running 1)
>>>>>>>>>>> [  136.740634] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>>>>> [  136.740635] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> With the unpatched kernel:
>>>>>>>>>>>
>>>>>>>>>>> [  344.813203] usb 3-1.2: Open EP 0x8e, iface=2:1, idx=0
>>>>>>>>>>> [  344.813210] usb 3-1.2:   channels=2, rate=44100,
>>>>>>>>>>> format=S32_LE, period_bytes=256, periods=2, implicit_fb=1
>>>>>>>>>>> [  344.813213] usb 3-1.2: Open EP 0xd, iface=1:1, idx=0
>>>>>>>>>>> [  344.813215] usb 3-1.2:   channels=2, rate=44100,
>>>>>>>>>>> format=S32_LE, period_bytes=256, periods=2, implicit_fb=0
>>>>>>>>>>> [  344.813217] usb 3-1.2: Setting usb interface 2:0 for EP 0x8e
>>>>>>>>>>> [  344.813367] usb 3-1.2: Setting usb interface 2:1 for EP 0x8e
>>>>>>>>>>> [  344.813494] usb 3-1.2: 2:1 Set sample rate 44100, clock 0
>>>>>>>>>>> [  344.813503] usb 3-1.2: Setting params for data EP 0x8e, pipe
>>>>>>>>>>> 0x70580
>>>>>>>>>>> [  344.813509] usb 3-1.2: Set up 12 URBS, ret=0
>>>>>>>>>>> [  344.813513] usb 3-1.2: Setting usb interface 1:0 for EP 0xd
>>>>>>>>>>> [  344.813587] usb 3-1.2: Setting usb interface 1:1 for EP 0xd
>>>>>>>>>>> [  344.813758] usb 3-1.2: 1:1 Set sample rate 44100, clock 0
>>>>>>>>>>> [  344.813765] usb 3-1.2: Setting params for data EP 0xd, pipe
>>>>>>>>>>> 0x68500
>>>>>>>>>>> [  344.813770] usb 3-1.2: Set up 2 URBS, ret=0
>>>>>>>>>>> [  344.813858] usb 3-1.2: Reopened EP 0xd (count 1)
>>>>>>>>>>> [  344.813883] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>>>>> [  344.813899] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>>>>>>> [  344.819499] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>>>>> [  344.819532] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>>>>> [  344.819535] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>>>>>>> [  344.819538] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>>>>> [  344.819540] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>>>>> [  344.820663] usb 3-1.2: Stopping data EP 0xd (running 2)
>>>>>>>>>>> [  344.820688] usb 3-1.2: Stopping data EP 0x8e (running 1)
>>>>>>>>>>> [  344.820693] usb 3-1.2: 2:1 Stop Capture PCM
>>>>>>>>>>> [  344.820695] usb 3-1.2: Stopping data EP 0xd (running 1)
>>>>>>>>>>> [  344.820697] usb 3-1.2: 1:1 Stop Playback PCM
>>>>>>>>>>> [  344.833799] usb 3-1.2: Starting data EP 0xd (running 0)
>>>>>>>>>>> [  344.833852] usb 3-1.2: 2 URBs submitted for EP 0xd
>>>>>>>>>>> [  344.833867] usb 3-1.2: Starting data EP 0x8e (running 0)
>>>>>>>>>>> [  344.833888] usb 3-1.2: 12 URBs submitted for EP 0x8e
>>>>>>>>>>> [  344.833890] usb 3-1.2: Starting data EP 0xd (running 1)
>>>>>>>>>>> [  344.833891] usb 3-1.2: 2:1 Start Capture PCM
>>>>>>>>>>> [  344.833893] usb 3-1.2: 1:1 Start Playback PCM
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Apr 7, 2021 at 1:30 PM Geraldo Nascimento <
>>>>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Em Qua, 7 de abr de 2021 17:16, Mike Oliphant <
>>>>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Geraldo - I don't have that patch applied, but it shouldn't
>>>>>>>>>>>>> make any behavioral difference - it just seems to be simplifying the code.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Point taken.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> The issue is that the BOSS GT-1 *does* need implicit feedback
>>>>>>>>>>>>> on playback to avoid clock timing issues, and the current behavior is
>>>>>>>>>>>>> disabling that feedback.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Mike, would you mind posting some dyndbg logs for both the
>>>>>>>>>>>> stock behaviour and your endpoint.c/generic quirk modified behaviour?
>>>>>>>>>>>>
>>>>>>>>>>>> Just add snd_usb_audio.dyndbg=+p to your kernel options and
>>>>>>>>>>>> please share the logs.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> Mike
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Wed, Apr 7, 2021 at 1:04 PM Geraldo Nascimento <
>>>>>>>>>>>>> geraldogabriel@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hey Mike, did you catch the latest patch by Takashi Iwai for
>>>>>>>>>>>>>> capture quirky devices?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> You can find it here:
>>>>>>>>>>>>>> https://patchwork.kernel.org/project/alsa-devel/patch/20210406113837.32041-1-tiwai@suse.de/
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Em Qua, 7 de abr de 2021 16:55, Mike Oliphant <
>>>>>>>>>>>>>> oliphant@nostatic.org> escreveu:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I had thought that the recent implicit feedback changes were
>>>>>>>>>>>>>>> fully working
>>>>>>>>>>>>>>> on the BOSS GT-1, but it turns out that I just hadn't tested
>>>>>>>>>>>>>>> well enough.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Audio playback and capture works, but with periodic
>>>>>>>>>>>>>>> dropouts. I get the
>>>>>>>>>>>>>>> exact same behavior as I did with the quirk to completely
>>>>>>>>>>>>>>> disable implicit
>>>>>>>>>>>>>>> feedback. Without the implicit feedback, you get dropouts
>>>>>>>>>>>>>>> from clock drift
>>>>>>>>>>>>>>> - how bad probably varies from card to card. On mine it is
>>>>>>>>>>>>>>> every second or
>>>>>>>>>>>>>>> so.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> If I switch playback feedback for the GT-1 to generic by
>>>>>>>>>>>>>>> doing
>>>>>>>>>>>>>>> "IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01d6)", I get the
>>>>>>>>>>>>>>> previous old behavior,
>>>>>>>>>>>>>>> which is that playback completely fails to start.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> With generic playback feedback, and using my previous patch
>>>>>>>>>>>>>>> to endpoint.c
>>>>>>>>>>>>>>> to avoid playback waiting on capture mentioned here:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-January/161951.html
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> playback and capture work perfectly for me.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-09  1:04                             ` Geraldo Nascimento
@ 2021-04-09  1:54                               ` Lucas
  2021-04-09  2:40                                 ` Geraldo Nascimento
  0 siblings, 1 reply; 48+ messages in thread
From: Lucas @ 2021-04-09  1:54 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel, Mike Oliphant

Sorry, this is a question that has nothing to do with your last, but I
previously tried creating a patch for endpoint.c that tests based on
USB_ID_VENDOR(chip->usb_id), and USB_ID_PRODUCT(chip->usb_id) but they
aren't recognised there.  Do you know what I might be able to use there to
avoid messing with every other snd_usb_audio device?  Sorry, I just haven't
looked the code over long enough.

I may just try your quick recompilation method, as I realized it shouldn't
create any new files the package manager couldn't eventually remove through
the usual "apt-get remove linux-image-5.11.9".  Although, I'll probably be
rebooting anyway, since the last time I tried to "modprobe -r
snd_usb_audio" it refused due to dependencies.

  Thanks!

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-09  1:54                               ` Lucas
@ 2021-04-09  2:40                                 ` Geraldo Nascimento
  2021-04-09  3:56                                   ` Lucas
  0 siblings, 1 reply; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-09  2:40 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel, Mike Oliphant

Hi Lucas, try the following patch to disable the hold on the URBs for the
Roland D-05 for example.

--- endpoint.git.c      2021-04-08 23:35:55.786731210 -0300
+++ endpoint.c  2021-04-08 23:34:17.783404159 -0300
@@ -1343,6 +1343,7 @@ int snd_usb_endpoint_start(struct snd_us
 {
        int err;
        unsigned int i;
+       bool skip_implicit_fb_urb_hold;

        if (atomic_read(&ep->chip->shutdown))
                return -EBADFD;
@@ -1375,7 +1376,13 @@ int snd_usb_endpoint_start(struct snd_us
        if (!ep_state_update(ep, EP_STATE_STOPPED, EP_STATE_RUNNING))
                goto __error;

-       if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
+        skip_implicit_fb_urb_hold = false;
+
+        if (USB_ID_VENDOR(ep->chip->usb_id) == 0x0582 &&
+           USB_ID_PRODUCT(ep->chip->usb_id) == 0x01ff)
+               skip_implicit_fb_urb_hold = true;
+
+       if (snd_usb_endpoint_implicit_feedback_sink(ep) &&
!skip_implicit_fb_urb_hold) {
                for (i = 0; i < ep->nurbs; i++) {
                        struct snd_urb_ctx *ctx = ep->urb + i;
                        list_add_tail(&ctx->ready_list,
&ep->ready_playback_urbs);

On Thu, Apr 8, 2021 at 10:54 PM Lucas <jaffa225man@gmail.com> wrote:

> Sorry, this is a question that has nothing to do with your last, but I
> previously tried creating a patch for endpoint.c that tests based on
> USB_ID_VENDOR(chip->usb_id), and USB_ID_PRODUCT(chip->usb_id) but they
> aren't recognised there.  Do you know what I might be able to use there to
> avoid messing with every other snd_usb_audio device?  Sorry, I just haven't
> looked the code over long enough.
>
> I may just try your quick recompilation method, as I realized it shouldn't
> create any new files the package manager couldn't eventually remove through
> the usual "apt-get remove linux-image-5.11.9".  Although, I'll probably be
> rebooting anyway, since the last time I tried to "modprobe -r
> snd_usb_audio" it refused due to dependencies.
>
>   Thanks!
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-09  2:40                                 ` Geraldo Nascimento
@ 2021-04-09  3:56                                   ` Lucas
  2021-04-09  4:27                                     ` Geraldo Nascimento
  0 siblings, 1 reply; 48+ messages in thread
From: Lucas @ 2021-04-09  3:56 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel, Mike Oliphant

Okay, thanks!  I'll try it next.  For now, I did use the disabled block
"(false)" test, without worry due to you giving me your quite speedy build
method, although I do still reboot.

Anyway, I've proven my assertion that capture fails for the D-05 when I
have its capture_implicit_fb_quirks[] line commented out.  This is a patch
for the current state of what works perfectly for playback and capture on
my D-05.  Sorry it includes some other patches I've applied due to
unrelated UA-101 Takashi suggestions.  Merely removing the suggested
comment from its capture quirk table line (as shown here) gets the Roland
Boutique D-05 working for capture.  I don't understand why, but this works,
& not without it:

diff -Nurp linux-5.11.9.orig/sound/usb/endpoint.c
linux-5.11.9.roland-mike-oliphant/sound/usb/endpoint.c
--- linux-5.11.9.orig/sound/usb/endpoint.c 2021-03-24 05:54:19.000000000
-0500
+++ linux-5.11.9.roland-mike-oliphant/sound/usb/endpoint.c 2021-04-08
21:10:49.388889365 -0500
@@ -1375,7 +1375,7 @@ int snd_usb_endpoint_start(struct snd_us
  if (!ep_state_update(ep, EP_STATE_STOPPED, EP_STATE_RUNNING))
  goto __error;

- if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
+ if (false) { //(snd_usb_endpoint_implicit_feedback_sink(ep)) {
  for (i = 0; i < ep->nurbs; i++) {
  struct snd_urb_ctx *ctx = ep->urb + i;
  list_add_tail(&ctx->ready_list, &ep->ready_playback_urbs);
diff -Nurp linux-5.11.9.orig/sound/usb/implicit.c
linux-5.11.9.roland-mike-oliphant/sound/usb/implicit.c
--- linux-5.11.9.orig/sound/usb/implicit.c 2021-04-01 20:55:06.079399075
-0500
+++ linux-5.11.9.roland-mike-oliphant/sound/usb/implicit.c 2021-04-08
22:29:22.139680224 -0500
@@ -71,27 +71,149 @@ static const struct snd_usb_implicit_fb_
   .ep_num = 0x84, .iface = 0 }, /* MOTU MicroBook II */

  /* No quirk for playback but with capture quirk (see below) */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171),   /* BOSS RC-505 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a6), /* Roland JUNO-G */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a9), /* Roland MC-808 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ad), /* Roland SH-201 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00b2), /* Roland VG-99 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00b3), /* Roland VG-99 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c2), /* Roland SonicCell */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c4), /* Edirol M-16DX */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c5), /* Roland SP-555 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c7), /* Roland V-Synth GT */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00d1), /* Roland Music Atelier */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00da), /* BOSS GT-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00db), /* BOSS GT-10 Guitar Effects
Processor */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00dc), /* BOSS GT-10B */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00de), /* Roland Fantom-G */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00eb), /* Roland VS-100 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00f8), /* Roland JUNO Series */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fc), /* Roland VS-700C */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fd), /* Roland VS-700 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fe), /* Roland VS-700 M1 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ff), /* Roland VS-700 M2 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0100), /* Roland VS-700 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0101), /* Roland VS-700 M2 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0102), /* Roland VB-99 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0109), /* BOSS eBand JS-8 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0111), /* Roland GAIA SH-01 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0113), /* BOSS ME-25 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0114), /* Roland SD-50 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0117), /* Roland VS-20 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0119), /* Roland OCTAPAD SPD-30 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x011c), /* Roland Lucina AX-09 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x011e), /* BOSS BR-800 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0120), /* Roland OCTA-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0121), /* Roland OCTA-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0123), /* Roland JUNO-Gi */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0124), /* Roland M-300 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0127), /* Roland GR-55 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x012b), /* Roland DUO-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x012f), /* Roland QUAD-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0132), /* Roland TRI-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0134), /* Roland V-Mixer */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0138), /* BOSS RC-300 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x013a), /* Roland JUPITER-80 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x013e), /* Roland R-26 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0145), /* Roland SPD-SX */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x014b), /* BOSS eBand JS-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x014d), /* BOSS GT-100 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0150), /* Roland TD-15 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0151), /* Roland TD-11 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0154), /* Roland JUPITER-50 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0158), /* Roland TD-30 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0159), /* Roland DUO-CAPTURE EX */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x015b), /* Roland INTEGRA-7 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x015d), /* Roland R-88 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171), /* BOSS RC-505 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x017a), /* Roland VT-3 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x017c), /* Roland TR-8 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01b5), /* Roland Boutique Series
Synthesizer */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01df), /* Roland Rubix22 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e0), /* Roland Rubix24 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e1), /* Roland Rubix44 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01fd), /* Roland Boutique SH-01A */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01ff), /* Roland Boutique D-05 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203), /* BOSS AD-10 */

  {} /* terminator */
 };

 /* Implicit feedback quirk table for capture: only FIXED type */
 static const struct snd_usb_implicit_fb_match capture_implicit_fb_quirks[]
= {
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a6, 0x0d, 0x01), /* Roland JUNO-G */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a9, 0x0d, 0x01), /* Roland MC-808 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ad, 0x0d, 0x01), /* Roland SH-201 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b2, 0x0d, 0x01), /* Roland VG-99 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b3, 0x0d, 0x01), /* Roland VG-99 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c2, 0x0d, 0x01), /* Roland SonicCell */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c4, 0x0d, 0x01), /* Edirol M-16DX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c5, 0x0d, 0x01), /* Roland SP-555 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c7, 0x0d, 0x01), /* Roland V-Synth GT */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00d1, 0x0d, 0x01), /* Roland Music
Atelier */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00da, 0x0d, 0x01), /* BOSS GT-10 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00db, 0x0d, 0x01), /* BOSS GT-10 Guitar
Effects Processor */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00dc, 0x0d, 0x01), /* BOSS GT-10B */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00de, 0x0d, 0x01), /* Roland Fantom-G */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00eb, 0x0d, 0x01), /* Roland VS-100 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00f8, 0x0d, 0x01), /* Roland JUNO Series
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fc, 0x0d, 0x01), /* Roland VS-700C */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fd, 0x0d, 0x01), /* Roland VS-700 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fe, 0x0d, 0x01), /* Roland VS-700 M1 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ff, 0x0d, 0x01), /* Roland VS-700 M2 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0100, 0x0d, 0x01), /* Roland VS-700 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0101, 0x0d, 0x01), /* Roland VS-700 M2 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0102, 0x0d, 0x01), /* Roland VB-99 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0109, 0x0d, 0x01), /* BOSS eBand JS-8 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0111, 0x0d, 0x01), /* Roland GAIA SH-01 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0113, 0x0d, 0x01), /* BOSS ME-25 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0114, 0x0d, 0x01), /* Roland SD-50 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0117, 0x0d, 0x01), /* Roland VS-20 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0119, 0x0d, 0x01), /* Roland OCTAPAD
SPD-30 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x011c, 0x0d, 0x01), /* Roland Lucina AX-09
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x011e, 0x0d, 0x01), /* BOSS BR-800 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0120, 0x0d, 0x01), /* Roland OCTA-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0121, 0x0d, 0x01), /* Roland OCTA-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0123, 0x0d, 0x01), /* Roland JUNO-Gi */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0124, 0x0d, 0x01), /* Roland M-300 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0127, 0x0d, 0x01), /* Roland GR-55 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x012b, 0x0d, 0x01), /* Roland DUO-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x012f, 0x0d, 0x01), /* Roland QUAD-CAPTURE
*/
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0130, 0x0d, 0x01), /* BOSS BR-80 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0132, 0x0d, 0x01), /* Roland TRI-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0134, 0x0d, 0x01), /* Roland V-Mixer */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0138, 0x0d, 0x01), /* BOSS RC-300 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x013a, 0x0d, 0x01), /* Roland JUPITER-80 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x013e, 0x0d, 0x01), /* Roland R-26 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0145, 0x0d, 0x01), /* Roland SPD-SX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x014b, 0x0d, 0x01), /* BOSS eBand JS-10 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x014d, 0x0d, 0x01), /* BOSS GT-100 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0150, 0x0d, 0x01), /* Roland TD-15 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0151, 0x0d, 0x01), /* Roland TD-11 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0154, 0x0d, 0x01), /* Roland JUPITER-50 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0158, 0x0d, 0x01), /* Roland TD-30 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0159, 0x0d, 0x01), /* Roland DUO-CAPTURE
EX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x015b, 0x0d, 0x01), /* Roland INTEGRA-7 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x015d, 0x0d, 0x01), /* Roland R-88 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x017a, 0x0d, 0x01), /* Roland VT-3 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x017c, 0x0d, 0x01), /* Roland TR-8 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS GT-100v2 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01b5, 0x0d, 0x01), /* Roland Boutique
Series Synthesizer */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01df, 0x0d, 0x01), /* Roland Rubix22 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e0, 0x0d, 0x01), /* Roland Rubix24 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e1, 0x0d, 0x01), /* Roland Rubix44 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01fd, 0x0d, 0x01), /* Roland Boutique
SH-01A */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01ff, 0x0d, 0x01), /* Roland Boutique
D-05 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */

  {} /* terminator */
@@ -278,6 +400,11 @@ static int audioformat_implicit_fb_quirk
  }
  }

+ ///* Don't apply playback quirks for the devices with capture quirk */
+ //p = find_implicit_fb_entry(chip, capture_implicit_fb_quirks, alts);
+ //if (p && p->type == IMPLICIT_FB_FIXED)
+ // return 0; /* no quirk */
+
  /* Generic UAC2 implicit feedback */
  if (attr == USB_ENDPOINT_SYNC_ASYNC &&
     alts->desc.bInterfaceClass == USB_CLASS_AUDIO &&

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-09  3:56                                   ` Lucas
@ 2021-04-09  4:27                                     ` Geraldo Nascimento
  2021-04-09  4:55                                       ` Lucas
  0 siblings, 1 reply; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-09  4:27 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel, Mike Oliphant

Thanks, Lucas, every device may be different so maybe Mike's BOSS GT-1
works without the capture quirk whereas your Roland D-05 needs it and won't
work without it.

But you did the good work testing it.

I'm glad you two are able to coordinate/collaborate in this Roland thing. I
wasn't able to make the Pioneer users coordinate so far, and it's implicit
feedback problems too. Only heard from Ard van Breemen, so far. Apparently
he hasn't got any problems with his DDJ-SX3, it runs for days on end, and
he isn't able to test kernel code for now.

Regards,
Geraldo

On Fri, Apr 9, 2021 at 12:57 AM Lucas <jaffa225man@gmail.com> wrote:

> Okay, thanks!  I'll try it next.  For now, I did use the disabled block
> "(false)" test, without worry due to you giving me your quite speedy build
> method, although I do still reboot.
>
> Anyway, I've proven my assertion that capture fails for the D-05 when I
> have its capture_implicit_fb_quirks[] line commented out.  This is a patch
> for the current state of what works perfectly for playback and capture on
> my D-05.  Sorry it includes some other patches I've applied due to
> unrelated UA-101 Takashi suggestions.  Merely removing the suggested
> comment from its capture quirk table line (as shown here) gets the Roland
> Boutique D-05 working for capture.  I don't understand why, but this works,
> & not without it:
>
> diff -Nurp linux-5.11.9.orig/sound/usb/endpoint.c
> linux-5.11.9.roland-mike-oliphant/sound/usb/endpoint.c
> --- linux-5.11.9.orig/sound/usb/endpoint.c 2021-03-24 05:54:19.000000000
> -0500
> +++ linux-5.11.9.roland-mike-oliphant/sound/usb/endpoint.c 2021-04-08
> 21:10:49.388889365 -0500
> @@ -1375,7 +1375,7 @@ int snd_usb_endpoint_start(struct snd_us
>   if (!ep_state_update(ep, EP_STATE_STOPPED, EP_STATE_RUNNING))
>   goto __error;
>
> - if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
> + if (false) { //(snd_usb_endpoint_implicit_feedback_sink(ep)) {
>   for (i = 0; i < ep->nurbs; i++) {
>   struct snd_urb_ctx *ctx = ep->urb + i;
>   list_add_tail(&ctx->ready_list, &ep->ready_playback_urbs);
> diff -Nurp linux-5.11.9.orig/sound/usb/implicit.c
> linux-5.11.9.roland-mike-oliphant/sound/usb/implicit.c
> --- linux-5.11.9.orig/sound/usb/implicit.c 2021-04-01 20:55:06.079399075
> -0500
> +++ linux-5.11.9.roland-mike-oliphant/sound/usb/implicit.c 2021-04-08
> 22:29:22.139680224 -0500
> @@ -71,27 +71,149 @@ static const struct snd_usb_implicit_fb_
>    .ep_num = 0x84, .iface = 0 }, /* MOTU MicroBook II */
>
>   /* No quirk for playback but with capture quirk (see below) */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171),   /* BOSS RC-505 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a6), /* Roland JUNO-G */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a9), /* Roland MC-808 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ad), /* Roland SH-201 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00b2), /* Roland VG-99 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00b3), /* Roland VG-99 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c2), /* Roland SonicCell */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c4), /* Edirol M-16DX */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c5), /* Roland SP-555 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c7), /* Roland V-Synth GT */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00d1), /* Roland Music Atelier */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00da), /* BOSS GT-10 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00db), /* BOSS GT-10 Guitar Effects
> Processor */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00dc), /* BOSS GT-10B */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00de), /* Roland Fantom-G */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00eb), /* Roland VS-100 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00f8), /* Roland JUNO Series */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fc), /* Roland VS-700C */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fd), /* Roland VS-700 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fe), /* Roland VS-700 M1 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ff), /* Roland VS-700 M2 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0100), /* Roland VS-700 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0101), /* Roland VS-700 M2 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0102), /* Roland VB-99 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0109), /* BOSS eBand JS-8 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0111), /* Roland GAIA SH-01 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0113), /* BOSS ME-25 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0114), /* Roland SD-50 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0117), /* Roland VS-20 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0119), /* Roland OCTAPAD SPD-30 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x011c), /* Roland Lucina AX-09 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x011e), /* BOSS BR-800 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0120), /* Roland OCTA-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0121), /* Roland OCTA-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0123), /* Roland JUNO-Gi */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0124), /* Roland M-300 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0127), /* Roland GR-55 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x012b), /* Roland DUO-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x012f), /* Roland QUAD-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0132), /* Roland TRI-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0134), /* Roland V-Mixer */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0138), /* BOSS RC-300 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x013a), /* Roland JUPITER-80 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x013e), /* Roland R-26 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0145), /* Roland SPD-SX */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x014b), /* BOSS eBand JS-10 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x014d), /* BOSS GT-100 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0150), /* Roland TD-15 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0151), /* Roland TD-11 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0154), /* Roland JUPITER-50 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0158), /* Roland TD-30 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0159), /* Roland DUO-CAPTURE EX */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x015b), /* Roland INTEGRA-7 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x015d), /* Roland R-88 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171), /* BOSS RC-505 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x017a), /* Roland VT-3 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x017c), /* Roland TR-8 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01b5), /* Roland Boutique Series
> Synthesizer */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01df), /* Roland Rubix22 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e0), /* Roland Rubix24 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e1), /* Roland Rubix44 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01fd), /* Roland Boutique SH-01A */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01ff), /* Roland Boutique D-05 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203), /* BOSS AD-10 */
>
>   {} /* terminator */
>  };
>
>  /* Implicit feedback quirk table for capture: only FIXED type */
>  static const struct snd_usb_implicit_fb_match
> capture_implicit_fb_quirks[] = {
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a6, 0x0d, 0x01), /* Roland JUNO-G */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a9, 0x0d, 0x01), /* Roland MC-808 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ad, 0x0d, 0x01), /* Roland SH-201 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b2, 0x0d, 0x01), /* Roland VG-99 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b3, 0x0d, 0x01), /* Roland VG-99 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c2, 0x0d, 0x01), /* Roland SonicCell */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c4, 0x0d, 0x01), /* Edirol M-16DX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c5, 0x0d, 0x01), /* Roland SP-555 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c7, 0x0d, 0x01), /* Roland V-Synth GT
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00d1, 0x0d, 0x01), /* Roland Music
> Atelier */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00da, 0x0d, 0x01), /* BOSS GT-10 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00db, 0x0d, 0x01), /* BOSS GT-10 Guitar
> Effects Processor */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00dc, 0x0d, 0x01), /* BOSS GT-10B */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00de, 0x0d, 0x01), /* Roland Fantom-G */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00eb, 0x0d, 0x01), /* Roland VS-100 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00f8, 0x0d, 0x01), /* Roland JUNO Series
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fc, 0x0d, 0x01), /* Roland VS-700C */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fd, 0x0d, 0x01), /* Roland VS-700 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fe, 0x0d, 0x01), /* Roland VS-700 M1 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ff, 0x0d, 0x01), /* Roland VS-700 M2 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0100, 0x0d, 0x01), /* Roland VS-700 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0101, 0x0d, 0x01), /* Roland VS-700 M2 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0102, 0x0d, 0x01), /* Roland VB-99 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0109, 0x0d, 0x01), /* BOSS eBand JS-8 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0111, 0x0d, 0x01), /* Roland GAIA SH-01
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0113, 0x0d, 0x01), /* BOSS ME-25 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0114, 0x0d, 0x01), /* Roland SD-50 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0117, 0x0d, 0x01), /* Roland VS-20 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0119, 0x0d, 0x01), /* Roland OCTAPAD
> SPD-30 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x011c, 0x0d, 0x01), /* Roland Lucina
> AX-09 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x011e, 0x0d, 0x01), /* BOSS BR-800 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0120, 0x0d, 0x01), /* Roland
> OCTA-CAPTURE */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0121, 0x0d, 0x01), /* Roland
> OCTA-CAPTURE */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0123, 0x0d, 0x01), /* Roland JUNO-Gi */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0124, 0x0d, 0x01), /* Roland M-300 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0127, 0x0d, 0x01), /* Roland GR-55 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x012b, 0x0d, 0x01), /* Roland DUO-CAPTURE
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x012f, 0x0d, 0x01), /* Roland
> QUAD-CAPTURE */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0130, 0x0d, 0x01), /* BOSS BR-80 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0132, 0x0d, 0x01), /* Roland TRI-CAPTURE
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0134, 0x0d, 0x01), /* Roland V-Mixer */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0138, 0x0d, 0x01), /* BOSS RC-300 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x013a, 0x0d, 0x01), /* Roland JUPITER-80
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x013e, 0x0d, 0x01), /* Roland R-26 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0145, 0x0d, 0x01), /* Roland SPD-SX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x014b, 0x0d, 0x01), /* BOSS eBand JS-10 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x014d, 0x0d, 0x01), /* BOSS GT-100 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0150, 0x0d, 0x01), /* Roland TD-15 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0151, 0x0d, 0x01), /* Roland TD-11 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0154, 0x0d, 0x01), /* Roland JUPITER-50
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0158, 0x0d, 0x01), /* Roland TD-30 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0159, 0x0d, 0x01), /* Roland DUO-CAPTURE
> EX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x015b, 0x0d, 0x01), /* Roland INTEGRA-7 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x015d, 0x0d, 0x01), /* Roland R-88 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x017a, 0x0d, 0x01), /* Roland VT-3 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x017c, 0x0d, 0x01), /* Roland TR-8 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS GT-100v2 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01b5, 0x0d, 0x01), /* Roland Boutique
> Series Synthesizer */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01df, 0x0d, 0x01), /* Roland Rubix22 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e0, 0x0d, 0x01), /* Roland Rubix24 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e1, 0x0d, 0x01), /* Roland Rubix44 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01fd, 0x0d, 0x01), /* Roland Boutique
> SH-01A */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01ff, 0x0d, 0x01), /* Roland Boutique
> D-05 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */
>
>   {} /* terminator */
> @@ -278,6 +400,11 @@ static int audioformat_implicit_fb_quirk
>   }
>   }
>
> + ///* Don't apply playback quirks for the devices with capture quirk */
> + //p = find_implicit_fb_entry(chip, capture_implicit_fb_quirks, alts);
> + //if (p && p->type == IMPLICIT_FB_FIXED)
> + // return 0; /* no quirk */
> +
>   /* Generic UAC2 implicit feedback */
>   if (attr == USB_ENDPOINT_SYNC_ASYNC &&
>      alts->desc.bInterfaceClass == USB_CLASS_AUDIO &&
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-09  4:27                                     ` Geraldo Nascimento
@ 2021-04-09  4:55                                       ` Lucas
  2021-04-09  6:02                                         ` Geraldo Nascimento
  2021-04-09 16:47                                         ` Mike Oliphant
  0 siblings, 2 replies; 48+ messages in thread
From: Lucas @ 2021-04-09  4:55 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel, Mike Oliphant

Geraldo, you've made testing kernel patches for me quite easy, so thanks to
you!  And I'm happy to report that your patch, which I manually applied
because I forgot to remove the "if (false)" change, is working perfectly!
I am now able to use the, minimally mentioned, Takashi UA-101 MIDI patch
with the UA-101 set to USB 1.1 mode, on the same kernel that has perfectly
clean Boutique D-05 playback.  The Takashi UA-101 patch is here:
https://bugzilla.kernel.org/show_bug.cgi?id=212477, just in case there's
curiosity.  :)

It seems to me, that since the UA-101 in (USB 1.1 mode) isn't compatible
with the "if (false)" endpoint.c method, it would have to be matched for
exclusion, assuming we would ever be able to more simply match with
Roland's/BOSS' Vendor ID of 0x0582.  I still think that would be the
ultimate patch because, as far as I'm aware, all new Roland/BOSS devices
use minimally-differing forms of this implicit feedback quirk.

Thanks. again, for everything Mike, Geraldo, & Takashi!

  Lucas

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-09  4:55                                       ` Lucas
@ 2021-04-09  6:02                                         ` Geraldo Nascimento
  2021-04-09 16:47                                         ` Mike Oliphant
  1 sibling, 0 replies; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-09  6:02 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel, Mike Oliphant

Em Sex, 9 de abr de 2021 01:55, Lucas <jaffa225man@gmail.com> escreveu:

> Geraldo, you've made testing kernel patches for me quite easy, so thanks
> to you!  And I'm happy to report that your patch, which I manually applied
> because I forgot to remove the "if (false)" change, is working perfectly!
> I am now able to use the, minimally mentioned, Takashi UA-101 MIDI patch
> with the UA-101 set to USB 1.1 mode, on the same kernel that has perfectly
> clean Boutique D-05 playback.  The Takashi UA-101 patch is here:
> https://bugzilla.kernel.org/show_bug.cgi?id=212477, just in case there's
> curiosity.  :)
>

Thank you, Lucas!


> It seems to me, that since the UA-101 in (USB 1.1 mode) isn't compatible
> with the "if (false)" endpoint.c method, it would have to be matched for
> exclusion, assuming we would ever be able to more simply match with
> Roland's/BOSS' Vendor ID of 0x0582.  I still think that would be the
> ultimate patch because, as far as I'm aware, all new Roland/BOSS devices
> use minimally-differing forms of this implicit feedback quirk.
>

I see what you mean, good observation.


> Thanks. again, for everything Mike, Geraldo, & Takashi!
>
>   Lucas
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-09  4:55                                       ` Lucas
  2021-04-09  6:02                                         ` Geraldo Nascimento
@ 2021-04-09 16:47                                         ` Mike Oliphant
  2021-04-09 19:08                                           ` Geraldo Nascimento
  2021-04-09 19:09                                           ` Lucas
  1 sibling, 2 replies; 48+ messages in thread
From: Mike Oliphant @ 2021-04-09 16:47 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel, Geraldo Nascimento

Hi Lucas,

Your observation that the Roland D-05 still needs the capture feedback made
me try some more testing, and I think the GT-1 actually is the same.

I use my device with jackd running for both capture/playback at the same
time. This works for me without capture feedback enabled. But, it turns out
that just doing an "arecord" without playback fails. Enabling the capture
feedback makes capture also work without playback (and everything else
still works perfectly).

Given this, I agree that it seems likely that most, if not all, of these
Roland devices work the same way. It would be great to get more devices
tested, though.

As to an actual patch, I think it is probably best left to Takashi to
decide if he is comfortable with making a change to
snd_usb_endpoint_start() in endpoint.c, and if so, how he wants to make it
conditional for devices - whether an ID check in endpoint.c, or a flag on
feedback setup, or some other way.

Mike

On Thu, Apr 8, 2021 at 9:55 PM Lucas <jaffa225man@gmail.com> wrote:

> Geraldo, you've made testing kernel patches for me quite easy, so thanks
> to you!  And I'm happy to report that your patch, which I manually applied
> because I forgot to remove the "if (false)" change, is working perfectly!
> I am now able to use the, minimally mentioned, Takashi UA-101 MIDI patch
> with the UA-101 set to USB 1.1 mode, on the same kernel that has perfectly
> clean Boutique D-05 playback.  The Takashi UA-101 patch is here:
> https://bugzilla.kernel.org/show_bug.cgi?id=212477, just in case there's
> curiosity.  :)
>
> It seems to me, that since the UA-101 in (USB 1.1 mode) isn't compatible
> with the "if (false)" endpoint.c method, it would have to be matched for
> exclusion, assuming we would ever be able to more simply match with
> Roland's/BOSS' Vendor ID of 0x0582.  I still think that would be the
> ultimate patch because, as far as I'm aware, all new Roland/BOSS devices
> use minimally-differing forms of this implicit feedback quirk.
>
> Thanks. again, for everything Mike, Geraldo, & Takashi!
>
>   Lucas
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-09 16:47                                         ` Mike Oliphant
@ 2021-04-09 19:08                                           ` Geraldo Nascimento
  2021-04-09 19:09                                           ` Lucas
  1 sibling, 0 replies; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-09 19:08 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: Lucas, alsa-devel

Em Sex, 9 de abr de 2021 13:47, Mike Oliphant <oliphant@nostatic.org>
escreveu:

> Hi Lucas,
>
> Your observation that the Roland D-05 still needs the capture feedback
> made me try some more testing, and I think the GT-1 actually is the same.
>
> I use my device with jackd running for both capture/playback at the same
> time. This works for me without capture feedback enabled. But, it turns out
> that just doing an "arecord" without playback fails. Enabling the capture
> feedback makes capture also work without playback (and everything else
> still works perfectly).
>

Mike, you were incredibly lucky to have posted this patch in a window where
Lucas saw it and was able to test it. It will save you countless hours.

It makes little sense however that arecord should fail when used alone. I'm
not an USB know-it-all but by my logic if you're not using the playback how
in Earth is the code getting feedback from it? Can you see what I mean?

My suggestion is that you check the dyndbg logs to see if the capture quirk
isn't just forcing your device into duplex-mode. Maybe these devices aren't
meant to operate outside duplex, it's hard to say, their behaviour is
esoteric to say the least.

I mention this because your lsusb -v is quite clear in that the implicit
feedback endpoint is the capture one.

>
> Given this, I agree that it seems likely that most, if not all, of these
> Roland devices work the same way. It would be great to get more devices
> tested, though.
>
> As to an actual patch, I think it is probably best left to Takashi to
> decide if he is comfortable with making a change to
> snd_usb_endpoint_start() in endpoint.c, and if so, how he wants to make it
> conditional for devices - whether an ID check in endpoint.c, or a flag on
> feedback setup, or some other way.
>

Mike, remember that any criticism from me is always meant to be
constructive and to improve the quality of your patch. I do encourage you
to submit your patch to Takashi Iwai when you are confident that is
polished enough for mainlining.

If he decides to change everything you coded it's his decision and there's
little we can do, but the point is always to make the regular users' life a
little easier with devices that just work under Linux.

Thanks,
Geraldo


> Mike
>
> On Thu, Apr 8, 2021 at 9:55 PM Lucas <jaffa225man@gmail.com> wrote:
>
>> Geraldo, you've made testing kernel patches for me quite easy, so thanks
>> to you!  And I'm happy to report that your patch, which I manually applied
>> because I forgot to remove the "if (false)" change, is working perfectly!
>> I am now able to use the, minimally mentioned, Takashi UA-101 MIDI patch
>> with the UA-101 set to USB 1.1 mode, on the same kernel that has perfectly
>> clean Boutique D-05 playback.  The Takashi UA-101 patch is here:
>> https://bugzilla.kernel.org/show_bug.cgi?id=212477, just in case there's
>> curiosity.  :)
>>
>> It seems to me, that since the UA-101 in (USB 1.1 mode) isn't compatible
>> with the "if (false)" endpoint.c method, it would have to be matched for
>> exclusion, assuming we would ever be able to more simply match with
>> Roland's/BOSS' Vendor ID of 0x0582.  I still think that would be the
>> ultimate patch because, as far as I'm aware, all new Roland/BOSS devices
>> use minimally-differing forms of this implicit feedback quirk.
>>
>> Thanks. again, for everything Mike, Geraldo, & Takashi!
>>
>>   Lucas
>>
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-09 16:47                                         ` Mike Oliphant
  2021-04-09 19:08                                           ` Geraldo Nascimento
@ 2021-04-09 19:09                                           ` Lucas
  2021-04-11  7:25                                             ` Lucas
  1 sibling, 1 reply; 48+ messages in thread
From: Lucas @ 2021-04-09 19:09 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: alsa-devel, Geraldo Nascimento

I wholeheartedly agree with everything you wrote, Mike.  Takashi is the
person who knows best how to implement these changes, and is definitely the
most capable.  I will get back to you about retesting my other Roland
devices with this trick, although I only have a few of the many devices I'd
ultimately like this solution implemented for.  Also, I haven't noticed the
sync-related clicking with the other devices I own, but I'm confident they
won't be hurt by the change.  I'll let you both know, though, when I get
around to testing them.

Thanks as ever,

  Lucas

On Fri, Apr 9, 2021 at 11:47 AM Mike Oliphant <oliphant@nostatic.org> wrote:

> Hi Lucas,
>
> Your observation that the Roland D-05 still needs the capture feedback
> made me try some more testing, and I think the GT-1 actually is the same.
>
> I use my device with jackd running for both capture/playback at the same
> time. This works for me without capture feedback enabled. But, it turns out
> that just doing an "arecord" without playback fails. Enabling the capture
> feedback makes capture also work without playback (and everything else
> still works perfectly).
>
> Given this, I agree that it seems likely that most, if not all, of these
> Roland devices work the same way. It would be great to get more devices
> tested, though.
>
> As to an actual patch, I think it is probably best left to Takashi to
> decide if he is comfortable with making a change to
> snd_usb_endpoint_start() in endpoint.c, and if so, how he wants to make it
> conditional for devices - whether an ID check in endpoint.c, or a flag on
> feedback setup, or some other way.
>
> Mike
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-09 19:09                                           ` Lucas
@ 2021-04-11  7:25                                             ` Lucas
  2021-04-11  7:46                                               ` Lucas
                                                                 ` (2 more replies)
  0 siblings, 3 replies; 48+ messages in thread
From: Lucas @ 2021-04-11  7:25 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: alsa-devel, Geraldo Nascimento

Here's my interesting, slightly-surprising results, but first the test
criteria:

I enabled the playback quirk table line as "IMPLICIT_FB_GENERIC_DEV" for
each of these devices being tested, and changed endpoint.c's "if
(snd_usb_endpoint_implicit_feedback_sink(ep))" to evaluate false for the
Roland/BOSS vender ID of 0x0582 (with the vender matching method by
Geraldo).

EDIROL UA-4FX failed to capture, but plays well (only tested 48 kHz):
arecord -D hw:UA4FX -f S24_3LE -r 48000 -c 2 ./file.wav
Recording WAVE './test.wav' : Signed 24 bit Little Endian in 3bytes, Rate
48000 Hz, Stereo
arecord: xrun:1672: read/write error, state = PREPARED

aplay -D hw:UA4FX -f S24_3LE -r 48000 -c 2 ./other-file.wav
Playing WAVE './other-file.wav' : Signed 24 bit Little Endian in 3bytes,
Rate 48000 Hz, Stereo


EDIROL UA-101 "full speed" USB 1.1 mode doesn't capture or play (only
tested 48 kHz):
arecord -D hw:UA101 -f S32_LE -r 48000 -c 2 ./file.wav
arecord: main:830: audio open error: Connection timed out

aplay -D plughw:UA101 -f S32_LE -r 48000 -c 2 ./other-file.wav
aplay: main:830: audio open error: Connection timed out


EDIROL UA-101 "high speed" USB 2 mode captures and plays well (only tested
48 kHz):
arecord -D plughw:UA101 -f S32_LE -r 48000 -c 2 ./file.wav
Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 48000 Hz,
Stereo
^CAborted by signal Interrupt...

aplay -D plughw:UA101 -f S32_LE -r 48000 -c 2 ./file.wav
Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 48000 Hz,
Stereo


Roland R-26 captures and plays fine:
arecord -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./file.wav
Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
Stereo
^CAborted by signal Interrupt...

aplay -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./file.wav
Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
Stereo


Roland INTEGRA-7 captures and plays well (playback at 96 kHz is new!)
arecord -D hw:INTEGRA7 -f S32_LE -r 96000 -c 2 ./file.wav
Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
Stereo
^CAborted by signal Interrupt...

aplay -D hw:INTEGRA7 -f S32_LE -r 96000 -c 2 ./file.wav
Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
Stereo
(Wow, now audible at 96 kHz with this endpoint.c trick!)

arecord -D hw:INTEGRA7 -f S32_LE -r 44100 -c 2 ./file.wav
Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 44100 Hz,
Stereo
^CAborted by signal Interrupt...

aplay -D hw:INTEGRA7 -f S32_LE -r 44100 -c 2 ./file.wav
Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 44100 Hz,
Stereo


Roland VG-99 doesn't capture, but plays well:
arecord -D hw:VG99 -f S24_3LE -r 44100 -c 2 ./file.wav
Recording WAVE './file.wav' : Signed 24 bit Little Endian in 3bytes, Rate
44100 Hz, Stereo
arecord: xrun:1672: read/write error, state = PREPARED

aplay -D hw:VG99 -f S24_3LE -r 44100 -c 2 ./other-file.wav
Playing WAVE './other-file.wav' : Signed 24 bit Little Endian in 3bytes,
Rate 44100 Hz, Stereo


And, of course, you already know the Roland Boutique D-05 captures and
finally plays back perfectly with this trick.


Next, I'm going to use these findings to tailor the patch to only those
devices benefiting from it.  I had already suspected the EDIROL UA-*
devices didn't need this, but I was fairly sure they would still be
compatible.  They aren't and neither is the VG-99.  Improvements are in the
INTEGRA-7 (with it's playback mode of 96 kHz working crystal clearly) and
Boutique D-05, but possibly also the R-26 (which I haven't noticed clock
skew on either way)

Thanks!

Here's the patch used to test these, to reveal any accidentally left out
details:
diff -Nurp linux-5.11.9.orig/sound/usb/endpoint.c
linux-5.11.9.roland-geraldo-nascimento/sound/usb/endpoint.c
--- linux-5.11.9.orig/sound/usb/endpoint.c 2021-03-24 05:54:19.000000000
-0500
+++ linux-5.11.9.roland-geraldo-nascimento/sound/usb/endpoint.c 2021-04-10
00:14:30.836421501 -0500
@@ -1343,6 +1343,7 @@ int snd_usb_endpoint_start(struct snd_us
 {
  int err;
  unsigned int i;
+ bool skip_implicit_fb_urb_hold;

  if (atomic_read(&ep->chip->shutdown))
  return -EBADFD;
@@ -1375,7 +1376,14 @@ int snd_usb_endpoint_start(struct snd_us
  if (!ep_state_update(ep, EP_STATE_STOPPED, EP_STATE_RUNNING))
  goto __error;

- if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
+ //if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
+        skip_implicit_fb_urb_hold = false;
+
+        if (USB_ID_VENDOR(ep->chip->usb_id) == 0x0582) // &&
+        //   USB_ID_PRODUCT(ep->chip->usb_id) == 0x01ff)
+               skip_implicit_fb_urb_hold = true;
+
+       if (snd_usb_endpoint_implicit_feedback_sink(ep) &&
!skip_implicit_fb_urb_hold) {
  for (i = 0; i < ep->nurbs; i++) {
  struct snd_urb_ctx *ctx = ep->urb + i;
  list_add_tail(&ctx->ready_list, &ep->ready_playback_urbs);
diff -Nurp linux-5.11.9.orig/sound/usb/implicit.c
linux-5.11.9.roland-geraldo-nascimento/sound/usb/implicit.c
--- linux-5.11.9.orig/sound/usb/implicit.c 2021-04-01 20:55:06.079399075
-0500
+++ linux-5.11.9.roland-geraldo-nascimento/sound/usb/implicit.c 2021-04-10
00:22:41.942550829 -0500
@@ -71,27 +71,155 @@ static const struct snd_usb_implicit_fb_
   .ep_num = 0x84, .iface = 0 }, /* MOTU MicroBook II */

  /* No quirk for playback but with capture quirk (see below) */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171),   /* BOSS RC-505 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x007d), /* Edirol UA-101 High Speed */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x008d), /* Edirol UA-101 Full Speed */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x00a3), /* Edirol UA-4FX */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a6), /* Roland JUNO-G */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a9), /* Roland MC-808 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ad), /* Roland SH-201 */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x00b2), /* Roland VG-99 */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x00b3), /* Roland VG-99 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c2), /* Roland SonicCell */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c4), /* Edirol M-16DX */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c5), /* Roland SP-555 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c7), /* Roland V-Synth GT */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00d1), /* Roland Music Atelier */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00da), /* BOSS GT-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00db), /* BOSS GT-10 Guitar Effects
Processor */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00dc), /* BOSS GT-10B */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00de), /* Roland Fantom-G */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00eb), /* Roland VS-100 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00f8), /* Roland JUNO Series */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fc), /* Roland VS-700C */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fd), /* Roland VS-700 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fe), /* Roland VS-700 M1 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ff), /* Roland VS-700 M2 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0100), /* Roland VS-700 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0101), /* Roland VS-700 M2 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0102), /* Roland VB-99 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0109), /* BOSS eBand JS-8 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0111), /* Roland GAIA SH-01 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0113), /* BOSS ME-25 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0114), /* Roland SD-50 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0117), /* Roland VS-20 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0119), /* Roland OCTAPAD SPD-30 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x011c), /* Roland Lucina AX-09 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x011e), /* BOSS BR-800 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0120), /* Roland OCTA-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0121), /* Roland OCTA-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0123), /* Roland JUNO-Gi */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0124), /* Roland M-300 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0127), /* Roland GR-55 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x012b), /* Roland DUO-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x012f), /* Roland QUAD-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0132), /* Roland TRI-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0134), /* Roland V-Mixer */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0138), /* BOSS RC-300 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x013a), /* Roland JUPITER-80 */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x013e), /* Roland R-26 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0145), /* Roland SPD-SX */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x014b), /* BOSS eBand JS-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x014d), /* BOSS GT-100 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0150), /* Roland TD-15 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0151), /* Roland TD-11 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0154), /* Roland JUPITER-50 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0158), /* Roland TD-30 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0159), /* Roland DUO-CAPTURE EX */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x015b), /* Roland INTEGRA-7 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x015d), /* Roland R-88 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171), /* BOSS RC-505 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x017a), /* Roland VT-3 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x017c), /* Roland TR-8 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01b5), /* Roland Boutique Series
Synthesizer */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01df), /* Roland Rubix22 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e0), /* Roland Rubix24 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e1), /* Roland Rubix44 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01fd), /* Roland Boutique SH-01A */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01ff), /* Roland Boutique D-05 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203), /* BOSS AD-10 */

  {} /* terminator */
 };

 /* Implicit feedback quirk table for capture: only FIXED type */
 static const struct snd_usb_implicit_fb_match capture_implicit_fb_quirks[]
= {
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x007d, 0x0d, 0x01), /* Edirol UA-101 High
Speed */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x008d, 0x0d, 0x01), /* Edirol UA-101 Full
Speed */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a3, 0x0d, 0x01), /* Edirol UA-4FX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a6, 0x0d, 0x01), /* Roland JUNO-G */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a9, 0x0d, 0x01), /* Roland MC-808 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ad, 0x0d, 0x01), /* Roland SH-201 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b2, 0x0d, 0x01), /* Roland VG-99 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b3, 0x0d, 0x01), /* Roland VG-99 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c2, 0x0d, 0x01), /* Roland SonicCell */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c4, 0x0d, 0x01), /* Edirol M-16DX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c5, 0x0d, 0x01), /* Roland SP-555 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c7, 0x0d, 0x01), /* Roland V-Synth GT */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00d1, 0x0d, 0x01), /* Roland Music
Atelier */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00da, 0x0d, 0x01), /* BOSS GT-10 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00db, 0x0d, 0x01), /* BOSS GT-10 Guitar
Effects Processor */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00dc, 0x0d, 0x01), /* BOSS GT-10B */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00de, 0x0d, 0x01), /* Roland Fantom-G */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00eb, 0x0d, 0x01), /* Roland VS-100 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00f8, 0x0d, 0x01), /* Roland JUNO Series
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fc, 0x0d, 0x01), /* Roland VS-700C */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fd, 0x0d, 0x01), /* Roland VS-700 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fe, 0x0d, 0x01), /* Roland VS-700 M1 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ff, 0x0d, 0x01), /* Roland VS-700 M2 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0100, 0x0d, 0x01), /* Roland VS-700 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0101, 0x0d, 0x01), /* Roland VS-700 M2 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0102, 0x0d, 0x01), /* Roland VB-99 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0109, 0x0d, 0x01), /* BOSS eBand JS-8 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0111, 0x0d, 0x01), /* Roland GAIA SH-01 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0113, 0x0d, 0x01), /* BOSS ME-25 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0114, 0x0d, 0x01), /* Roland SD-50 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0117, 0x0d, 0x01), /* Roland VS-20 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0119, 0x0d, 0x01), /* Roland OCTAPAD
SPD-30 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x011c, 0x0d, 0x01), /* Roland Lucina AX-09
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x011e, 0x0d, 0x01), /* BOSS BR-800 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0120, 0x0d, 0x01), /* Roland OCTA-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0121, 0x0d, 0x01), /* Roland OCTA-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0123, 0x0d, 0x01), /* Roland JUNO-Gi */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0124, 0x0d, 0x01), /* Roland M-300 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0127, 0x0d, 0x01), /* Roland GR-55 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x012b, 0x0d, 0x01), /* Roland DUO-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x012f, 0x0d, 0x01), /* Roland QUAD-CAPTURE
*/
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0130, 0x0d, 0x01), /* BOSS BR-80 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0132, 0x0d, 0x01), /* Roland TRI-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0134, 0x0d, 0x01), /* Roland V-Mixer */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0138, 0x0d, 0x01), /* BOSS RC-300 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x013a, 0x0d, 0x01), /* Roland JUPITER-80 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x013e, 0x0d, 0x01), /* Roland R-26 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0145, 0x0d, 0x01), /* Roland SPD-SX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x014b, 0x0d, 0x01), /* BOSS eBand JS-10 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x014d, 0x0d, 0x01), /* BOSS GT-100 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0150, 0x0d, 0x01), /* Roland TD-15 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0151, 0x0d, 0x01), /* Roland TD-11 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0154, 0x0d, 0x01), /* Roland JUPITER-50 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0158, 0x0d, 0x01), /* Roland TD-30 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0159, 0x0d, 0x01), /* Roland DUO-CAPTURE
EX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x015b, 0x0d, 0x01), /* Roland INTEGRA-7 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x015d, 0x0d, 0x01), /* Roland R-88 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x017a, 0x0d, 0x01), /* Roland VT-3 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x017c, 0x0d, 0x01), /* Roland TR-8 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS GT-100v2 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01b5, 0x0d, 0x01), /* Roland Boutique
Series Synthesizer */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01df, 0x0d, 0x01), /* Roland Rubix22 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e0, 0x0d, 0x01), /* Roland Rubix24 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e1, 0x0d, 0x01), /* Roland Rubix44 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01fd, 0x0d, 0x01), /* Roland Boutique
SH-01A */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01ff, 0x0d, 0x01), /* Roland Boutique
D-05 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */

  {} /* terminator */
@@ -278,6 +406,11 @@ static int audioformat_implicit_fb_quirk
  }
  }

+ ///* Don't apply playback quirks for the devices with capture quirk */
+ //p = find_implicit_fb_entry(chip, capture_implicit_fb_quirks, alts);
+ //if (p && p->type == IMPLICIT_FB_FIXED)
+ // return 0; /* no quirk */
+
  /* Generic UAC2 implicit feedback */
  if (attr == USB_ENDPOINT_SYNC_ASYNC &&
     alts->desc.bInterfaceClass == USB_CLASS_AUDIO &&


On Fri, Apr 9, 2021 at 2:09 PM Lucas <jaffa225man@gmail.com> wrote:

> I wholeheartedly agree with everything you wrote, Mike.  Takashi is the
> person who knows best how to implement these changes, and is definitely the
> most capable.  I will get back to you about retesting my other Roland
> devices with this trick, although I only have a few of the many devices I'd
> ultimately like this solution implemented for.  Also, I haven't noticed the
> sync-related clicking with the other devices I own, but I'm confident they
> won't be hurt by the change.  I'll let you both know, though, when I get
> around to testing them.
>
> Thanks as ever,
>
>   Lucas
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-11  7:25                                             ` Lucas
@ 2021-04-11  7:46                                               ` Lucas
  2021-04-11 19:46                                               ` Mike Oliphant
  2021-04-11 21:33                                               ` Geraldo Nascimento
  2 siblings, 0 replies; 48+ messages in thread
From: Lucas @ 2021-04-11  7:46 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: alsa-devel, Geraldo Nascimento

This is the patch I'm using now, thinking all my devices work best with it,
but changes are inevitable (for other devices anyway).  It's likely the
Roland VB-99 is the same as the VG-99, but as having the VG-99 skipped in
the playback table and fixed in the capture table seems to work for me, I
left the VB-99 as is.  Although, assuming it is either handled by the VG-99
code, or its own very similar code, it may not need to be in these quirk
tables at all:
diff -Nurp linux-5.11.9.orig/sound/usb/endpoint.c
linux-5.11.9.roland-geraldo-nascimento/sound/usb/endpoint.c
--- linux-5.11.9.orig/sound/usb/endpoint.c 2021-03-24 05:54:19.000000000
-0500
+++ linux-5.11.9.roland-geraldo-nascimento/sound/usb/endpoint.c 2021-04-11
02:06:42.487663031 -0500
@@ -1343,6 +1343,7 @@ int snd_usb_endpoint_start(struct snd_us
 {
  int err;
  unsigned int i;
+ bool skip_implicit_fb_urb_hold;

  if (atomic_read(&ep->chip->shutdown))
  return -EBADFD;
@@ -1375,7 +1376,16 @@ int snd_usb_endpoint_start(struct snd_us
  if (!ep_state_update(ep, EP_STATE_STOPPED, EP_STATE_RUNNING))
  goto __error;

- if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
+ //if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
+        skip_implicit_fb_urb_hold = false;
+
+        if (USB_ID_VENDOR(ep->chip->usb_id) == 0x0582 &&
+           ((USB_ID_PRODUCT(ep->chip->usb_id) == 0x013e) || /* Roland R-26
*/
+           (USB_ID_PRODUCT(ep->chip->usb_id) == 0x015b) ||  /* Roland
INTEGRA-7 */
+           (USB_ID_PRODUCT(ep->chip->usb_id) == 0x01ff)))   /* Roland
Boutique D-05 */
+               skip_implicit_fb_urb_hold = true;
+
+       if (snd_usb_endpoint_implicit_feedback_sink(ep) &&
!skip_implicit_fb_urb_hold) {
  for (i = 0; i < ep->nurbs; i++) {
  struct snd_urb_ctx *ctx = ep->urb + i;
  list_add_tail(&ctx->ready_list, &ep->ready_playback_urbs);
diff -Nurp linux-5.11.9.orig/sound/usb/implicit.c
linux-5.11.9.roland-geraldo-nascimento/sound/usb/implicit.c
--- linux-5.11.9.orig/sound/usb/implicit.c 2021-04-01 20:55:06.079399075
-0500
+++ linux-5.11.9.roland-geraldo-nascimento/sound/usb/implicit.c 2021-04-11
02:02:09.388996065 -0500
@@ -71,27 +71,145 @@ static const struct snd_usb_implicit_fb_
   .ep_num = 0x84, .iface = 0 }, /* MOTU MicroBook II */

  /* No quirk for playback but with capture quirk (see below) */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171),   /* BOSS RC-505 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a6), /* Roland JUNO-G */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a9), /* Roland MC-808 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ad), /* Roland SH-201 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c2), /* Roland SonicCell */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c4), /* Edirol M-16DX */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c5), /* Roland SP-555 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c7), /* Roland V-Synth GT */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00d1), /* Roland Music Atelier */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00da), /* BOSS GT-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00db), /* BOSS GT-10 Guitar Effects
Processor */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00dc), /* BOSS GT-10B */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00de), /* Roland Fantom-G */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00eb), /* Roland VS-100 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00f8), /* Roland JUNO Series */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fc), /* Roland VS-700C */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fd), /* Roland VS-700 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fe), /* Roland VS-700 M1 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ff), /* Roland VS-700 M2 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0100), /* Roland VS-700 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0101), /* Roland VS-700 M2 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0102), /* Roland VB-99 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0109), /* BOSS eBand JS-8 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0111), /* Roland GAIA SH-01 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0113), /* BOSS ME-25 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0114), /* Roland SD-50 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0117), /* Roland VS-20 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0119), /* Roland OCTAPAD SPD-30 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x011c), /* Roland Lucina AX-09 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x011e), /* BOSS BR-800 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0120), /* Roland OCTA-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0121), /* Roland OCTA-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0123), /* Roland JUNO-Gi */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0124), /* Roland M-300 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0127), /* Roland GR-55 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x012b), /* Roland DUO-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x012f), /* Roland QUAD-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0132), /* Roland TRI-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0134), /* Roland V-Mixer */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0138), /* BOSS RC-300 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x013a), /* Roland JUPITER-80 */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x013e), /* Roland R-26 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0145), /* Roland SPD-SX */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x014b), /* BOSS eBand JS-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x014d), /* BOSS GT-100 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0150), /* Roland TD-15 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0151), /* Roland TD-11 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0154), /* Roland JUPITER-50 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0158), /* Roland TD-30 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0159), /* Roland DUO-CAPTURE EX */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x015b), /* Roland INTEGRA-7 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x015d), /* Roland R-88 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171), /* BOSS RC-505 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x017a), /* Roland VT-3 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x017c), /* Roland TR-8 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01b5), /* Roland Boutique Series
Synthesizer */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01df), /* Roland Rubix22 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e0), /* Roland Rubix24 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e1), /* Roland Rubix44 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01fd), /* Roland Boutique SH-01A */
+ IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01ff), /* Roland Boutique D-05 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203), /* BOSS AD-10 */

  {} /* terminator */
 };

 /* Implicit feedback quirk table for capture: only FIXED type */
 static const struct snd_usb_implicit_fb_match capture_implicit_fb_quirks[]
= {
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a6, 0x0d, 0x01), /* Roland JUNO-G */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a9, 0x0d, 0x01), /* Roland MC-808 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ad, 0x0d, 0x01), /* Roland SH-201 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c2, 0x0d, 0x01), /* Roland SonicCell */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c4, 0x0d, 0x01), /* Edirol M-16DX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c5, 0x0d, 0x01), /* Roland SP-555 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c7, 0x0d, 0x01), /* Roland V-Synth GT */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00d1, 0x0d, 0x01), /* Roland Music
Atelier */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00da, 0x0d, 0x01), /* BOSS GT-10 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00db, 0x0d, 0x01), /* BOSS GT-10 Guitar
Effects Processor */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00dc, 0x0d, 0x01), /* BOSS GT-10B */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00de, 0x0d, 0x01), /* Roland Fantom-G */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00eb, 0x0d, 0x01), /* Roland VS-100 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00f8, 0x0d, 0x01), /* Roland JUNO Series
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fc, 0x0d, 0x01), /* Roland VS-700C */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fd, 0x0d, 0x01), /* Roland VS-700 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fe, 0x0d, 0x01), /* Roland VS-700 M1 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ff, 0x0d, 0x01), /* Roland VS-700 M2 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0100, 0x0d, 0x01), /* Roland VS-700 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0101, 0x0d, 0x01), /* Roland VS-700 M2 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0102, 0x0d, 0x01), /* Roland VB-99 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0109, 0x0d, 0x01), /* BOSS eBand JS-8 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0111, 0x0d, 0x01), /* Roland GAIA SH-01 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0113, 0x0d, 0x01), /* BOSS ME-25 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0114, 0x0d, 0x01), /* Roland SD-50 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0117, 0x0d, 0x01), /* Roland VS-20 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0119, 0x0d, 0x01), /* Roland OCTAPAD
SPD-30 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x011c, 0x0d, 0x01), /* Roland Lucina AX-09
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x011e, 0x0d, 0x01), /* BOSS BR-800 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0120, 0x0d, 0x01), /* Roland OCTA-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0121, 0x0d, 0x01), /* Roland OCTA-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0123, 0x0d, 0x01), /* Roland JUNO-Gi */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0124, 0x0d, 0x01), /* Roland M-300 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0127, 0x0d, 0x01), /* Roland GR-55 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x012b, 0x0d, 0x01), /* Roland DUO-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x012f, 0x0d, 0x01), /* Roland QUAD-CAPTURE
*/
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0130, 0x0d, 0x01), /* BOSS BR-80 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0132, 0x0d, 0x01), /* Roland TRI-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0134, 0x0d, 0x01), /* Roland V-Mixer */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0138, 0x0d, 0x01), /* BOSS RC-300 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x013a, 0x0d, 0x01), /* Roland JUPITER-80 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x013e, 0x0d, 0x01), /* Roland R-26 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0145, 0x0d, 0x01), /* Roland SPD-SX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x014b, 0x0d, 0x01), /* BOSS eBand JS-10 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x014d, 0x0d, 0x01), /* BOSS GT-100 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0150, 0x0d, 0x01), /* Roland TD-15 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0151, 0x0d, 0x01), /* Roland TD-11 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0154, 0x0d, 0x01), /* Roland JUPITER-50 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0158, 0x0d, 0x01), /* Roland TD-30 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0159, 0x0d, 0x01), /* Roland DUO-CAPTURE
EX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x015b, 0x0d, 0x01), /* Roland INTEGRA-7 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x015d, 0x0d, 0x01), /* Roland R-88 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x017a, 0x0d, 0x01), /* Roland VT-3 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x017c, 0x0d, 0x01), /* Roland TR-8 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS GT-100v2 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01b5, 0x0d, 0x01), /* Roland Boutique
Series Synthesizer */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01df, 0x0d, 0x01), /* Roland Rubix22 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e0, 0x0d, 0x01), /* Roland Rubix24 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e1, 0x0d, 0x01), /* Roland Rubix44 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01fd, 0x0d, 0x01), /* Roland Boutique
SH-01A */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01ff, 0x0d, 0x01), /* Roland Boutique
D-05 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */

  {} /* terminator */
@@ -278,6 +396,11 @@ static int audioformat_implicit_fb_quirk
  }
  }

+ ///* Don't apply playback quirks for the devices with capture quirk */
+ //p = find_implicit_fb_entry(chip, capture_implicit_fb_quirks, alts);
+ //if (p && p->type == IMPLICIT_FB_FIXED)
+ // return 0; /* no quirk */
+
  /* Generic UAC2 implicit feedback */
  if (attr == USB_ENDPOINT_SYNC_ASYNC &&
     alts->desc.bInterfaceClass == USB_CLASS_AUDIO &&

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-11  7:25                                             ` Lucas
  2021-04-11  7:46                                               ` Lucas
@ 2021-04-11 19:46                                               ` Mike Oliphant
  2021-04-11 21:11                                                 ` Lucas
  2021-04-11 21:33                                               ` Geraldo Nascimento
  2 siblings, 1 reply; 48+ messages in thread
From: Mike Oliphant @ 2021-04-11 19:46 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel, Geraldo Nascimento

Hi Lucas - it is very useful to have the results from those other
interfaces. Takashi has been working on a patch that handles my endpoint
fix using a flag set during endpoint configuration. Right now it is only
enabled for the BOSS devices, but It will be very easy for you to add your
extra working Roland devices.

Mike

On Sun, Apr 11, 2021 at 12:25 AM Lucas <jaffa225man@gmail.com> wrote:

> Here's my interesting, slightly-surprising results, but first the test
> criteria:
>
> I enabled the playback quirk table line as "IMPLICIT_FB_GENERIC_DEV" for
> each of these devices being tested, and changed endpoint.c's "if
> (snd_usb_endpoint_implicit_feedback_sink(ep))" to evaluate false for the
> Roland/BOSS vender ID of 0x0582 (with the vender matching method by
> Geraldo).
>
> EDIROL UA-4FX failed to capture, but plays well (only tested 48 kHz):
> arecord -D hw:UA4FX -f S24_3LE -r 48000 -c 2 ./file.wav
> Recording WAVE './test.wav' : Signed 24 bit Little Endian in 3bytes, Rate
> 48000 Hz, Stereo
> arecord: xrun:1672: read/write error, state = PREPARED
>
> aplay -D hw:UA4FX -f S24_3LE -r 48000 -c 2 ./other-file.wav
> Playing WAVE './other-file.wav' : Signed 24 bit Little Endian in 3bytes,
> Rate 48000 Hz, Stereo
>
>
> EDIROL UA-101 "full speed" USB 1.1 mode doesn't capture or play (only
> tested 48 kHz):
> arecord -D hw:UA101 -f S32_LE -r 48000 -c 2 ./file.wav
> arecord: main:830: audio open error: Connection timed out
>
> aplay -D plughw:UA101 -f S32_LE -r 48000 -c 2 ./other-file.wav
> aplay: main:830: audio open error: Connection timed out
>
>
> EDIROL UA-101 "high speed" USB 2 mode captures and plays well (only tested
> 48 kHz):
> arecord -D plughw:UA101 -f S32_LE -r 48000 -c 2 ./file.wav
> Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 48000 Hz,
> Stereo
> ^CAborted by signal Interrupt...
>
> aplay -D plughw:UA101 -f S32_LE -r 48000 -c 2 ./file.wav
> Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 48000 Hz,
> Stereo
>
>
> Roland R-26 captures and plays fine:
> arecord -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./file.wav
> Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
> Stereo
> ^CAborted by signal Interrupt...
>
> aplay -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./file.wav
> Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
> Stereo
>
>
> Roland INTEGRA-7 captures and plays well (playback at 96 kHz is new!)
> arecord -D hw:INTEGRA7 -f S32_LE -r 96000 -c 2 ./file.wav
> Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
> Stereo
> ^CAborted by signal Interrupt...
>
> aplay -D hw:INTEGRA7 -f S32_LE -r 96000 -c 2 ./file.wav
> Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
> Stereo
> (Wow, now audible at 96 kHz with this endpoint.c trick!)
>
> arecord -D hw:INTEGRA7 -f S32_LE -r 44100 -c 2 ./file.wav
> Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 44100 Hz,
> Stereo
> ^CAborted by signal Interrupt...
>
> aplay -D hw:INTEGRA7 -f S32_LE -r 44100 -c 2 ./file.wav
> Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 44100 Hz,
> Stereo
>
>
> Roland VG-99 doesn't capture, but plays well:
> arecord -D hw:VG99 -f S24_3LE -r 44100 -c 2 ./file.wav
> Recording WAVE './file.wav' : Signed 24 bit Little Endian in 3bytes, Rate
> 44100 Hz, Stereo
> arecord: xrun:1672: read/write error, state = PREPARED
>
> aplay -D hw:VG99 -f S24_3LE -r 44100 -c 2 ./other-file.wav
> Playing WAVE './other-file.wav' : Signed 24 bit Little Endian in 3bytes,
> Rate 44100 Hz, Stereo
>
>
> And, of course, you already know the Roland Boutique D-05 captures and
> finally plays back perfectly with this trick.
>
>
> Next, I'm going to use these findings to tailor the patch to only those
> devices benefiting from it.  I had already suspected the EDIROL UA-*
> devices didn't need this, but I was fairly sure they would still be
> compatible.  They aren't and neither is the VG-99.  Improvements are in the
> INTEGRA-7 (with it's playback mode of 96 kHz working crystal clearly) and
> Boutique D-05, but possibly also the R-26 (which I haven't noticed clock
> skew on either way)
>
> Thanks!
>
> Here's the patch used to test these, to reveal any accidentally left out
> details:
> diff -Nurp linux-5.11.9.orig/sound/usb/endpoint.c
> linux-5.11.9.roland-geraldo-nascimento/sound/usb/endpoint.c
> --- linux-5.11.9.orig/sound/usb/endpoint.c 2021-03-24 05:54:19.000000000
> -0500
> +++ linux-5.11.9.roland-geraldo-nascimento/sound/usb/endpoint.c 2021-04-10
> 00:14:30.836421501 -0500
> @@ -1343,6 +1343,7 @@ int snd_usb_endpoint_start(struct snd_us
>  {
>   int err;
>   unsigned int i;
> + bool skip_implicit_fb_urb_hold;
>
>   if (atomic_read(&ep->chip->shutdown))
>   return -EBADFD;
> @@ -1375,7 +1376,14 @@ int snd_usb_endpoint_start(struct snd_us
>   if (!ep_state_update(ep, EP_STATE_STOPPED, EP_STATE_RUNNING))
>   goto __error;
>
> - if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
> + //if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
> +        skip_implicit_fb_urb_hold = false;
> +
> +        if (USB_ID_VENDOR(ep->chip->usb_id) == 0x0582) // &&
> +        //   USB_ID_PRODUCT(ep->chip->usb_id) == 0x01ff)
> +               skip_implicit_fb_urb_hold = true;
> +
> +       if (snd_usb_endpoint_implicit_feedback_sink(ep) &&
> !skip_implicit_fb_urb_hold) {
>   for (i = 0; i < ep->nurbs; i++) {
>   struct snd_urb_ctx *ctx = ep->urb + i;
>   list_add_tail(&ctx->ready_list, &ep->ready_playback_urbs);
> diff -Nurp linux-5.11.9.orig/sound/usb/implicit.c
> linux-5.11.9.roland-geraldo-nascimento/sound/usb/implicit.c
> --- linux-5.11.9.orig/sound/usb/implicit.c 2021-04-01 20:55:06.079399075
> -0500
> +++ linux-5.11.9.roland-geraldo-nascimento/sound/usb/implicit.c 2021-04-10
> 00:22:41.942550829 -0500
> @@ -71,27 +71,155 @@ static const struct snd_usb_implicit_fb_
>    .ep_num = 0x84, .iface = 0 }, /* MOTU MicroBook II */
>
>   /* No quirk for playback but with capture quirk (see below) */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171),   /* BOSS RC-505 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x007d), /* Edirol UA-101 High Speed */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x008d), /* Edirol UA-101 Full Speed */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x00a3), /* Edirol UA-4FX */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a6), /* Roland JUNO-G */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a9), /* Roland MC-808 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ad), /* Roland SH-201 */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x00b2), /* Roland VG-99 */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x00b3), /* Roland VG-99 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c2), /* Roland SonicCell */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c4), /* Edirol M-16DX */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c5), /* Roland SP-555 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c7), /* Roland V-Synth GT */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00d1), /* Roland Music Atelier */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00da), /* BOSS GT-10 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00db), /* BOSS GT-10 Guitar Effects
> Processor */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00dc), /* BOSS GT-10B */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00de), /* Roland Fantom-G */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00eb), /* Roland VS-100 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00f8), /* Roland JUNO Series */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fc), /* Roland VS-700C */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fd), /* Roland VS-700 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fe), /* Roland VS-700 M1 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ff), /* Roland VS-700 M2 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0100), /* Roland VS-700 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0101), /* Roland VS-700 M2 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0102), /* Roland VB-99 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0109), /* BOSS eBand JS-8 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0111), /* Roland GAIA SH-01 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0113), /* BOSS ME-25 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0114), /* Roland SD-50 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0117), /* Roland VS-20 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0119), /* Roland OCTAPAD SPD-30 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x011c), /* Roland Lucina AX-09 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x011e), /* BOSS BR-800 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0120), /* Roland OCTA-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0121), /* Roland OCTA-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0123), /* Roland JUNO-Gi */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0124), /* Roland M-300 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0127), /* Roland GR-55 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x012b), /* Roland DUO-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x012f), /* Roland QUAD-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0132), /* Roland TRI-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0134), /* Roland V-Mixer */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0138), /* BOSS RC-300 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x013a), /* Roland JUPITER-80 */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x013e), /* Roland R-26 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0145), /* Roland SPD-SX */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x014b), /* BOSS eBand JS-10 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x014d), /* BOSS GT-100 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0150), /* Roland TD-15 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0151), /* Roland TD-11 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0154), /* Roland JUPITER-50 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0158), /* Roland TD-30 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0159), /* Roland DUO-CAPTURE EX */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x015b), /* Roland INTEGRA-7 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x015d), /* Roland R-88 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171), /* BOSS RC-505 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x017a), /* Roland VT-3 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x017c), /* Roland TR-8 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01b5), /* Roland Boutique Series
> Synthesizer */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01df), /* Roland Rubix22 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e0), /* Roland Rubix24 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e1), /* Roland Rubix44 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01fd), /* Roland Boutique SH-01A */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01ff), /* Roland Boutique D-05 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203), /* BOSS AD-10 */
>
>   {} /* terminator */
>  };
>
>  /* Implicit feedback quirk table for capture: only FIXED type */
>  static const struct snd_usb_implicit_fb_match
> capture_implicit_fb_quirks[] = {
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x007d, 0x0d, 0x01), /* Edirol UA-101 High
> Speed */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x008d, 0x0d, 0x01), /* Edirol UA-101 Full
> Speed */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a3, 0x0d, 0x01), /* Edirol UA-4FX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a6, 0x0d, 0x01), /* Roland JUNO-G */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a9, 0x0d, 0x01), /* Roland MC-808 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ad, 0x0d, 0x01), /* Roland SH-201 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b2, 0x0d, 0x01), /* Roland VG-99 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b3, 0x0d, 0x01), /* Roland VG-99 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c2, 0x0d, 0x01), /* Roland SonicCell */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c4, 0x0d, 0x01), /* Edirol M-16DX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c5, 0x0d, 0x01), /* Roland SP-555 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c7, 0x0d, 0x01), /* Roland V-Synth GT
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00d1, 0x0d, 0x01), /* Roland Music
> Atelier */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00da, 0x0d, 0x01), /* BOSS GT-10 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00db, 0x0d, 0x01), /* BOSS GT-10 Guitar
> Effects Processor */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00dc, 0x0d, 0x01), /* BOSS GT-10B */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00de, 0x0d, 0x01), /* Roland Fantom-G */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00eb, 0x0d, 0x01), /* Roland VS-100 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00f8, 0x0d, 0x01), /* Roland JUNO Series
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fc, 0x0d, 0x01), /* Roland VS-700C */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fd, 0x0d, 0x01), /* Roland VS-700 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fe, 0x0d, 0x01), /* Roland VS-700 M1 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ff, 0x0d, 0x01), /* Roland VS-700 M2 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0100, 0x0d, 0x01), /* Roland VS-700 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0101, 0x0d, 0x01), /* Roland VS-700 M2 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0102, 0x0d, 0x01), /* Roland VB-99 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0109, 0x0d, 0x01), /* BOSS eBand JS-8 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0111, 0x0d, 0x01), /* Roland GAIA SH-01
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0113, 0x0d, 0x01), /* BOSS ME-25 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0114, 0x0d, 0x01), /* Roland SD-50 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0117, 0x0d, 0x01), /* Roland VS-20 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0119, 0x0d, 0x01), /* Roland OCTAPAD
> SPD-30 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x011c, 0x0d, 0x01), /* Roland Lucina
> AX-09 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x011e, 0x0d, 0x01), /* BOSS BR-800 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0120, 0x0d, 0x01), /* Roland
> OCTA-CAPTURE */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0121, 0x0d, 0x01), /* Roland
> OCTA-CAPTURE */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0123, 0x0d, 0x01), /* Roland JUNO-Gi */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0124, 0x0d, 0x01), /* Roland M-300 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0127, 0x0d, 0x01), /* Roland GR-55 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x012b, 0x0d, 0x01), /* Roland DUO-CAPTURE
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x012f, 0x0d, 0x01), /* Roland
> QUAD-CAPTURE */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0130, 0x0d, 0x01), /* BOSS BR-80 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0132, 0x0d, 0x01), /* Roland TRI-CAPTURE
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0134, 0x0d, 0x01), /* Roland V-Mixer */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0138, 0x0d, 0x01), /* BOSS RC-300 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x013a, 0x0d, 0x01), /* Roland JUPITER-80
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x013e, 0x0d, 0x01), /* Roland R-26 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0145, 0x0d, 0x01), /* Roland SPD-SX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x014b, 0x0d, 0x01), /* BOSS eBand JS-10 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x014d, 0x0d, 0x01), /* BOSS GT-100 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0150, 0x0d, 0x01), /* Roland TD-15 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0151, 0x0d, 0x01), /* Roland TD-11 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0154, 0x0d, 0x01), /* Roland JUPITER-50
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0158, 0x0d, 0x01), /* Roland TD-30 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0159, 0x0d, 0x01), /* Roland DUO-CAPTURE
> EX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x015b, 0x0d, 0x01), /* Roland INTEGRA-7 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x015d, 0x0d, 0x01), /* Roland R-88 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x017a, 0x0d, 0x01), /* Roland VT-3 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x017c, 0x0d, 0x01), /* Roland TR-8 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS GT-100v2 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01b5, 0x0d, 0x01), /* Roland Boutique
> Series Synthesizer */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01df, 0x0d, 0x01), /* Roland Rubix22 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e0, 0x0d, 0x01), /* Roland Rubix24 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e1, 0x0d, 0x01), /* Roland Rubix44 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01fd, 0x0d, 0x01), /* Roland Boutique
> SH-01A */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01ff, 0x0d, 0x01), /* Roland Boutique
> D-05 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */
>
>   {} /* terminator */
> @@ -278,6 +406,11 @@ static int audioformat_implicit_fb_quirk
>   }
>   }
>
> + ///* Don't apply playback quirks for the devices with capture quirk */
> + //p = find_implicit_fb_entry(chip, capture_implicit_fb_quirks, alts);
> + //if (p && p->type == IMPLICIT_FB_FIXED)
> + // return 0; /* no quirk */
> +
>   /* Generic UAC2 implicit feedback */
>   if (attr == USB_ENDPOINT_SYNC_ASYNC &&
>      alts->desc.bInterfaceClass == USB_CLASS_AUDIO &&
>
>
> On Fri, Apr 9, 2021 at 2:09 PM Lucas <jaffa225man@gmail.com> wrote:
>
>> I wholeheartedly agree with everything you wrote, Mike.  Takashi is the
>> person who knows best how to implement these changes, and is definitely the
>> most capable.  I will get back to you about retesting my other Roland
>> devices with this trick, although I only have a few of the many devices I'd
>> ultimately like this solution implemented for.  Also, I haven't noticed the
>> sync-related clicking with the other devices I own, but I'm confident they
>> won't be hurt by the change.  I'll let you both know, though, when I get
>> around to testing them.
>>
>> Thanks as ever,
>>
>>   Lucas
>>
>
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-11 19:46                                               ` Mike Oliphant
@ 2021-04-11 21:11                                                 ` Lucas
  0 siblings, 0 replies; 48+ messages in thread
From: Lucas @ 2021-04-11 21:11 UTC (permalink / raw)
  To: Mike Oliphant; +Cc: alsa-devel, Geraldo Nascimento

Okay, thanks Mike, and I'm glad it might help!  Is there a link to the flag
patch anywhere, as I haven't found it yet?  I also realized that I have a
third EDIROL device (the UA-25EX), and will test it ASAP.

On Sun, Apr 11, 2021 at 2:46 PM Mike Oliphant <oliphant@nostatic.org> wrote:

> Hi Lucas - it is very useful to have the results from those other
> interfaces. Takashi has been working on a patch that handles my endpoint
> fix using a flag set during endpoint configuration. Right now it is only
> enabled for the BOSS devices, but It will be very easy for you to add your
> extra working Roland devices.
>
> Mike
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-11  7:25                                             ` Lucas
  2021-04-11  7:46                                               ` Lucas
  2021-04-11 19:46                                               ` Mike Oliphant
@ 2021-04-11 21:33                                               ` Geraldo Nascimento
  2021-04-12  5:57                                                 ` Lucas
  2 siblings, 1 reply; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-11 21:33 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel, Mike Oliphant

Hey, Lucas, glad you're having fun with hacking the kernel.

You have no idea how useful your information can be to future generations,
specially when things break on the kernel.

My suggestion is to remember to test full-duplex also for every device you
own, at least for those that work with both aplay and arecord.

But please remember, just aplay / arecord separately can be misleading some
times. Ideally one should test both PulseAudio and JACK on top of ALSA.
Being stubborn I refuse to work with PulseAudio (and systemd) so I'd miss a
PulseAudio bug. You get the picture.

Oh by the way, for the ultimate kick I believe you can test more than one
device with JACK by using alsa_in and alsa_out. This will make JACK a
little CPU hungry but at least will compensate for the eventual lack of
clock sync when using more than one soundcard.

Thank you,
Geraldo

Em Dom, 11 de abr de 2021 04:25, Lucas <jaffa225man@gmail.com> escreveu:

> Here's my interesting, slightly-surprising results, but first the test
> criteria:
>
> I enabled the playback quirk table line as "IMPLICIT_FB_GENERIC_DEV" for
> each of these devices being tested, and changed endpoint.c's "if
> (snd_usb_endpoint_implicit_feedback_sink(ep))" to evaluate false for the
> Roland/BOSS vender ID of 0x0582 (with the vender matching method by
> Geraldo).
>
> EDIROL UA-4FX failed to capture, but plays well (only tested 48 kHz):
> arecord -D hw:UA4FX -f S24_3LE -r 48000 -c 2 ./file.wav
> Recording WAVE './test.wav' : Signed 24 bit Little Endian in 3bytes, Rate
> 48000 Hz, Stereo
> arecord: xrun:1672: read/write error, state = PREPARED
>
> aplay -D hw:UA4FX -f S24_3LE -r 48000 -c 2 ./other-file.wav
> Playing WAVE './other-file.wav' : Signed 24 bit Little Endian in 3bytes,
> Rate 48000 Hz, Stereo
>
>
> EDIROL UA-101 "full speed" USB 1.1 mode doesn't capture or play (only
> tested 48 kHz):
> arecord -D hw:UA101 -f S32_LE -r 48000 -c 2 ./file.wav
> arecord: main:830: audio open error: Connection timed out
>
> aplay -D plughw:UA101 -f S32_LE -r 48000 -c 2 ./other-file.wav
> aplay: main:830: audio open error: Connection timed out
>
>
> EDIROL UA-101 "high speed" USB 2 mode captures and plays well (only tested
> 48 kHz):
> arecord -D plughw:UA101 -f S32_LE -r 48000 -c 2 ./file.wav
> Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 48000 Hz,
> Stereo
> ^CAborted by signal Interrupt...
>
> aplay -D plughw:UA101 -f S32_LE -r 48000 -c 2 ./file.wav
> Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 48000 Hz,
> Stereo
>
>
> Roland R-26 captures and plays fine:
> arecord -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./file.wav
> Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
> Stereo
> ^CAborted by signal Interrupt...
>
> aplay -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./file.wav
> Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
> Stereo
>
>
> Roland INTEGRA-7 captures and plays well (playback at 96 kHz is new!)
> arecord -D hw:INTEGRA7 -f S32_LE -r 96000 -c 2 ./file.wav
> Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
> Stereo
> ^CAborted by signal Interrupt...
>
> aplay -D hw:INTEGRA7 -f S32_LE -r 96000 -c 2 ./file.wav
> Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
> Stereo
> (Wow, now audible at 96 kHz with this endpoint.c trick!)
>
> arecord -D hw:INTEGRA7 -f S32_LE -r 44100 -c 2 ./file.wav
> Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 44100 Hz,
> Stereo
> ^CAborted by signal Interrupt...
>
> aplay -D hw:INTEGRA7 -f S32_LE -r 44100 -c 2 ./file.wav
> Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 44100 Hz,
> Stereo
>
>
> Roland VG-99 doesn't capture, but plays well:
> arecord -D hw:VG99 -f S24_3LE -r 44100 -c 2 ./file.wav
> Recording WAVE './file.wav' : Signed 24 bit Little Endian in 3bytes, Rate
> 44100 Hz, Stereo
> arecord: xrun:1672: read/write error, state = PREPARED
>
> aplay -D hw:VG99 -f S24_3LE -r 44100 -c 2 ./other-file.wav
> Playing WAVE './other-file.wav' : Signed 24 bit Little Endian in 3bytes,
> Rate 44100 Hz, Stereo
>
>
> And, of course, you already know the Roland Boutique D-05 captures and
> finally plays back perfectly with this trick.
>
>
> Next, I'm going to use these findings to tailor the patch to only those
> devices benefiting from it.  I had already suspected the EDIROL UA-*
> devices didn't need this, but I was fairly sure they would still be
> compatible.  They aren't and neither is the VG-99.  Improvements are in the
> INTEGRA-7 (with it's playback mode of 96 kHz working crystal clearly) and
> Boutique D-05, but possibly also the R-26 (which I haven't noticed clock
> skew on either way)
>
> Thanks!
>
> Here's the patch used to test these, to reveal any accidentally left out
> details:
> diff -Nurp linux-5.11.9.orig/sound/usb/endpoint.c
> linux-5.11.9.roland-geraldo-nascimento/sound/usb/endpoint.c
> --- linux-5.11.9.orig/sound/usb/endpoint.c 2021-03-24 05:54:19.000000000
> -0500
> +++ linux-5.11.9.roland-geraldo-nascimento/sound/usb/endpoint.c 2021-04-10
> 00:14:30.836421501 -0500
> @@ -1343,6 +1343,7 @@ int snd_usb_endpoint_start(struct snd_us
>  {
>   int err;
>   unsigned int i;
> + bool skip_implicit_fb_urb_hold;
>
>   if (atomic_read(&ep->chip->shutdown))
>   return -EBADFD;
> @@ -1375,7 +1376,14 @@ int snd_usb_endpoint_start(struct snd_us
>   if (!ep_state_update(ep, EP_STATE_STOPPED, EP_STATE_RUNNING))
>   goto __error;
>
> - if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
> + //if (snd_usb_endpoint_implicit_feedback_sink(ep)) {
> +        skip_implicit_fb_urb_hold = false;
> +
> +        if (USB_ID_VENDOR(ep->chip->usb_id) == 0x0582) // &&
> +        //   USB_ID_PRODUCT(ep->chip->usb_id) == 0x01ff)
> +               skip_implicit_fb_urb_hold = true;
> +
> +       if (snd_usb_endpoint_implicit_feedback_sink(ep) &&
> !skip_implicit_fb_urb_hold) {
>   for (i = 0; i < ep->nurbs; i++) {
>   struct snd_urb_ctx *ctx = ep->urb + i;
>   list_add_tail(&ctx->ready_list, &ep->ready_playback_urbs);
> diff -Nurp linux-5.11.9.orig/sound/usb/implicit.c
> linux-5.11.9.roland-geraldo-nascimento/sound/usb/implicit.c
> --- linux-5.11.9.orig/sound/usb/implicit.c 2021-04-01 20:55:06.079399075
> -0500
> +++ linux-5.11.9.roland-geraldo-nascimento/sound/usb/implicit.c 2021-04-10
> 00:22:41.942550829 -0500
> @@ -71,27 +71,155 @@ static const struct snd_usb_implicit_fb_
>    .ep_num = 0x84, .iface = 0 }, /* MOTU MicroBook II */
>
>   /* No quirk for playback but with capture quirk (see below) */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171),   /* BOSS RC-505 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x007d), /* Edirol UA-101 High Speed */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x008d), /* Edirol UA-101 Full Speed */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x00a3), /* Edirol UA-4FX */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a6), /* Roland JUNO-G */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00a9), /* Roland MC-808 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ad), /* Roland SH-201 */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x00b2), /* Roland VG-99 */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x00b3), /* Roland VG-99 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c2), /* Roland SonicCell */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c4), /* Edirol M-16DX */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c5), /* Roland SP-555 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00c7), /* Roland V-Synth GT */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00d1), /* Roland Music Atelier */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00da), /* BOSS GT-10 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00db), /* BOSS GT-10 Guitar Effects
> Processor */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00dc), /* BOSS GT-10B */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00de), /* Roland Fantom-G */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00eb), /* Roland VS-100 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00f8), /* Roland JUNO Series */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fc), /* Roland VS-700C */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fd), /* Roland VS-700 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00fe), /* Roland VS-700 M1 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x00ff), /* Roland VS-700 M2 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0100), /* Roland VS-700 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0101), /* Roland VS-700 M2 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0102), /* Roland VB-99 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0109), /* BOSS eBand JS-8 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0111), /* Roland GAIA SH-01 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0113), /* BOSS ME-25 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0114), /* Roland SD-50 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0117), /* Roland VS-20 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0119), /* Roland OCTAPAD SPD-30 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x011c), /* Roland Lucina AX-09 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x011e), /* BOSS BR-800 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0120), /* Roland OCTA-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0121), /* Roland OCTA-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0123), /* Roland JUNO-Gi */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0124), /* Roland M-300 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0127), /* Roland GR-55 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x012b), /* Roland DUO-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x012f), /* Roland QUAD-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0132), /* Roland TRI-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0134), /* Roland V-Mixer */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0138), /* BOSS RC-300 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x013a), /* Roland JUPITER-80 */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x013e), /* Roland R-26 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0145), /* Roland SPD-SX */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x014b), /* BOSS eBand JS-10 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x014d), /* BOSS GT-100 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0150), /* Roland TD-15 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0151), /* Roland TD-11 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0154), /* Roland JUPITER-50 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0158), /* Roland TD-30 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0159), /* Roland DUO-CAPTURE EX */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x015b), /* Roland INTEGRA-7 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x015d), /* Roland R-88 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171), /* BOSS RC-505 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x017a), /* Roland VT-3 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x017c), /* Roland TR-8 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01b5), /* Roland Boutique Series
> Synthesizer */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01df), /* Roland Rubix22 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e0), /* Roland Rubix24 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e1), /* Roland Rubix44 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01fd), /* Roland Boutique SH-01A */
> + IMPLICIT_FB_GENERIC_DEV(0x0582, 0x01ff), /* Roland Boutique D-05 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203), /* BOSS AD-10 */
>
>   {} /* terminator */
>  };
>
>  /* Implicit feedback quirk table for capture: only FIXED type */
>  static const struct snd_usb_implicit_fb_match
> capture_implicit_fb_quirks[] = {
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x007d, 0x0d, 0x01), /* Edirol UA-101 High
> Speed */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x008d, 0x0d, 0x01), /* Edirol UA-101 Full
> Speed */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a3, 0x0d, 0x01), /* Edirol UA-4FX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a6, 0x0d, 0x01), /* Roland JUNO-G */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a9, 0x0d, 0x01), /* Roland MC-808 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ad, 0x0d, 0x01), /* Roland SH-201 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b2, 0x0d, 0x01), /* Roland VG-99 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b3, 0x0d, 0x01), /* Roland VG-99 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c2, 0x0d, 0x01), /* Roland SonicCell */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c4, 0x0d, 0x01), /* Edirol M-16DX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c5, 0x0d, 0x01), /* Roland SP-555 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c7, 0x0d, 0x01), /* Roland V-Synth GT
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00d1, 0x0d, 0x01), /* Roland Music
> Atelier */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00da, 0x0d, 0x01), /* BOSS GT-10 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00db, 0x0d, 0x01), /* BOSS GT-10 Guitar
> Effects Processor */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00dc, 0x0d, 0x01), /* BOSS GT-10B */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00de, 0x0d, 0x01), /* Roland Fantom-G */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00eb, 0x0d, 0x01), /* Roland VS-100 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00f8, 0x0d, 0x01), /* Roland JUNO Series
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fc, 0x0d, 0x01), /* Roland VS-700C */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fd, 0x0d, 0x01), /* Roland VS-700 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fe, 0x0d, 0x01), /* Roland VS-700 M1 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ff, 0x0d, 0x01), /* Roland VS-700 M2 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0100, 0x0d, 0x01), /* Roland VS-700 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0101, 0x0d, 0x01), /* Roland VS-700 M2 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0102, 0x0d, 0x01), /* Roland VB-99 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0109, 0x0d, 0x01), /* BOSS eBand JS-8 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0111, 0x0d, 0x01), /* Roland GAIA SH-01
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0113, 0x0d, 0x01), /* BOSS ME-25 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0114, 0x0d, 0x01), /* Roland SD-50 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0117, 0x0d, 0x01), /* Roland VS-20 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0119, 0x0d, 0x01), /* Roland OCTAPAD
> SPD-30 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x011c, 0x0d, 0x01), /* Roland Lucina
> AX-09 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x011e, 0x0d, 0x01), /* BOSS BR-800 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0120, 0x0d, 0x01), /* Roland
> OCTA-CAPTURE */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0121, 0x0d, 0x01), /* Roland
> OCTA-CAPTURE */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0123, 0x0d, 0x01), /* Roland JUNO-Gi */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0124, 0x0d, 0x01), /* Roland M-300 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0127, 0x0d, 0x01), /* Roland GR-55 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x012b, 0x0d, 0x01), /* Roland DUO-CAPTURE
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x012f, 0x0d, 0x01), /* Roland
> QUAD-CAPTURE */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0130, 0x0d, 0x01), /* BOSS BR-80 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0132, 0x0d, 0x01), /* Roland TRI-CAPTURE
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0134, 0x0d, 0x01), /* Roland V-Mixer */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0138, 0x0d, 0x01), /* BOSS RC-300 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x013a, 0x0d, 0x01), /* Roland JUPITER-80
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x013e, 0x0d, 0x01), /* Roland R-26 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0145, 0x0d, 0x01), /* Roland SPD-SX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x014b, 0x0d, 0x01), /* BOSS eBand JS-10 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x014d, 0x0d, 0x01), /* BOSS GT-100 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0150, 0x0d, 0x01), /* Roland TD-15 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0151, 0x0d, 0x01), /* Roland TD-11 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0154, 0x0d, 0x01), /* Roland JUPITER-50
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0158, 0x0d, 0x01), /* Roland TD-30 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0159, 0x0d, 0x01), /* Roland DUO-CAPTURE
> EX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x015b, 0x0d, 0x01), /* Roland INTEGRA-7 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x015d, 0x0d, 0x01), /* Roland R-88 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x017a, 0x0d, 0x01), /* Roland VT-3 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x017c, 0x0d, 0x01), /* Roland TR-8 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS GT-100v2 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01b5, 0x0d, 0x01), /* Roland Boutique
> Series Synthesizer */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01df, 0x0d, 0x01), /* Roland Rubix22 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e0, 0x0d, 0x01), /* Roland Rubix24 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e1, 0x0d, 0x01), /* Roland Rubix44 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01fd, 0x0d, 0x01), /* Roland Boutique
> SH-01A */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01ff, 0x0d, 0x01), /* Roland Boutique
> D-05 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */
>
>   {} /* terminator */
> @@ -278,6 +406,11 @@ static int audioformat_implicit_fb_quirk
>   }
>   }
>
> + ///* Don't apply playback quirks for the devices with capture quirk */
> + //p = find_implicit_fb_entry(chip, capture_implicit_fb_quirks, alts);
> + //if (p && p->type == IMPLICIT_FB_FIXED)
> + // return 0; /* no quirk */
> +
>   /* Generic UAC2 implicit feedback */
>   if (attr == USB_ENDPOINT_SYNC_ASYNC &&
>      alts->desc.bInterfaceClass == USB_CLASS_AUDIO &&
>
>
> On Fri, Apr 9, 2021 at 2:09 PM Lucas <jaffa225man@gmail.com> wrote:
>
>> I wholeheartedly agree with everything you wrote, Mike.  Takashi is the
>> person who knows best how to implement these changes, and is definitely the
>> most capable.  I will get back to you about retesting my other Roland
>> devices with this trick, although I only have a few of the many devices I'd
>> ultimately like this solution implemented for.  Also, I haven't noticed the
>> sync-related clicking with the other devices I own, but I'm confident they
>> won't be hurt by the change.  I'll let you both know, though, when I get
>> around to testing them.
>>
>> Thanks as ever,
>>
>>   Lucas
>>
>
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-11 21:33                                               ` Geraldo Nascimento
@ 2021-04-12  5:57                                                 ` Lucas
  2021-04-12 23:24                                                   ` Geraldo Nascimento
  0 siblings, 1 reply; 48+ messages in thread
From: Lucas @ 2021-04-12  5:57 UTC (permalink / raw)
  To: Geraldo Nascimento; +Cc: alsa-devel, Mike Oliphant

Thanks a lot for the information about jack's use with alsa_in and
alsa_out!  The multiple card use issue is the main reason I don't work with
jack often.  Ardour not displaying unless I change my gnome theme to
"HighContrast" before opening it is annoying, but I like the command line
tool jack_capture as a simple, good alternative anyway.  I've long ago
decided pulseaudio to be a downgrade from ALSA, but I find it working okay
with my modern debian install.  Because it's functional now, I already had
tested each of these devices through gnome's "Settings"->"Sound" controls.
It gives an input device level display to prove that's functional, and a UI
to speaker-test for output devices.  This all works as expected.

Anyway, I just used alsa_in and alsa_out with jack due to your help, and
that is working perfectly too.  It's pretty fun to be able to record my
from my R-26 as a microphone voice-over for all my other instrument device
tests.  I did need to post process with audacity later to compress the
input levels and remove some accidental loud feedback, but it works
amazingly.

My UA-4FX usual sound card was the default as "system" to jack, so I really
was converting everything to 48 kHz, but that's fine for this test.  This
is because I started jack with qjackctl using my previous profile for the
UA-4FX.  I had to turn the UA-4FX's bottom "INPUT MONITOR" switch to "AUTO"
(off) to avoid feedback, since both its input and output is connected in
the test.

Then, here are the commands to get them running on jack:
alsa_in -j INTEGRA7 -d hw:INTEGRA7 -r 96000 &
alsa_out -j INTEGRA7 -d hw:INTEGRA7 -r 96000 &
alsa_in -j R26 -d hw:R26AUDIO -r 96000 &
alsa_out -j R26 -d hw:R26AUDIO -r 96000 &
alsa_in -j VG99 -d hw:VG99 -r 44100 &
alsa_out -j VG99 -d hw:VG99 -r 44100 &
alsa_in -j D05 -d hw:Boutique -r 96000 &
alsa_out -j D05 -d hw:Boutique -r 96000 &

Here's how I had them all circularly connected (using qjackctl):
system out->INTEGRA-7 in->INTEGRA-7 out->R-26 in->R-26 out->VG-99 in->VG-99
out->D-05 in->D-05 out->system in.  "System in" also had a physical line
input connected from the analog output of my Roland SC-8850, and "system
out" was connected to my amplifier and speakers from its line output.

I ran a ~15 minute jack_capture recording this way, and verified that all
devices are, at once, capable of both capture and playback (duplex).  All
except the D-05 have to be configured to loop input back to output, each
through slightly different conventions, but they were all figured out
eventually.

This test has delayed my testing of the UA-25Ex, but I'll get to that next,
and this was, very likely, more fun.

Thanks again Geraldo,

  Lucas

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-12  5:57                                                 ` Lucas
@ 2021-04-12 23:24                                                   ` Geraldo Nascimento
  2021-04-16  1:25                                                     ` Lucas
  0 siblings, 1 reply; 48+ messages in thread
From: Geraldo Nascimento @ 2021-04-12 23:24 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel, Mike Oliphant

Hi Lucas, I'm happy my suggestions lead to you actually having fun with
testing. Testing can be boring sometimes, but it seems you had the time of
your life :-)

As always I commend you for your effort in detailing your tests. That's
definitely important.

I hope you, Mike Oliphant and Takashi Iwai manage to write the best
possible patch. Of course there will be room for improvement as more people
test their Roland gear on Linux thanks to the three of you, but such is the
way.





Em Seg, 12 de abr de 2021 02:58, Lucas <jaffa225man@gmail.com> escreveu:

> Thanks a lot for the information about jack's use with alsa_in and
> alsa_out!  The multiple card use issue is the main reason I don't work with
> jack often.  Ardour not displaying unless I change my gnome theme to
> "HighContrast" before opening it is annoying, but I like the command line
> tool jack_capture as a simple, good alternative anyway.  I've long ago
> decided pulseaudio to be a downgrade from ALSA, but I find it working okay
> with my modern debian install.  Because it's functional now, I already had
> tested each of these devices through gnome's "Settings"->"Sound" controls.
> It gives an input device level display to prove that's functional, and a UI
> to speaker-test for output devices.  This all works as expected.
>
> Anyway, I just used alsa_in and alsa_out with jack due to your help, and
> that is working perfectly too.  It's pretty fun to be able to record my
> from my R-26 as a microphone voice-over for all my other instrument device
> tests.  I did need to post process with audacity later to compress the
> input levels and remove some accidental loud feedback, but it works
> amazingly.
>
> My UA-4FX usual sound card was the default as "system" to jack, so I
> really was converting everything to 48 kHz, but that's fine for this test.
> This is because I started jack with qjackctl using my previous profile for
> the UA-4FX.  I had to turn the UA-4FX's bottom "INPUT MONITOR" switch to
> "AUTO" (off) to avoid feedback, since both its input and output is
> connected in the test.
>
> Then, here are the commands to get them running on jack:
> alsa_in -j INTEGRA7 -d hw:INTEGRA7 -r 96000 &
> alsa_out -j INTEGRA7 -d hw:INTEGRA7 -r 96000 &
> alsa_in -j R26 -d hw:R26AUDIO -r 96000 &
> alsa_out -j R26 -d hw:R26AUDIO -r 96000 &
> alsa_in -j VG99 -d hw:VG99 -r 44100 &
> alsa_out -j VG99 -d hw:VG99 -r 44100 &
> alsa_in -j D05 -d hw:Boutique -r 96000 &
> alsa_out -j D05 -d hw:Boutique -r 96000 &
>
> Here's how I had them all circularly connected (using qjackctl):
> system out->INTEGRA-7 in->INTEGRA-7 out->R-26 in->R-26 out->VG-99
> in->VG-99 out->D-05 in->D-05 out->system in.  "System in" also had a
> physical line input connected from the analog output of my Roland SC-8850,
> and "system out" was connected to my amplifier and speakers from its line
> output.
>
> I ran a ~15 minute jack_capture recording this way, and verified that all
> devices are, at once, capable of both capture and playback (duplex).  All
> except the D-05 have to be configured to loop input back to output, each
> through slightly different conventions, but they were all figured out
> eventually.
>
> This test has delayed my testing of the UA-25Ex, but I'll get to that
> next, and this was, very likely, more fun.
>
> Thanks again Geraldo,
>
>   Lucas
>

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-12 23:24                                                   ` Geraldo Nascimento
@ 2021-04-16  1:25                                                     ` Lucas
  2021-04-16  1:28                                                       ` Lucas
  0 siblings, 1 reply; 48+ messages in thread
From: Lucas @ 2021-04-16  1:25 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Mike Oliphant, Geraldo Nascimento

Here's the patch proposed to be included in the next kernel release.
Thanks for the support from all of you!
I removed the Rubix22, Rubix24, and Rubix44 from it, since I found a blog
post about the Rubix44 working with Linux already:
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwiY1_zzxYHwAhUJTawKHU7wAyMQ7gEwBnoECAIQBw&url=https%3A%2F%2Ftranslate.google.com%2Ftranslate%3Fhl%3Den%26sl%3Dcs%26u%3Dhttps%3A%2F%2Fblog.frantovo.cz%2Fc%2F365%2FRoland%252520Rubix44%252520%2525E2%252580%252593%252520extern%2525C3%2525AD%252520zvukov%2525C3%2525A1%252520karta%26prev%3Dsearch%26pto%3Daue&usg=AOvVaw2H_Kumf2nAZW6pojLLtyZY

I also took Takashi Iwai's suggestion that a "Synch Type" of "Asynchronous"
for both the "In" and the "Out" Endpoints probably means we should use
IMPLICIT_FB_BOTH_DEV (and IMPLICIT_FB_FIXED_DEV otherwise) and edited it
again with the help of "lsusb -v" results around the Internet.  Here are
the conclusions I came to with what I could find through google, but the
unavailable (unlisted) others, I'm leaving IMPLICIT_FB_FIXED_DEV to be
safe.  These should all be certain (so are my devices but I didn't relist
them here):

0582:0109 both
0582:0111 both
0582:0114 fixed
0582:0127 both
0582:012b fixed
0582:012f both
0582:0137 fixed
0582:0138 both
0582:014d both
0582:0159 fixed
0582:017c both
0582:01b5 both
0582:01fd both

Hopefully, after this is in the kernel, people will notice if they have
noise through playback, because it takes headphones for me.  Of course
anybody showing "lsusb -v" for their device should be able to discern the
need for IMPLICIT_FB_BOTH_DEV too.

Thanks Takashi!
Here's the patch for inclusion in mainline 5.13:
diff -Nurp linux-5.11.9.orig-2021-04-13/sound/usb/implicit.c
linux-5.11.9.roland1/sound/usb/implicit.c
--- linux-5.11.9.orig-2021-04-13/sound/usb/implicit.c 2021-04-13
14:23:34.743782890 -0500
+++ linux-5.11.9.roland1/sound/usb/implicit.c 2021-04-15 19:35:20.053444538
-0500
@@ -79,13 +79,72 @@ static const struct snd_usb_implicit_fb_

 /* Implicit feedback quirk table for capture: only FIXED type */
 static const struct snd_usb_implicit_fb_match capture_implicit_fb_quirks[]
= {
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a6, 0x0d, 0x01), /* Roland JUNO-G */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a9, 0x0d, 0x01), /* Roland MC-808 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ad, 0x0d, 0x01), /* Roland SH-201 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b2, 0x0d, 0x01), /* Roland VG-99 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b3, 0x0d, 0x01), /* Roland VG-99 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c2, 0x0d, 0x01), /* Roland SonicCell */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c4, 0x0d, 0x01), /* Edirol M-16DX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c5, 0x0d, 0x01), /* Roland SP-555 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c7, 0x0d, 0x01), /* Roland V-Synth GT */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00d1, 0x0d, 0x01), /* Roland Music
Atelier */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00da, 0x0d, 0x01), /* BOSS GT-10 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00db, 0x0d, 0x01), /* BOSS GT-10 Guitar
Effects Processor */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00dc, 0x0d, 0x01), /* BOSS GT-10B */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00de, 0x0d, 0x01), /* Roland Fantom-G */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00eb, 0x0d, 0x01), /* Roland VS-100 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00f8, 0x0d, 0x01), /* Roland JUNO Series
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fc, 0x0d, 0x01), /* Roland VS-700C */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fd, 0x0d, 0x01), /* Roland VS-700 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fe, 0x0d, 0x01), /* Roland VS-700 M1 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ff, 0x0d, 0x01), /* Roland VS-700 M2 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0100, 0x0d, 0x01), /* Roland VS-700 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0101, 0x0d, 0x01), /* Roland VS-700 M2 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0102, 0x0d, 0x01), /* Roland VB-99 */
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x0109, 0x0d, 0x01), /* BOSS eBand JS-8 */
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x0111, 0x0d, 0x01), /* Roland GAIA SH-01 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0113, 0x0d, 0x01), /* BOSS ME-25 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0114, 0x0d, 0x01), /* Roland SD-50 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0117, 0x0d, 0x01), /* Roland VS-20 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0119, 0x0d, 0x01), /* Roland OCTAPAD
SPD-30 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x011c, 0x0d, 0x01), /* Roland Lucina AX-09
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x011e, 0x0d, 0x01), /* BOSS BR-800 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0120, 0x0d, 0x01), /* Roland OCTA-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0121, 0x0d, 0x01), /* Roland OCTA-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0123, 0x0d, 0x01), /* Roland JUNO-Gi */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0124, 0x0d, 0x01), /* Roland M-300 */
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x0127, 0x0d, 0x01), /* Roland GR-55 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x012b, 0x0d, 0x01), /* Roland DUO-CAPTURE
*/
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x012f, 0x0d, 0x01), /* Roland QUAD-CAPTURE
*/
  IMPLICIT_FB_BOTH_DEV(0x0582, 0x0130, 0x0d, 0x01), /* BOSS BR-80 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0132, 0x0d, 0x01), /* Roland TRI-CAPTURE
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0134, 0x0d, 0x01), /* Roland V-Mixer */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0137, 0x0d, 0x01), /* Roland DUO-CAPTURE
Advanced Mode*/
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x0138, 0x0d, 0x01), /* BOSS RC-300 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x013a, 0x0d, 0x01), /* Roland JUPITER-80 */
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x013e, 0x0d, 0x01), /* Roland R-26 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0145, 0x0d, 0x01), /* Roland SPD-SX */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x014b, 0x0d, 0x01), /* BOSS eBand JS-10 */
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x014d, 0x0d, 0x01), /* BOSS GT-100 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0150, 0x0d, 0x01), /* Roland TD-15 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0151, 0x0d, 0x01), /* Roland TD-11 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0154, 0x0d, 0x01), /* Roland JUPITER-50 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0158, 0x0d, 0x01), /* Roland TD-30 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0159, 0x0d, 0x01), /* Roland DUO-CAPTURE
EX */
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x015b, 0x0d, 0x01), /* Roland INTEGRA-7 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x015d, 0x0d, 0x01), /* Roland R-88 */
  IMPLICIT_FB_BOTH_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x017a, 0x0d, 0x01), /* Roland VT-3 */
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x017c, 0x0d, 0x01), /* Roland TR-8 */
  IMPLICIT_FB_BOTH_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
  IMPLICIT_FB_BOTH_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS GT-100v2 */
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x01b5, 0x0d, 0x01), /* Roland Boutique
JP-08 */
  IMPLICIT_FB_BOTH_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
  IMPLICIT_FB_BOTH_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana */
  IMPLICIT_FB_BOTH_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x01fd, 0x0d, 0x01), /* Roland Boutique
SH-01A */
+ IMPLICIT_FB_BOTH_DEV(0x0582, 0x01ff, 0x0d, 0x01), /* Roland Boutique D-05
*/
  IMPLICIT_FB_BOTH_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */

  {} /* terminator */

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-16  1:25                                                     ` Lucas
@ 2021-04-16  1:28                                                       ` Lucas
  2021-04-16  7:48                                                         ` Takashi Iwai
  0 siblings, 1 reply; 48+ messages in thread
From: Lucas @ 2021-04-16  1:28 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, Mike Oliphant, Geraldo Nascimento

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

Just in case you'd rather an attachment, here it is that way.

On Thu, Apr 15, 2021 at 8:25 PM Lucas <jaffa225man@gmail.com> wrote:

> Here's the patch proposed to be included in the next kernel release.
> Thanks for the support from all of you!
> I removed the Rubix22, Rubix24, and Rubix44 from it, since I found a blog
> post about the Rubix44 working with Linux already:
> https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwiY1_zzxYHwAhUJTawKHU7wAyMQ7gEwBnoECAIQBw&url=https%3A%2F%2Ftranslate.google.com%2Ftranslate%3Fhl%3Den%26sl%3Dcs%26u%3Dhttps%3A%2F%2Fblog.frantovo.cz%2Fc%2F365%2FRoland%252520Rubix44%252520%2525E2%252580%252593%252520extern%2525C3%2525AD%252520zvukov%2525C3%2525A1%252520karta%26prev%3Dsearch%26pto%3Daue&usg=AOvVaw2H_Kumf2nAZW6pojLLtyZY
>
> I also took Takashi Iwai's suggestion that a "Synch Type" of
> "Asynchronous" for both the "In" and the "Out" Endpoints probably means we
> should use IMPLICIT_FB_BOTH_DEV (and IMPLICIT_FB_FIXED_DEV otherwise) and
> edited it again with the help of "lsusb -v" results around the Internet.
> Here are the conclusions I came to with what I could find through google,
> but the unavailable (unlisted) others, I'm leaving IMPLICIT_FB_FIXED_DEV to
> be safe.  These should all be certain (so are my devices but I didn't
> relist them here):
>
> 0582:0109 both
> 0582:0111 both
> 0582:0114 fixed
> 0582:0127 both
> 0582:012b fixed
> 0582:012f both
> 0582:0137 fixed
> 0582:0138 both
> 0582:014d both
> 0582:0159 fixed
> 0582:017c both
> 0582:01b5 both
> 0582:01fd both
>
> Hopefully, after this is in the kernel, people will notice if they have
> noise through playback, because it takes headphones for me.  Of course
> anybody showing "lsusb -v" for their device should be able to discern the
> need for IMPLICIT_FB_BOTH_DEV too.
>
> Thanks Takashi!
> Here's the patch for inclusion in mainline 5.13:
> diff -Nurp linux-5.11.9.orig-2021-04-13/sound/usb/implicit.c
> linux-5.11.9.roland1/sound/usb/implicit.c
> --- linux-5.11.9.orig-2021-04-13/sound/usb/implicit.c 2021-04-13
> 14:23:34.743782890 -0500
> +++ linux-5.11.9.roland1/sound/usb/implicit.c 2021-04-15
> 19:35:20.053444538 -0500
> @@ -79,13 +79,72 @@ static const struct snd_usb_implicit_fb_
>
>  /* Implicit feedback quirk table for capture: only FIXED type */
>  static const struct snd_usb_implicit_fb_match
> capture_implicit_fb_quirks[] = {
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a6, 0x0d, 0x01), /* Roland JUNO-G */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a9, 0x0d, 0x01), /* Roland MC-808 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ad, 0x0d, 0x01), /* Roland SH-201 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b2, 0x0d, 0x01), /* Roland VG-99 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b3, 0x0d, 0x01), /* Roland VG-99 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c2, 0x0d, 0x01), /* Roland SonicCell */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c4, 0x0d, 0x01), /* Edirol M-16DX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c5, 0x0d, 0x01), /* Roland SP-555 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c7, 0x0d, 0x01), /* Roland V-Synth GT
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00d1, 0x0d, 0x01), /* Roland Music
> Atelier */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00da, 0x0d, 0x01), /* BOSS GT-10 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00db, 0x0d, 0x01), /* BOSS GT-10 Guitar
> Effects Processor */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00dc, 0x0d, 0x01), /* BOSS GT-10B */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00de, 0x0d, 0x01), /* Roland Fantom-G */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00eb, 0x0d, 0x01), /* Roland VS-100 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00f8, 0x0d, 0x01), /* Roland JUNO Series
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fc, 0x0d, 0x01), /* Roland VS-700C */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fd, 0x0d, 0x01), /* Roland VS-700 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fe, 0x0d, 0x01), /* Roland VS-700 M1 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ff, 0x0d, 0x01), /* Roland VS-700 M2 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0100, 0x0d, 0x01), /* Roland VS-700 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0101, 0x0d, 0x01), /* Roland VS-700 M2 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0102, 0x0d, 0x01), /* Roland VB-99 */
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x0109, 0x0d, 0x01), /* BOSS eBand JS-8 */
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x0111, 0x0d, 0x01), /* Roland GAIA SH-01 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0113, 0x0d, 0x01), /* BOSS ME-25 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0114, 0x0d, 0x01), /* Roland SD-50 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0117, 0x0d, 0x01), /* Roland VS-20 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0119, 0x0d, 0x01), /* Roland OCTAPAD
> SPD-30 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x011c, 0x0d, 0x01), /* Roland Lucina
> AX-09 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x011e, 0x0d, 0x01), /* BOSS BR-800 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0120, 0x0d, 0x01), /* Roland
> OCTA-CAPTURE */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0121, 0x0d, 0x01), /* Roland
> OCTA-CAPTURE */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0123, 0x0d, 0x01), /* Roland JUNO-Gi */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0124, 0x0d, 0x01), /* Roland M-300 */
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x0127, 0x0d, 0x01), /* Roland GR-55 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x012b, 0x0d, 0x01), /* Roland DUO-CAPTURE
> */
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x012f, 0x0d, 0x01), /* Roland QUAD-CAPTURE
> */
>   IMPLICIT_FB_BOTH_DEV(0x0582, 0x0130, 0x0d, 0x01), /* BOSS BR-80 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0132, 0x0d, 0x01), /* Roland TRI-CAPTURE
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0134, 0x0d, 0x01), /* Roland V-Mixer */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0137, 0x0d, 0x01), /* Roland DUO-CAPTURE
> Advanced Mode*/
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x0138, 0x0d, 0x01), /* BOSS RC-300 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x013a, 0x0d, 0x01), /* Roland JUPITER-80
> */
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x013e, 0x0d, 0x01), /* Roland R-26 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0145, 0x0d, 0x01), /* Roland SPD-SX */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x014b, 0x0d, 0x01), /* BOSS eBand JS-10 */
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x014d, 0x0d, 0x01), /* BOSS GT-100 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0150, 0x0d, 0x01), /* Roland TD-15 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0151, 0x0d, 0x01), /* Roland TD-11 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0154, 0x0d, 0x01), /* Roland JUPITER-50
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0158, 0x0d, 0x01), /* Roland TD-30 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0159, 0x0d, 0x01), /* Roland DUO-CAPTURE
> EX */
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x015b, 0x0d, 0x01), /* Roland INTEGRA-7 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x015d, 0x0d, 0x01), /* Roland R-88 */
>   IMPLICIT_FB_BOTH_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x017a, 0x0d, 0x01), /* Roland VT-3 */
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x017c, 0x0d, 0x01), /* Roland TR-8 */
>   IMPLICIT_FB_BOTH_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
>   IMPLICIT_FB_BOTH_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS GT-100v2 */
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x01b5, 0x0d, 0x01), /* Roland Boutique
> JP-08 */
>   IMPLICIT_FB_BOTH_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
>   IMPLICIT_FB_BOTH_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana */
>   IMPLICIT_FB_BOTH_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x01fd, 0x0d, 0x01), /* Roland Boutique
> SH-01A */
> + IMPLICIT_FB_BOTH_DEV(0x0582, 0x01ff, 0x0d, 0x01), /* Roland Boutique
> D-05 */
>   IMPLICIT_FB_BOTH_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */
>
>   {} /* terminator */
>


-- 
Protect your digital freedom and privacy, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm
On a related note, also see https://www.fsf.org/campaigns/surveillance

[-- Attachment #2: linux-5.11.9-roland1.patch --]
[-- Type: text/x-patch, Size: 5495 bytes --]

diff -Nurp linux-5.11.9.orig-2021-04-13/sound/usb/implicit.c linux-5.11.9.roland1/sound/usb/implicit.c
--- linux-5.11.9.orig-2021-04-13/sound/usb/implicit.c	2021-04-13 14:23:34.743782890 -0500
+++ linux-5.11.9.roland1/sound/usb/implicit.c	2021-04-15 19:35:20.053444538 -0500
@@ -79,13 +79,72 @@ static const struct snd_usb_implicit_fb_
 
 /* Implicit feedback quirk table for capture: only FIXED type */
 static const struct snd_usb_implicit_fb_match capture_implicit_fb_quirks[] = {
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a6, 0x0d, 0x01), /* Roland JUNO-G */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00a9, 0x0d, 0x01), /* Roland MC-808 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ad, 0x0d, 0x01), /* Roland SH-201 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b2, 0x0d, 0x01), /* Roland VG-99 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00b3, 0x0d, 0x01), /* Roland VG-99 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c2, 0x0d, 0x01), /* Roland SonicCell */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c4, 0x0d, 0x01), /* Edirol M-16DX */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c5, 0x0d, 0x01), /* Roland SP-555 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00c7, 0x0d, 0x01), /* Roland V-Synth GT */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00d1, 0x0d, 0x01), /* Roland Music Atelier */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00da, 0x0d, 0x01), /* BOSS GT-10 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00db, 0x0d, 0x01), /* BOSS GT-10 Guitar Effects Processor */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00dc, 0x0d, 0x01), /* BOSS GT-10B */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00de, 0x0d, 0x01), /* Roland Fantom-G */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00eb, 0x0d, 0x01), /* Roland VS-100 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00f8, 0x0d, 0x01), /* Roland JUNO Series */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fc, 0x0d, 0x01), /* Roland VS-700C */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fd, 0x0d, 0x01), /* Roland VS-700 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00fe, 0x0d, 0x01), /* Roland VS-700 M1 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x00ff, 0x0d, 0x01), /* Roland VS-700 M2 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0100, 0x0d, 0x01), /* Roland VS-700 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0101, 0x0d, 0x01), /* Roland VS-700 M2 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0102, 0x0d, 0x01), /* Roland VB-99 */
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x0109, 0x0d, 0x01), /* BOSS eBand JS-8 */
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x0111, 0x0d, 0x01), /* Roland GAIA SH-01 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0113, 0x0d, 0x01), /* BOSS ME-25 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0114, 0x0d, 0x01), /* Roland SD-50 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0117, 0x0d, 0x01), /* Roland VS-20 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0119, 0x0d, 0x01), /* Roland OCTAPAD SPD-30 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x011c, 0x0d, 0x01), /* Roland Lucina AX-09 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x011e, 0x0d, 0x01), /* BOSS BR-800 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0120, 0x0d, 0x01), /* Roland OCTA-CAPTURE */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0121, 0x0d, 0x01), /* Roland OCTA-CAPTURE */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0123, 0x0d, 0x01), /* Roland JUNO-Gi */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0124, 0x0d, 0x01), /* Roland M-300 */
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x0127, 0x0d, 0x01), /* Roland GR-55 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x012b, 0x0d, 0x01), /* Roland DUO-CAPTURE */
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x012f, 0x0d, 0x01), /* Roland QUAD-CAPTURE */
 	IMPLICIT_FB_BOTH_DEV(0x0582, 0x0130, 0x0d, 0x01), /* BOSS BR-80 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0132, 0x0d, 0x01), /* Roland TRI-CAPTURE */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0134, 0x0d, 0x01), /* Roland V-Mixer */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0137, 0x0d, 0x01), /* Roland DUO-CAPTURE Advanced Mode*/
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x0138, 0x0d, 0x01), /* BOSS RC-300 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x013a, 0x0d, 0x01), /* Roland JUPITER-80 */
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x013e, 0x0d, 0x01), /* Roland R-26 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0145, 0x0d, 0x01), /* Roland SPD-SX */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x014b, 0x0d, 0x01), /* BOSS eBand JS-10 */
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x014d, 0x0d, 0x01), /* BOSS GT-100 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0150, 0x0d, 0x01), /* Roland TD-15 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0151, 0x0d, 0x01), /* Roland TD-11 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0154, 0x0d, 0x01), /* Roland JUPITER-50 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0158, 0x0d, 0x01), /* Roland TD-30 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x0159, 0x0d, 0x01), /* Roland DUO-CAPTURE EX */
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x015b, 0x0d, 0x01), /* Roland INTEGRA-7 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x015d, 0x0d, 0x01), /* Roland R-88 */
 	IMPLICIT_FB_BOTH_DEV(0x0582, 0x0171, 0x0d, 0x01), /* BOSS RC-505 */
+	IMPLICIT_FB_FIXED_DEV(0x0582, 0x017a, 0x0d, 0x01), /* Roland VT-3 */
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x017c, 0x0d, 0x01), /* Roland TR-8 */
 	IMPLICIT_FB_BOTH_DEV(0x0582, 0x0185, 0x0d, 0x01), /* BOSS GP-10 */
 	IMPLICIT_FB_BOTH_DEV(0x0582, 0x0189, 0x0d, 0x01), /* BOSS GT-100v2 */
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x01b5, 0x0d, 0x01), /* Roland Boutique JP-08 */
 	IMPLICIT_FB_BOTH_DEV(0x0582, 0x01d6, 0x0d, 0x01), /* BOSS GT-1 */
 	IMPLICIT_FB_BOTH_DEV(0x0582, 0x01d8, 0x0d, 0x01), /* BOSS Katana */
 	IMPLICIT_FB_BOTH_DEV(0x0582, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x01fd, 0x0d, 0x01), /* Roland Boutique SH-01A */
+	IMPLICIT_FB_BOTH_DEV(0x0582, 0x01ff, 0x0d, 0x01), /* Roland Boutique D-05 */
 	IMPLICIT_FB_BOTH_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */
 
 	{} /* terminator */

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-16  1:28                                                       ` Lucas
@ 2021-04-16  7:48                                                         ` Takashi Iwai
  2021-04-16 16:19                                                           ` Lucas
  0 siblings, 1 reply; 48+ messages in thread
From: Takashi Iwai @ 2021-04-16  7:48 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel, Mike Oliphant, Geraldo Nascimento

On Fri, 16 Apr 2021 03:28:40 +0200,
Lucas wrote:
> 
> Just in case you'd rather an attachment, here it is that way.

Thanks.

Could you create a format patch that can be applied to the kernel as
is?  That is, it's with the following style:

  Subject: [PATCH] ALSA: usb-audio: Add support for blah blah...

  Here comes a description of the patch, explain why the patch is
  needed and what it does concisely.

  Signed-off-by: Your Name <your@address>

  ---
  the diff follows here...


Also, it'd be better to start from a new mail thread instead of
hanging on the old one.

For details, please refer to
Documentation/process/submitting-patches.rst.


thanks,

Takashi

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

* Re: Implicit feedback on BOSS GT-1, the saga continues...
  2021-04-16  7:48                                                         ` Takashi Iwai
@ 2021-04-16 16:19                                                           ` Lucas
  0 siblings, 0 replies; 48+ messages in thread
From: Lucas @ 2021-04-16 16:19 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Mike Oliphant, Geraldo Nascimento

Sure I will!  Thanks for the tips!

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

end of thread, other threads:[~2021-04-16 16:21 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 19:54 Implicit feedback on BOSS GT-1, the saga continues Mike Oliphant
2021-04-07 20:08 ` Geraldo Nascimento
2021-04-07 20:16   ` Mike Oliphant
2021-04-07 20:35     ` Geraldo Nascimento
2021-04-08  0:38       ` Mike Oliphant
2021-04-08  2:26         ` Geraldo Nascimento
2021-04-08  2:46           ` Mike Oliphant
2021-04-08  3:08             ` Lucas
2021-04-08  3:25               ` Lucas
     [not found]             ` <CAEsQvcsCJUi8eP_t8MGUKf0zSf7Zmqiof8b0fmk-XhZtUScbmg@mail.gmail.com>
2021-04-08  5:05               ` Geraldo Nascimento
2021-04-08  5:36                 ` Lucas
2021-04-08  6:14                   ` Geraldo Nascimento
2021-04-08  8:40                     ` Lucas
2021-04-08 15:56                   ` Mike Oliphant
2021-04-08 19:17                 ` Geraldo Nascimento
2021-04-08 19:42                   ` Mike Oliphant
2021-04-08 20:14                     ` Geraldo Nascimento
2021-04-08 20:31                       ` Lucas
2021-04-08 21:05                         ` Geraldo Nascimento
2021-04-08 21:21                           ` Lucas
2021-04-08 20:54                       ` Mike Oliphant
2021-04-08 21:24                         ` Geraldo Nascimento
2021-04-08 22:02                           ` Mike Oliphant
2021-04-09  1:04                             ` Geraldo Nascimento
2021-04-09  1:54                               ` Lucas
2021-04-09  2:40                                 ` Geraldo Nascimento
2021-04-09  3:56                                   ` Lucas
2021-04-09  4:27                                     ` Geraldo Nascimento
2021-04-09  4:55                                       ` Lucas
2021-04-09  6:02                                         ` Geraldo Nascimento
2021-04-09 16:47                                         ` Mike Oliphant
2021-04-09 19:08                                           ` Geraldo Nascimento
2021-04-09 19:09                                           ` Lucas
2021-04-11  7:25                                             ` Lucas
2021-04-11  7:46                                               ` Lucas
2021-04-11 19:46                                               ` Mike Oliphant
2021-04-11 21:11                                                 ` Lucas
2021-04-11 21:33                                               ` Geraldo Nascimento
2021-04-12  5:57                                                 ` Lucas
2021-04-12 23:24                                                   ` Geraldo Nascimento
2021-04-16  1:25                                                     ` Lucas
2021-04-16  1:28                                                       ` Lucas
2021-04-16  7:48                                                         ` Takashi Iwai
2021-04-16 16:19                                                           ` Lucas
2021-04-07 20:18   ` Lucas
2021-04-07 20:23     ` Lucas
2021-04-07 20:24     ` Mike Oliphant
2021-04-07 20:26       ` Mike Oliphant

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.