At Mon, 2 Feb 2015 22:56:31 -0800, Cyrus Harmon wrote:
Dear Takashi,
Sorry for the delay in getting back to this. Your instructions seem close, but I've run into the following issues:
- the module is installed in /lib/modules/`uname -r`/extra instead of
kernel/sound/usb
- I can get around that with:
sudo insmod /lib/modules/`uname -r`/extra/snd-usbmidi-lib.ko sudo insmod /lib/modules/`uname -r`/extra/snd-usb-audio.ko
but there's probably a better way.
modprobe will load from extra directory before others automatically.
- I can't do the same tricks with snd-pcm as I get the following error:
sly@madbox:/lib/modules/3.19.0-rc7-local$ sudo modprobe -r snd-pcm modprobe: FATAL: Module snd_pcm is in use.
Is there a way to disable snd_pcm and reload the module?
Unload the module referring to snd-pcm, in your case, snd-usb-audio at first.
Takashi
Barring that, I at least want to be able to install the new snd_pcm and reboot, without having to rebuild the whole kernel, so solving problem 1 would presumably help for that.
Thanks for your help!
Cyrus
On 11/06/2014 08:49 AM, Takashi Iwai wrote:
At Thu, 06 Nov 2014 08:05:43 -0800 Cyrus Harmon wrote:
On a somewhat related note, is there a way to apply changes to things in, say, sound/usb and compile/install those changes without a few kernel rebuild/install? Or, even better, without a reboot? Would certainly shorting the debug cycle time for me. In this case I'm interested in finding out what quirk->type is when it gets to snd_usb_create_quirk as it looks like the function in the quirk_funcs table that gets called here produces the first suspect error. Adding a dev_info, followed by a kernel rebuild, reinstall, reboot (and the fact that my broken nvidia drivers require reinstalling the video driver every time I install a new kernel) makes for a tedious process!
It's a standard procedure, something like... % mkdir /somewhere % cd /somewhere % cp -a /there/linux/sound . % patch -p1 < your-usb.patch % make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb % su # make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb modules_install # modprobe -r snd-usb-audio # modprobe snd-usb-audio Takashi