Boss RC-300 loopstation (no audio)

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

neilnardlenoo
Established Member
Posts: 20
Joined: Mon Jul 10, 2017 7:31 pm

Re: Boss RC-300 loopstation (no audio)

Post by neilnardlenoo »

hello,

Great minds - rather coincidentally, I decided to try monitoring USB traffic myself on the BR-80, so it's interesting to see this here too.
I know it's not the same hardware, nor the same approach (Linux vs Windows drivers suggested, below, where I'm just linux) but, given dormirj is busy and if they're any use, anyone's welcome to look at my usb monitoring files from a non-working Linux kernel (self compiled with some quirk changes) at https://uploadfiles.io/zmih4 and from a working linux kernel at https://ufile.io/u5rm0

There is a clear difference from the size alone and some odd things in the content but given I've never sniffed USB traffic before I'm still trying to work out what I'm looking at, before getting to the stage of figuring what's wrong.

For reference, the captures (using tshark -i usbmon1) span a few lines of initialisation, then a switch on of the device, a few seconds of playing a wav file using aplay, then switching the device off again.

N.
dormirj
Established Member
Posts: 59
Joined: Thu Jul 20, 2017 9:13 am

Re: Boss RC-300 loopstation (no audio)

Post by dormirj »

glad to see more data popping up, i currently have a running win7 set up with working rc300, but it seems usbpcap which is supposed to be able to monitor usb packets on windows doesnt give me anything. i can see the devices being there and hubs in which they are, but when i want to monitor one it doesnt give me anything... so sadly i still have no pristine data from the original driver, but i will look for a solution...
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: Boss RC-300 loopstation (no audio)

Post by Drumfix »

That BR-80's descriptor claims to use implicit feedback handling, but in fact it doesn't.

Can you try the following:

in <kernel root>/sound/usb/pcm.c

Code: Select all

static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
Comment out the following lines:

Code: Select all

	err = set_sync_endpoint(subs, fmt, dev, alts, altsd);
	if (err < 0)
		return err;
dormirj
Established Member
Posts: 59
Joined: Thu Jul 20, 2017 9:13 am

Re: Boss RC-300 loopstation (no audio)

Post by dormirj »

dont know why usbpcap lets me down, but it doesnt want to capture any packets currently. i've tried with a commercial tool called usblyzer, here's a lsusb-type output and a capture of plugging the device in and playing some sound, i dont think the proprietary format of this tool (.usl) can be read by anything, but there is the possibility to export to html (beware the capture html is 9mb, so it takes a while to load in your average browser...)

http://www48.zippyshare.com/v/odsstPsT/file.html
http://www8.zippyshare.com/v/rSFmB94H/file.html

sadly i dont think the html export has all the information on all the urb's and requests and whatnot, but at least it's a start.
neilnardlenoo
Established Member
Posts: 20
Joined: Mon Jul 10, 2017 7:31 pm

Re: Boss RC-300 loopstation (no audio)

Post by neilnardlenoo »

Drumfix.

Well, colour me impressed, with a side-order of grateful - that seems to work! I've had playback through aplay and I've had jack connected and recorded/played back through Ardour!

I'm probably going to remove all the experimental kernels I've built up, download the latest kernel source and try again from scratch, just to make sure this isn't just me somehow loading the wrong thing by mistake!

I'd love to know what you saw/didn't see in the capture and what led you to pcm.c file - I'm still trawling through and not seeing the wood for the trees!

For reference I just commented out that function call - I didn't do anything with quirks on this occasion. Does success just mean that function needs tweaking or is commenting it out entirely the way to go, do you think?

Thanks again
N.
dormirj
Established Member
Posts: 59
Joined: Thu Jul 20, 2017 9:13 am

Re: Boss RC-300 loopstation (no audio)

Post by dormirj »

Drumfix wrote:That BR-80's descriptor claims to use implicit feedback handling, but in fact it doesn't.

Can you try the following:

in <kernel root>/sound/usb/pcm.c

Code: Select all

static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
Comment out the following lines:

Code: Select all

	err = set_sync_endpoint(subs, fmt, dev, alts, altsd);
	if (err < 0)
		return err;
I have an important announcement to make. this^ actually made my rc-300 also be able to play sounds _and_ be able to start with jack! completely clean kernel 4.8.1, only commenting out this error catch and it actually works, even have pulseaudio still running and it doesnt throw those endpoint errors which i assume are those exact errors that these 3 lines are supposed to get? i still dont have level controls in the software, but that isnt too bad since the levels can still be tweaked on the hardware itself, but i guess i can maybe get them with the softvol and asoundrc. so, also a grand thanks from me! and i'm as curious as neil here as to his questions, which would also be mine.

greetings;
dormir--
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: Boss RC-300 loopstation (no audio)

Post by Drumfix »

Actually a patch should be put into pcm.c

Code: Select all

 static int set_sync_ep_implicit_fb_quirk 
There, like with the M-Audio devices, in the switch statement a case should be added that simply returns 0 when the device is the BR80 or RC300.
I only used set_format, because it's easier to comment something out than to add something at the right place. :mrgreen:

Code: Select all

case USB_ID(x0582, 0x0130): /* Micro BR-80 */
case USB_ID(x0582, 0x0138): /* RC-300 */
     return 0;
