All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fixing most Roland-related devices' USB audio
@ 2021-03-31  2:20 Lucas
  2021-03-31 16:50 ` Geraldo
  0 siblings, 1 reply; 7+ messages in thread
From: Lucas @ 2021-03-31  2:20 UTC (permalink / raw)
  To: alsa-devel

At the risk of being redundant, I'm resending this with a simpler "[PATCH]"
subject to reach a broader audience, since no comment has been made yet:

TLDR?  Please just glance at the patch at the end and include it in the
kernel. :)

Some days ago, I found this excellent informational post, and that Mike
Oliphant's patch is in mainline now:
http://blog.nostatic.org/2020/01/getting-boss-gt-1-effects-processor-to.html

Since I was fairly certain it applies to the Roland devices I own, I added
my USB IDs.  Wonderfully, now USB audio capture seems to be working
perfectly from the three devices I can test: the Boutique D-05, INTEGRA-7,
& R-26! (The previously asserted VG-99 didn't need to be included in the
patch for it to work.)

I've also tested all three for playback capability, since that's implied
when a device is using implicit feedback, which I hadn't realized the first
time around.  Anyway, they all seem to be working as expected for playback
too.  There are two caveats for playback, though:

1. The INTEGRA-7 won't output playback in any mode other than its "44.1
[kHz]" setting, though capture works with all of its Sample Rate
possibilities.  I think this is imposed by the hardware itself, and hence
isn't a glitch.

2. The D-05's analog outputs aren't as clean as the other two devices, with
little quiet occasional clicks sounding something like dust on an LP
record's play.  Possibly that can be due to it having only 1/8" mini-jack
connections, but I suspect something more driver-related as It's not
noticed during use as a synthesizer.  Its firmware version is "1.02(1033),"
so not up-to-date which may mean it's just the hardware itself, but I've
decided not to risk any changes with it yet.  If I knew I could revert it,
that would be another story.  Also its USB captures, play perfectly &
cleanly on my usual sound device, the Edirol UA-4FX.

You may know this, as the detection of these devices shows partial
compatibility with the existing kernel, but here are the commands I've had
to use for their sample formats:

Boutique D-05:
    arecord -D hw:Boutique -f S32_LE -c 2 -r 96000 ./file.wav
    aplay -D hw:Boutique -f S32_LE -c 2 -r 96000 ./file.wav
INTEGRA-7:
    arecord -D hw:INTEGRA7 -f S32_LE -c 2 -r 96000 ./file.wav
        (Then change MENU->SYSTEM->SOUND->Sampling Rate to 44.1 [kHz],
otherwise its 96[kHz],
         and  change MENU->SYSTEM->SOUND->Ext Part Source Select to USB
AUDIO)
    arecord -D hw:INTEGRA7 -f S32_LE -c 2 -r 44100 ./file-44100.wav
    aplay -D hw:INTEGRA7 -f S32_LE -c 2 -r 44100 ./file-44100.wav
R-26:
        (Through its built-in controls, first configure the MENU->AUDIO I/F
SETUP->SAMPLE RATE to "96.0 kHz.")
    arecord -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./file.wav
    aplay -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./file.wav
        (Then via use of similar commands, & the "AUDIO I/F" tab on its
main screen having both "LOOP BACK" & "DIRECT MONITOR" enabled, I was able
to begin a new composite recording, voicing-over what I'd recorded earlier,
by playing it back while interjecting - very fun!)



The behavior on the vanilla kernel (whether or not "pasuspender -- cat" is
running concurrently) follows.
For each of these commands, dmesg is bombarded with lines like "[
4681.162863] usb 2-1.2: Unable to change format on ep #8e: already in use"

Boutique D-05:
    arecord -D hw:Boutique -f S32_LE -r 96000 -c 2 ./file.wav
    Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000
Hz, Stereo
        (After a brief timeout, it says this & ends:)
    arecord: pcm_read:2153: read error: Input/output error

    aplay -D hw:Boutique -f S32_LE -r 96000 -c 2 ./valid-file.wav
    Playing WAVE './valid-file.wav' : Signed 32 bit Little Endian, Rate
96000 Hz, Stereo
        (After a brief timeout, it says this & ends:)
    aplay: pcm_write:2061: write error: Input/output error

INTEGRA-7:
    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
        (After a brief timeout, it says this & ends:)
    arecord: pcm_read:2153: read error: Input/output error
        (Then change MENU->SYSTEM->SOUND->Sampling Rate to 44.1 [kHz],
otherwise its 96[kHz],
         and  change MENU->SYSTEM->SOUND->Ext Part Source Select to USB
AUDIO)
    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
        (After a brief timeout, it says this & ends:)
    arecord: pcm_read:2153: read error: Input/output error

    aplay -D hw:INTEGRA7 -f S32_LE -r 44100 -c 2 ./valid-file.wav
    Playing WAVE './valid-file.wav' : Signed 32 bit Little Endian, Rate
44100 Hz, Stereo
        (After a brief timeout, it says this & ends:)
    aplay: pcm_write:2061: write error: Input/output error

R-26:
    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
        (After a brief timeout, it says this & ends:)
    arecord: pcm_read:2153: read error: Input/output error

    aplay -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./valid-file.wav
    Playing WAVE './valid-file.wav' : Signed 32 bit Little Endian, Rate
96000 Hz, Stereo
        (After a brief timeout, it says this & ends:)
    aplay: pcm_write:2061: write error: Input/output error



I searched a bit for other Roland-related devices people have had USB
digital audio issues with over the years, and took the liberty of adding
them to the patch too.  Likely there are still more that people haven't
tried or, at least, queried about issues.

I hope this can be added to the mainline kernel, as this support should
help many that have struggled.  I, certainly, have been hoping somebody
would figure this out for quite a while, and even bought a USB
through/monitoring device to try to develop it myself (sadly, the software
supporting that has its own bugs, so I probably should've just used
wireshark).  Suffice it to say, I'm quite happy to have this figured out
without having had to delve into USB debugging stuff I lack experience
with! :)

Thanks for any comments or looking into adding this,

  Lucas Endres



The patch follows (I removed my previous VG-99 additions since it already
works):
diff -Nurp linux-5.11.9.orig/sound/usb/implicit.c
linux-5.11.9.roland/sound/usb/implicit.c
--- linux-5.11.9.orig/sound/usb/implicit.c 2021-03-24 05:54:19.000000000
-0500
+++ linux-5.11.9.roland/sound/usb/implicit.c 2021-03-30 17:49:08.143196280
-0500
@@ -71,27 +71,87 @@ 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, 0x00a6), /* Roland JUNO-G */
+ 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, 0x00c7), /* Roland V-Synth GT */
+ 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, 0x00f8), /* Roland JUNO Series */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0111), /* Roland GAIA SH-01 */
+ 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, 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, 0x0171),   /* BOSS RC-505 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0132), /* Roland TRI-CAPTURE */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x0138), /* BOSS RC-300 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x013e), /* Roland R-26 */
+ 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, 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, 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, 0x01e5), /* BOSS GT-001 */
- IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
+ IMPLICIT_FB_SKIP_DEV(0x0582, 0x01ff), /* Roland 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, 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, 0x00c7, 0x0d, 0x01), /* Roland V-Synth GT */
+ 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, 0x00f8, 0x0d, 0x01), /* Roland JUNO Series
*/
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x0111, 0x0d, 0x01), /* Roland GAIA SH-01 */
+ 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, 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, 0x0138, 0x0d, 0x01), /* BOSS RC-300 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x013e, 0x0d, 0x01), /* Roland R-26 */
+ 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, 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, 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, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
+ IMPLICIT_FB_FIXED_DEV(0x0582, 0x01ff, 0x0d, 0x01), /* Roland D-05 */
  IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */

  {} /* terminator */

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

* Re: [PATCH] Fixing most Roland-related devices' USB audio
  2021-03-31  2:20 [PATCH] Fixing most Roland-related devices' USB audio Lucas
@ 2021-03-31 16:50 ` Geraldo
  2021-03-31 17:49   ` Lucas
  0 siblings, 1 reply; 7+ messages in thread
From: Geraldo @ 2021-03-31 16:50 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel

Lucas, you can always email the maintainers if you're 100% sure this patch
will work for everybody etc., just be sure to read
/usr/src/linux/MAINTAINERS first.

Em Ter, 30 de mar de 2021 23:21, Lucas <jaffa225man@gmail.com> escreveu:

> At the risk of being redundant, I'm resending this with a simpler "[PATCH]"
> subject to reach a broader audience, since no comment has been made yet:
>
> TLDR?  Please just glance at the patch at the end and include it in the
> kernel. :)
>
> Some days ago, I found this excellent informational post, and that Mike
> Oliphant's patch is in mainline now:
>
> http://blog.nostatic.org/2020/01/getting-boss-gt-1-effects-processor-to.html
>
> Since I was fairly certain it applies to the Roland devices I own, I added
> my USB IDs.  Wonderfully, now USB audio capture seems to be working
> perfectly from the three devices I can test: the Boutique D-05, INTEGRA-7,
> & R-26! (The previously asserted VG-99 didn't need to be included in the
> patch for it to work.)
>
> I've also tested all three for playback capability, since that's implied
> when a device is using implicit feedback, which I hadn't realized the first
> time around.  Anyway, they all seem to be working as expected for playback
> too.  There are two caveats for playback, though:
>
> 1. The INTEGRA-7 won't output playback in any mode other than its "44.1
> [kHz]" setting, though capture works with all of its Sample Rate
> possibilities.  I think this is imposed by the hardware itself, and hence
> isn't a glitch.
>
> 2. The D-05's analog outputs aren't as clean as the other two devices, with
> little quiet occasional clicks sounding something like dust on an LP
> record's play.  Possibly that can be due to it having only 1/8" mini-jack
> connections, but I suspect something more driver-related as It's not
> noticed during use as a synthesizer.  Its firmware version is "1.02(1033),"
> so not up-to-date which may mean it's just the hardware itself, but I've
> decided not to risk any changes with it yet.  If I knew I could revert it,
> that would be another story.  Also its USB captures, play perfectly &
> cleanly on my usual sound device, the Edirol UA-4FX.
>
> You may know this, as the detection of these devices shows partial
> compatibility with the existing kernel, but here are the commands I've had
> to use for their sample formats:
>
> Boutique D-05:
>     arecord -D hw:Boutique -f S32_LE -c 2 -r 96000 ./file.wav
>     aplay -D hw:Boutique -f S32_LE -c 2 -r 96000 ./file.wav
> INTEGRA-7:
>     arecord -D hw:INTEGRA7 -f S32_LE -c 2 -r 96000 ./file.wav
>         (Then change MENU->SYSTEM->SOUND->Sampling Rate to 44.1 [kHz],
> otherwise its 96[kHz],
>          and  change MENU->SYSTEM->SOUND->Ext Part Source Select to USB
> AUDIO)
>     arecord -D hw:INTEGRA7 -f S32_LE -c 2 -r 44100 ./file-44100.wav
>     aplay -D hw:INTEGRA7 -f S32_LE -c 2 -r 44100 ./file-44100.wav
> R-26:
>         (Through its built-in controls, first configure the MENU->AUDIO I/F
> SETUP->SAMPLE RATE to "96.0 kHz.")
>     arecord -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./file.wav
>     aplay -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./file.wav
>         (Then via use of similar commands, & the "AUDIO I/F" tab on its
> main screen having both "LOOP BACK" & "DIRECT MONITOR" enabled, I was able
> to begin a new composite recording, voicing-over what I'd recorded earlier,
> by playing it back while interjecting - very fun!)
>
>
>
> The behavior on the vanilla kernel (whether or not "pasuspender -- cat" is
> running concurrently) follows.
> For each of these commands, dmesg is bombarded with lines like "[
> 4681.162863] usb 2-1.2: Unable to change format on ep #8e: already in use"
>
> Boutique D-05:
>     arecord -D hw:Boutique -f S32_LE -r 96000 -c 2 ./file.wav
>     Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 96000
> Hz, Stereo
>         (After a brief timeout, it says this & ends:)
>     arecord: pcm_read:2153: read error: Input/output error
>
>     aplay -D hw:Boutique -f S32_LE -r 96000 -c 2 ./valid-file.wav
>     Playing WAVE './valid-file.wav' : Signed 32 bit Little Endian, Rate
> 96000 Hz, Stereo
>         (After a brief timeout, it says this & ends:)
>     aplay: pcm_write:2061: write error: Input/output error
>
> INTEGRA-7:
>     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
>         (After a brief timeout, it says this & ends:)
>     arecord: pcm_read:2153: read error: Input/output error
>         (Then change MENU->SYSTEM->SOUND->Sampling Rate to 44.1 [kHz],
> otherwise its 96[kHz],
>          and  change MENU->SYSTEM->SOUND->Ext Part Source Select to USB
> AUDIO)
>     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
>         (After a brief timeout, it says this & ends:)
>     arecord: pcm_read:2153: read error: Input/output error
>
>     aplay -D hw:INTEGRA7 -f S32_LE -r 44100 -c 2 ./valid-file.wav
>     Playing WAVE './valid-file.wav' : Signed 32 bit Little Endian, Rate
> 44100 Hz, Stereo
>         (After a brief timeout, it says this & ends:)
>     aplay: pcm_write:2061: write error: Input/output error
>
> R-26:
>     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
>         (After a brief timeout, it says this & ends:)
>     arecord: pcm_read:2153: read error: Input/output error
>
>     aplay -D hw:R26AUDIO -f S32_LE -r 96000 -c 2 ./valid-file.wav
>     Playing WAVE './valid-file.wav' : Signed 32 bit Little Endian, Rate
> 96000 Hz, Stereo
>         (After a brief timeout, it says this & ends:)
>     aplay: pcm_write:2061: write error: Input/output error
>
>
>
> I searched a bit for other Roland-related devices people have had USB
> digital audio issues with over the years, and took the liberty of adding
> them to the patch too.  Likely there are still more that people haven't
> tried or, at least, queried about issues.
>
> I hope this can be added to the mainline kernel, as this support should
> help many that have struggled.  I, certainly, have been hoping somebody
> would figure this out for quite a while, and even bought a USB
> through/monitoring device to try to develop it myself (sadly, the software
> supporting that has its own bugs, so I probably should've just used
> wireshark).  Suffice it to say, I'm quite happy to have this figured out
> without having had to delve into USB debugging stuff I lack experience
> with! :)
>
> Thanks for any comments or looking into adding this,
>
>   Lucas Endres
>
>
>
> The patch follows (I removed my previous VG-99 additions since it already
> works):
> diff -Nurp linux-5.11.9.orig/sound/usb/implicit.c
> linux-5.11.9.roland/sound/usb/implicit.c
> --- linux-5.11.9.orig/sound/usb/implicit.c 2021-03-24 05:54:19.000000000
> -0500
> +++ linux-5.11.9.roland/sound/usb/implicit.c 2021-03-30 17:49:08.143196280
> -0500
> @@ -71,27 +71,87 @@ 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, 0x00a6), /* Roland JUNO-G */
> + 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, 0x00c7), /* Roland V-Synth GT */
> + 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, 0x00f8), /* Roland JUNO Series */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0111), /* Roland GAIA SH-01 */
> + 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, 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, 0x0171),   /* BOSS RC-505 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0132), /* Roland TRI-CAPTURE */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x0138), /* BOSS RC-300 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x013e), /* Roland R-26 */
> + 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, 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, 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, 0x01e5), /* BOSS GT-001 */
> - IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203),   /* BOSS AD-10 */
> + IMPLICIT_FB_SKIP_DEV(0x0582, 0x01ff), /* Roland 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, 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, 0x00c7, 0x0d, 0x01), /* Roland V-Synth GT
> */
> + 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, 0x00f8, 0x0d, 0x01), /* Roland JUNO Series
> */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x0111, 0x0d, 0x01), /* Roland GAIA SH-01
> */
> + 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, 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, 0x0138, 0x0d, 0x01), /* BOSS RC-300 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x013e, 0x0d, 0x01), /* Roland R-26 */
> + 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, 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, 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, 0x01e5, 0x0d, 0x01), /* BOSS GT-001 */
> + IMPLICIT_FB_FIXED_DEV(0x0582, 0x01ff, 0x0d, 0x01), /* Roland D-05 */
>   IMPLICIT_FB_FIXED_DEV(0x0582, 0x0203, 0x0d, 0x01), /* BOSS AD-10 */
>
>   {} /* terminator */
>

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

* Re: [PATCH] Fixing most Roland-related devices' USB audio
  2021-03-31 16:50 ` Geraldo
