Great initiative !
I'm back after upgrading my laptop to a brand new 12th gen Intel laptop from http://frame.work.
I also upgraded my system to Linux Mint 21.1.
Since the latest Intels may be not be fully supported by 5.15 and 5.19 kernels and because the motu patch was made for 6.0.3, i upgraded to the oem kernel line, version 6.1.
The system is brand new, a good place to start a tutorial about patching and building the snd-usb-audio module !
Here we go !
Install the linux-oem kernel :
Reboot.
Install stuff :
Code: Select all
sudo apt install linux-source libssl-dev libelf-dev gcc-12
Download the kernel source in /usr/src :
Code: Select all
cd /usr/src
sudo apt-get source linux-image-unsigned-$(uname -r)
cd linux-oem-6.1-6.1.0/
Clean and prepare. If the final module building fails because you miss some dependency, redo this before trying again :
Code: Select all
sudo make mrproper &&
sudo make olddefconfig &&
sudo make prepare &&
sudo make scripts
Move :
Patch the module (manually, because the 6.0.3 patch won't work on 6.1 endpoint.c) :
see the patched card.h and endpoint.c attached.
(NOTE : the function that is patched in endpoint.c (snd_usb_queue_pending_output_urbs) is not strictly identical to the one in the patch.
Patch looks for
Code: Select all
snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep, int err, i;
While 6.1 endpoint.c reads
Code: Select all
snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep, bool in_stream_lock)
I don't know how and if it will have consequences on your system's behaviour.)
Let's build the module now :
Code: Select all
sudo cp /usr/src/linux-headers-$(uname -r)/Module.symvers .
sudo make -C /lib/modules/`uname -r`/build M=$PWD
Backup of the current module :
Code: Select all
cd /usr/lib/modules/$(uname -r)/kernel/sound/usb
sudo mv snd-usb-audio.ko snd-usb-audio.ko.bkp
Unplug any usb audio device.
Move the new module :
Code: Select all
sudo cp /usr/src/linux-oem-6.1-6.1.0/sound/usb/snd-usb-audio.ko .
Launch tail :
Then plug back the usb audio interface and check the module is loaded (should print "MOTU Patch")