Line6 toneport kb37 + zynthian

try to put this in the end of /etc/rc.local:

echo “0e41 4144” | sudo tee /sys/bus/usb/drivers/snd_usb_toneport/new_id

what’s the ouptut of aplay -l and arecord -l ?

how can i do this?

nano /etc/rc.local
Ctrl O to save
Ctrl X to exit

it doesn’t work. it wants
echo “0e41 4144” | sudo tee /sys/bus/usb/drivers/snd_usb_toneport/new_id
after every boot

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: GuitarPort [GuitarPort], device 0: GuitarPort [GuitarPort]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@zynthian://zynthian# arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: GuitarPort [GuitarPort], device 0: GuitarPort [GuitarPort]
Subdevices: 1/1
Subdevice #0: subdevice #0

Damn. For now I’m stuck. :thinking:
Edit: It could work if keyboard is plugged in at boot.

When modules are loaded, you can configure your audio device for Zynthian. In webconf, under Hardware → Audio, choose generic USB, and check advanced view.
In the jackd options change:

hw:0
to
hw:GuitarPort

The device is plugged in at boot!

I’m writing at the end: after ‘exit 0’
right?

audio works, midi no!

amidi -l
Dir Device Name

after boot and
after
echo “0e41 4144” | sudo tee /sys/bus/usb/drivers/snd_usb_toneport/new_id

dmesg -w
when kb37 is plugged out:

[ 159.037029] usb 1-1.3: USB disconnect, device number 4
[ 159.037127] snd_usb_toneport 1-1.3:1.0: URB in #2 submission failed (-19)
[ 159.041371] usb 1-1.3: send failed (error -19)
[ 159.041496] usb 1-1.3: send failed (error -19)
[ 159.041606] snd_usb_toneport 1-1.3:1.0: Line 6 GuitarPort now disconnected

when its’ plugged in:
[ 194.158186] usb 1-1.3: new full-speed USB device number 7 using dwc_otg
[ 194.382279] usb 1-1.3: New USB device found, idVendor=0e41, idProduct=4143, bcdDevice= 0.01
[ 194.382294] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 194.382301] usb 1-1.3: Product: TonePort KB37
[ 194.382307] usb 1-1.3: Manufacturer: Line 6
[ 194.384447] snd_usb_toneport 1-1.3:1.0: Line 6 GuitarPort found
[ 194.416934] snd_usb_toneport 1-1.3:1.0: Line 6 GuitarPort now attached
[ 194.417151] snd_usb_toneport 1-1.3:1.1: Line 6 GuitarPort found
[ 194.417162] usb 1-1.3: selecting invalid altsetting 2
[ 194.417169] snd_usb_toneport 1-1.3:1.1: set_interface failed
[ 194.417186] snd_usb_toneport 1-1.3:1.1: Line 6 GuitarPort now disconnected
[ 194.417220] snd_usb_toneport: probe of 1-1.3:1.1 failed with error -22

That won’t work. exit 0 exits the script so nothing after that will be run.

The reason that you need to echo “0e41 4144” | sudo tee /sys/bus/usb/drivers/snd_usb_toneport/new_id is because the toneport driver does not recognise the KB37 device. If audio is working fine after you get it working then you could report to the driver maintainer that this device works and they may add it to the supported aliases within the driver to avoid the need for the echo... step.

Looking at the toneport linux driver source code I see it only supports 44100 sample rate so avoid trying to use at another rate.

The attempt to load altsetting fails on the second node in the tree probably because it does not behave like it should according to the toneport linux driver, i.e. the driver does not fully support the KB37 device.

Regarding MIDI, there doesn’t seem to be support for MIDI in the toneport linux driver. Only the audio capability is listed for each device supported by this driver. You may be able to get this working by doing something similar with the core line6 linux driver (I don’t know - you will have to try). Try this:

  • Boot the Raspberrry Pi
  • echo “0e41 4144” | sudo tee /sys/bus/usb/drivers/snd_usb_line6t/new_id
  • modprobe snd-usb-line6 (maybe this isn’t required)
  • aplay -l
  • amidi -l
  • dmesg

I am not an expert in kernel modules (although have done quite a bit of work with them over they years). Let us know what results you get from this.

there’s no snd_usb_line6 in

ls /sys/bus/usb/drivers/
brcmfmac hub lan78xx smsc95xx snd_usb_toneport usb usbfs usbhid usb-storage

Okay - sounds like your device is not supported by the driver and that you can get it partially working with the work-around you have found, i.e. telling the driver to bind to the device and try to work.

ok. so that kb37 is totally useful, if i can’t use its keyboard

c