There is no reason for this. The midi functions are used by drivers
on-demand anyway. Use SYSINIT(9) instead to do the appropriate
(de-)initilizations.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential D54125
sound: Stop building midi as a module Authored by christos on Mon, Dec 8, 2:38 PM. Tags None Referenced Files
Subscribers
Details
There is no reason for this. The midi functions are used by drivers Sponsored by: The FreeBSD Foundation
Diff Detail
Event TimelineComment Actions They will be reported by the driver or sound(4). This here functions essentially like pcm/sndstat.c, we just offer some functions to the drivers, this is not supposed to be a separate module, at least at this state. Comment Actions I don't think it is a good idea to not build this as a module because this code will not be used by a large majority of hosts (although personally I'll appreciate to use MIDI on FreeBSD!). Loading and unloading soundcard modules is convenient. Furthermore, using OSS modules requires to build "sound" as a module only, so why not doing the same for MIDI? Comment Actions Are you saying that the EBUSY case in midi_sysuninit() can't happen? If so, it should be an assertion, if not then the change looks wrong since we are leaking objects in midi_devs. Comment Actions I eventually remove this in D54126, I just didn't want to make this a single patch because D54126 includes other changes which are not really related to this one. Not building it as a module does not mean it will now be used more. In fact, it is right now now that this code is "used" without reason, because it gets automatically loaded with sound(4). Whereas, with this change, it will be executed only by the devices that support MIDI. Comment Actions Ok, please consider though that patches should be self-contained. This patch introduces a bug and the next one fixes it. It would be better to just combine them. Comment Actions I know, the only reason was that I didn't want to create one big patch that does a bunch of things unrelated to each other. That being said, I can update the patch to handle the EBUSY case, do you think an assertion would be desirable here? Comment Actions I don't think it's worth the effort, presumably you plan to commit everything together? Mine was more of a general comment. |