@ 2021-03-31 17:49   ` Lucas
  2021-03-31 20:58     ` Geraldo
  0 siblings, 1 reply; 7+ messages in thread
From: Lucas @ 2021-03-31 17:49 UTC (permalink / raw)
  To: Geraldo; +Cc: alsa-devel

Thanks Geraldo, I'll consider that.  I am fairly certain that this patch
won't make matters worse for anyone, because applying it to the VG-99
(which apparently doesn't need it), proved that it works fine with or
without the patch.  Then, again, there may be similar code for the VG-99
always in use, specific to just it.  I could try it with my UA-4FX to see
if it continues working...  Thanks for the pointers!

On Wed, Mar 31, 2021 at 11:45 AM Geraldo <geraldogabriel@gmail.com> wrote:

> Lucas, you can always email the maintainers if you're 100% sure this patch
> will work for everybody etc., just be sure to read
> /usr/src/linux/MAINTAINERS first.
>

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

* Re: [PATCH] Fixing most Roland-related devices' USB audio
  2021-03-31 17:49   ` Lucas
@ 2021-03-31 20:58     ` Geraldo
  2021-04-01  2:19       ` Lucas
  0 siblings, 1 reply; 7+ messages in thread
From: Geraldo @ 2021-03-31 20:58 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel

OK, as for styling and standards your code LGTM but I'm not the Maintainers
:-) and they may be hesitant to add code for untested devices.

I found myself in a similar situation to you. I was hesitant to join
alsa-devel because of the volume but I thought I may give it a try, maybe
there will be testers for my patch there.

But nope, no beta-testers here. We might have to try other open forums
other than alsa-devel

Em Qua, 31 de mar de 2021 14:49, Lucas <jaffa225man@gmail.com> escreveu:

> Thanks Geraldo, I'll consider that.  I am fairly certain that this patch
> won't make matters worse for anyone, because applying it to the VG-99
> (which apparently doesn't need it), proved that it works fine with or
> without the patch.  Then, again, there may be similar code for the VG-99
> always in use, specific to just it.  I could try it with my UA-4FX to see
> if it continues working...  Thanks for the pointers!
>
> On Wed, Mar 31, 2021 at 11:45 AM Geraldo <geraldogabriel@gmail.com> wrote:
>
>> Lucas, you can always email the maintainers if you're 100% sure this
>> patch will work for everybody etc., just be sure to read
>> /usr/src/linux/MAINTAINERS first.
>>
>

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

* Re: [PATCH] Fixing most Roland-related devices' USB audio
  2021-03-31 20:58     ` Geraldo
@ 2021-04-01  2:19       ` Lucas
  2021-04-01 15:59         ` Geraldo
  0 siblings, 1 reply; 7+ messages in thread
From: Lucas @ 2021-04-01  2:19 UTC (permalink / raw)
  To: Geraldo; +Cc: alsa-devel

Thanks for the encouragement and wisdom.  I hope your additions, and mine,
work out in the end.  A real hurdle with tasking everyone with patching for
their devices, aside from having probably long since given up hope for use
of the device on GNU/Linux, is the amount of disparate forums they voiced
their issues on.  There's also the daunting likelihood that select few
music creators actually would decide to compile their own kernels to see if
a problem is fixed, let alone feel comfortable enough applying a patch.

I hadn't realized this was a list to drum up testers, or that every change
needs to be tested fully.  I thought it was a direct path to possible
acceptance for inclusion in the kernel, if reasonable doubts are considered.

I hope they'll let me sidestep that huge, unreasonable, undertaking, as my
test implicit feedback "fix" for the UA-4FX (which doesn't need it) proved
it still functions as perfectly as without it.  That should mean that for
the devices that don't require this patch, but which had been accidentally
added, no harm is done.  I can't really see myself as owner of all these
devices someday... ;)

Thanks again, Geraldo!,

  Lucas Endres

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

* Re: [PATCH] Fixing most Roland-related devices' USB audio
  2021-04-01  2:19       ` Lucas
@ 2021-04-01 15:59         ` Geraldo
  2021-04-01 19:50           ` Lucas
  0 siblings, 1 reply; 7+ messages in thread
From: Geraldo @ 2021-04-01 15:59 UTC (permalink / raw)
  To: Lucas; +Cc: alsa-devel

Em Qua, 31 de mar de 2021 23:19, Lucas <jaffa225man@gmail.com> escreveu:

> Thanks for the encouragement and wisdom.  I hope your additions, and mine,
> work out in the end.
>

They will!

A real hurdle with tasking everyone with patching for their devices, aside
> from having probably long since given up hope for use of the device on
> GNU/Linux, is the amount of disparate forums they voiced their issues on.
> There's also the daunting likelihood that select few music creators
> actually would decide to compile their own kernels to see if a problem is
> fixed, let alone feel comfortable enough applying a patch.
>

Recompiling kernels with custom patches and workarounds for regular devices
is madness. This should be needed only for development purposes.


> I hadn't realized this was a list to drum up testers, or that every change
> needs to be tested fully.  I thought it was a direct path to possible
> acceptance for inclusion in the kernel, if reasonable doubts are considered.
>

Well the Linux kernel has to be somewhat orderly even if the open source
development model is inherently chaotic.

This should be a list with lots of testers but I'll bet the volume scares
them off.


> I hope they'll let me sidestep that huge, unreasonable, undertaking, as my
> test implicit feedback "fix" for the UA-4FX (which doesn't need it) proved
> it still functions as perfectly as without it.
>

I disagree a bit with you. It's not very wise to add unneeded quirks.

That should mean that for the devices that don't require this patch, but
> which had been accidentally added, no harm is done.  I can't really see
> myself as owner of all these devices someday... ;)
>
> Thanks again, Geraldo!,
>
>   Lucas Endres
>

Thank you,
Geraldo Nascimento

>

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

* Re: [PATCH] Fixing most Roland-related devices' USB audio
  2021-04-01 15:59         ` Geraldo
@ 2021-04-01 19:50           ` Lucas
  0 siblings, 0 replies; 7+ messages in thread
From: Lucas @ 2021-04-01 19:50 UTC (permalink / raw)
  To: Geraldo; +Cc: alsa-devel

On Thu, Apr 1, 2021 at 10:55 AM Geraldo <geraldogabriel@gmail.com> wrote:

> Em Qua, 31 de mar de 2021 23:19, Lucas <jaffa225man@gmail.com> escreveu:
>
>> Thanks for the encouragement and wisdom.  I hope your additions, and
>> mine, work out in the end.
>>
>
> They will!
>
> A real hurdle with tasking everyone with patching for their devices, aside
>> from having probably long since given up hope for use of the device on
>> GNU/Linux, is the amount of disparate forums they voiced their issues on.
>> There's also the daunting likelihood that select few music creators
>> actually would decide to compile their own kernels to see if a problem is
>> fixed, let alone feel comfortable enough applying a patch.
>>
>
> Recompiling kernels with custom patches and workarounds for regular
> devices is madness. This should be needed only for development purposes.
>

True, but it's much less of a burden on a source-based distro.  I used to
use mainly Sourcemage GNU/Linux, which made changes pretty painless.  With
debian it's still doable, though I think building the packages takes more
time.  On Sourcemage, updating the whole system after a glibc upgrade takes
even more patience.


>
>> I hadn't realized this was a list to drum up testers, or that every
>> change needs to be tested fully.  I thought it was a direct path to
>> possible acceptance for inclusion in the kernel, if reasonable doubts are
>> considered.
>>
>
> Well the Linux kernel has to be somewhat orderly even if the open source
> development model is inherently chaotic.
>
> This should be a list with lots of testers but I'll bet the volume scares
> them off.
>

Yeah, the sheer amount relegated my thread to oblivion pretty fast.


>
>> I hope they'll let me sidestep that huge, unreasonable, undertaking, as
>> my test implicit feedback "fix" for the UA-4FX (which doesn't need it)
>> proved it still functions as perfectly as without it.
>>
>
> I disagree a bit with you. It's not very wise to add unneeded quirks.
>

In this case the quirks to me seem to be Roland/Edirol/Boss devices that
don't need this method, but yes your point is well taken.


> That should mean that for the devices that don't require this patch, but
>> which had been accidentally added, no harm is done.  I can't really see
>> myself as owner of all these devices someday... ;)
>>
>> Thanks again, Geraldo!,
>>
>>   Lucas Endres
>>
>
> Thank you,
> Geraldo Nascimento
>
>>
Thanks again!

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

end of thread, other threads:[~2021-04-01 19:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31  2:20 [PATCH] Fixing most Roland-related devices' USB audio Lucas
2021-03-31 16:50 ` Geraldo
2021-03-31 17:49   ` Lucas
2021-03-31 20:58     ` Geraldo
2021-04-01  2:19       ` Lucas
2021-04-01 15:59         ` Geraldo
2021-04-01 19:50           ` Lucas

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.