So, how i found out:

Devices, that use implicit feedback, usually use a different endpoint (usually an isochronous IN endpoint) to signal to the OUT endpoint how many bytes it expects in the next transfer. The full details can be read in the USB specification, section Synchronization.

The function chain set_sync_endpoint() -> set_sync_ep_implicit_fb_quirk() -> search_roland_implicit_fb() results in the IN endpoint of the next interface to be assigned as implicit feedback endpoint, and that is what one would actually expect to work.

As the captured USB data showed, in the working case, no isochronous IN URBs are sent to the device, instead only isochronous OUT URBs are used.
So while the descriptors indicated to the driver to use implicit feedback, the device actually doesn't use it.
In the non-working case, the drivers sends the isochronous IN URBs, but they are filled by the device with zero length only.

The patch just prevents the driver to assign the IN endpoint as implicit feedback endpoint.
neilnardlenoo
Established Member
Posts: 20
Joined: Mon Jul 10, 2017 7:31 pm

Re: Boss RC-300 loopstation (no audio)

Post by neilnardlenoo »

Drumfix,

Interesting. I won't pretend to fully understand - I'll have to get a bit more familiar with the USB spec and have a few more reads of the code - but I'm getting there so thanks for the explanation.

For reference, given that I know the change worked with a full kernel compilation, I then spent a bit of time getting to grips with compiling just the module, then when that worked, I uncommented the set_format and added the cases to the switch and compiled again and that works a treat too so now I've got a modern, compiled kernel I can fall back too if needed but better still, a way to create a new module when the 'real' kernel updates.
Hopefully dormir continues to have similar successes.

If I get the chance I might dig deeper into that search_roland_implicit_fb and the call to it.

Thanks again! By way of appreciation, I promise never to subject you to any of the recordings I make through the BR80 - that would be one sure way to make you regret the effort you put in :D



Neil
dormirj
Established Member
Posts: 59
Joined: Thu Jul 20, 2017 9:13 am

Re: Boss RC-300 loopstation (no audio)

Post by dormirj »

thanks for the intel... so now i not only have my sweet hardware working - i also got to learn a bit about usb endpoints. thanks again drumfix for the writeup. is it a generic assumption for usb descriptors to think they're able to use implicit feedback? also maybe we can get this to enter the alsa mainline at some point in the future of the kernel, does anyone have experience with that?

greetings;;
dormir
agoode
Established Member
Posts: 6
Joined: Sun Oct 08, 2017 6:01 pm

Re: Boss RC-300 loopstation (no audio)

Post by agoode »

This looks the same as the problems I am having with the Roland D-05 synthesizer.

Is there any plan to get the patches upstream?
Adam Goode
dormirj
Established Member
Posts: 59
Joined: Thu Jul 20, 2017 9:13 am

Re: Boss RC-300 loopstation (no audio)

Post by dormirj »

agoode wrote:Is there any plan to get the patches upstream?
not yet. to be honest, i have no idea how to accomplish that, maybe someone with a bit of experience on that here?

what exactly are the issues with your d-05 in detail?

greetings;;
ohli
Established Member
Posts: 9
Joined: Tue Jan 02, 2018 12:40 pm

Re: Boss RC-300 loopstation (no audio)

Post by ohli »

To keep the thread alive...

Just wanted to say that the same approach works for the BOSS GT-1!!

According to Drumfix's patches, I changed the USB ID in sound/usb/pcm.c to be skipped like this:

Code: Select all

...
case USB_ID(0x0582, 0x01d6):
	return 0;
...
THANKS! Now it works with input and output up to 192kHz

System: Arch Linux x64, Kernel 4.14.10

So...If this goes on like this with more Roland devices, there would be good reasons to patch this upstream. I'll ask the Linux-Alsa Maintainer (Clemens Ladisch) about this.
Ardour + Arch = <3

My band: https://crimsonrain.de/
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: Boss RC-300 loopstation (no audio)

Post by Drumfix »

UAAAH! No, this patch just a hack that hides the real problem. It is not a solution that should go upstream.
ohli
Established Member
Posts: 9
Joined: Tue Jan 02, 2018 12:40 pm

Re: Boss RC-300 loopstation (no audio)

Post by ohli »

Ok, sorry, Would have been too easy...

As much as I would like to come around with a proper patch (getting into the kernel source without going crazy :shock: and testing on several devices), there must be a reason for this "false" behaviour, especially the add_sync quirk for all devices with the Roland VENDOR_ID...

In other words: what would be the best way to report our (better: your) findings to someone who is capable of fixing this?

I can't imagine that someone posesses all three devices mentioned, so the information collected here is still useful.
I have some friends who are quite into kernel stuff, I'll ask them for help...

PS: related: https://sourceforge.net/p/alsa/mailman/ ... /33262217/
Ardour + Arch = <3

My band: https://crimsonrain.de/
singforme
Established Member
Posts: 127
Joined: Sat Dec 31, 2016 1:58 pm
Contact:

Re: Boss RC-300 loopstation (no audio)

Post by singforme »

Hi all, well even if this is just a half-decent workaround solution: Is there a way to make this permanent in my installation? Also: Why does the device work on older kernels (3.something?)
Thanks for any insights!
Post Reply