Unable to connect usb midi keyboard

NVIDIA Jetson-AGX
 L4T 32.7.4 [ JetPack UNKNOWN ]
   Ubuntu 18.04.6 LTS
   Kernel Version: 4.9.337-tegra

(1) Update Below

Original:

  1. midi keyboard attaches to snd-usb-audio driver via USB, can see it with lsusb -t. Don’t think that’s the right driver, no ALSA tools can see it (ALSA tools don’t work at first) and no software is properly taking in it’s input.

  2. all ALSA midi tools require a /dev/snd/seq, which isn’t present, they all fail with error.

  3. I download kernel, build kernel, build modules for CONFIG_SND_SEQUENCER, had to edit source because one function in a file (sound/core/seq/seq_ports.c) was defined twice, so I removed one copy. make && make prepare_modules modules install install_modules without error.

  4. Doesn’t seem to install correctly, had to manually set some links and stuff. uname -r never changed to 4.9.337+, as new files and folders were named by Makefile. Separate issue but would love to get into it

  5. Worked in that /dev/snd/seq now exists and lsmod shows some ...seq_midi stuff but keyboard still not recognized as input by ALSA utilities.

Any solutions? Should I just upgrade entire setup?

Update 1:

  1. So make install here is broken, some copying Image manually solved the issue of properly updating the uname -r response. Also updated the device tree binaries.
  2. USB Audio/MIDI is working and cat /dev/snd/midiC2D0 shows it’s responding to keyboard input. BUT…
  3. Most applications look for ALSA dev/snd/seq interface, not the one that’s working. Enabling it as a module, or as compiled in, and/disabling USB Audio/MIDI in any combination doesn’t work. Even when dev/snd/seq appears, my piano apps that try to access it freeze, aconnect -i doesn’t see the keyboard, etc

I’m guessing you are not downloading the kernel from NVIDIA. You should download sources from the NVIDIA URL for your L4T release (R32.7.4):
https://developer.nvidia.com/linux-tegra

The reason I say this is the “+”.

If you use the NVIDIA sources, then this should not happen. However, here is some information on removing that “+”:

Don't set CONFIG_LOCALVERSION_AUTO, it should be "n".
Also, from kernel root: "touch .scmversion".
Make sure scripts/setlocalversion function "scm_version()" has forced "**return**":
scm_version()
{
        local short
        short=false
        **return**

Note that a kernel reports the answer to “uname -r”. The prefix is the kernel source, and normally the output is something like “3.9.337-tegra”, whereby the CONFIG_LOCAVERSION is the “-tegra” suffix. When you get the “+” in this, that is the scmversion, and NVIDIA does not enable this.

Be careful to use the exact same kernel release as the default in R32.7.4. Don’t use mainline.

Incidentally, modules install to:
/lib/modules/$(uname -r)/kernel

Yeah so, definitely used sources sync, Nvidia kernel. That module wouldn’t even compile without some editing. Will try again with kernel 5.x as I have and post back.

The source_sync.sh may not actually download the same thing as the package of sources in the L4T URL. It should, but I don’t think it does.

I’ll keep that in mind and do a diff when I get around to this

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.