MIDI driver for Behringer BCD2000 USB device
PATCH v8 1/1 MIDI driver for Behringer BCD2000 USB device
This patch adds initial support for the Behringer BCD2000 USB DJ controller. At the moment, only the MIDI part of the device is working, i.e. knobs, buttons and LEDs.
I also plan to add support for the audio part, but I assume that this will require more effort than the rather simple MIDI interface. Progress can be tracked at https://github.com/anyc/snd-usb-bcd2000.
Daniel or Clemens: could I get another ACK on this? Thank you both!
Best regards,
Mario
Changes since v7:
- replaced snd_card_create with snd_card_new
Changes since v6:
- applied more style improvements
Changes since v5:
- use kernel bitmap functions for devices_used
Changes since v4:
- devices_used as array to support arbitrary number of SNDRV_CARDS
- removed unused array "enable"
Changes since v3:
- applied style and snd_printk changes as suggested by Daniel Mack
Changes since v2:
- applied more changes from Daniel Mack and Clemens Ladisch
Changes since v1:
- fixed the various code style issues, thanks to Daniel Mack and checkpatch.pl.
--- sound/usb/Kconfig | 13 ++ sound/usb/Makefile | 2 +- sound/usb/bcd2000/Makefile | 3 + sound/usb/bcd2000/bcd2000.c | 477 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 494 insertions(+), 1 deletion(-) create mode 100644 sound/usb/bcd2000/Makefile create mode 100644 sound/usb/bcd2000/bcd2000.c
sound/usb/Kconfig +13 -0
@@ -147,5 +147,18 @@ config SND_USB_HIFACE To compile this driver as a module, choose M here: the module will be called snd-usb-hiface. +config SND_BCD2000 + tristate "Behringer BCD2000 MIDI driver" + select SND_RAWMIDI + help + Say Y here to include MIDI support for the Behringer BCD2000 DJ + controller. + + Audio support is still work-in-progress at + https://github.com/anyc/snd-usb-bcd2000 + + To compile this driver as a module, choose M here: the module + will be called snd-bcd2000. + endif # SND_USB
sound/usb/Makefile +1 -1
@@ -23,4 +23,4 @@ obj-$(CONFIG_SND_USB_UA101) += snd-usbmidi-lib.o obj-$(CONFIG_SND_USB_USX2Y) += snd-usbmidi-lib.o obj-$(CONFIG_SND_USB_US122L) += snd-usbmidi-lib.o -obj-$(CONFIG_SND) += misc/ usx2y/ caiaq/ 6fire/ hiface/ +obj-$(CONFIG_SND) += misc/ usx2y/ caiaq/ 6fire/ hiface/ bcd2000/
sound/usb/bcd2000/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +snd-bcd2000-y := bcd2000.o + +obj-$(CONFIG_SND_BCD2000) += snd-bcd2000.o
sound/usb/bcd2000/bcd2000.c new file +477 -0
477 lines not on this page · raw message
Signature · 1 line
1.8.3.2
Hi,
the only things I spotted are style nits ...
Quoted 7 lines · Mario Kicherer
This patch adds initial support for the Behringer BCD2000 USB DJ controller. At the moment, only the MIDI part of the device is working, i.e. knobs, buttons and LEDs.
I also plan to add support for the audio part, but I assume that this will require more effort than the rather simple MIDI interface. Progress can be tracked at https://github.com/anyc/snd-usb-bcd2000.
Text such as the lines starting here ...
Quoted 22 lines
Daniel or Clemens: could I get another ACK on this? Thank you both!
Best regards,
MarioChanges since v7:
- replacedsnd_card_createwithsnd_card_newChanges since v6:
- applied more style improvementsChanges since v5:
- use kernel bitmap functions fordevices_usedChanges since v4:
-devices_usedas array to support arbitrary number ofSNDRV_CARDS
- removed unused array "enable"Changes since v3:
- applied style andsnd_printkchanges as suggested by Daniel Mack
Quoted 6 lines
Changes since v2:
- applied more changes from Daniel Mack and Clemens LadischChanges since v1:
- fixed the various code style issues, thanks to Daniel Mack and checkpatch.pl.
... to here should go ...
Quoted 2 lines
Signed-off-by Mario Kicherer <[email protected]>---
... here. IOW, Everything that is not supposed to become part of the actual commit log message eventually has to be put underneath "---".
sound/usb/bcd2000/bcd2000.c line 454
Quoted 6 lines
sound/usb/bcd2000/bcd2000.c new file +6
-0+static struct usb_driver bcd2000_driver = { + .name ="snd-bcd2000" , + .probe = bcd2000_probe, + .disconnect = bcd2000_disconnect, + .id_table = id_table, +};
Something's wrong with the indent here.
Quoted 7 lines
sound/usb/bcd2000/bcd2000.c new file +7
-0+static int __init bcd2000_init (void ) +{ +int retval =0 ; + + retval =usb_register (&bcd2000_driver); +if (retval) +pr_info (PREFIX "usb_register failed. Error: %d" , retval);
sound/usb/bcd2000/bcd2000.c line 472
Quoted 10 lines
sound/usb/bcd2000/bcd2000.c new file +10
-0+return retval; +} + +static void __exit bcd2000_exit(void) +{ +usb_deregister (&bcd2000_driver); +} + +module_init (bcd2000_init); +module_exit (bcd2000_exit);
You can replace all that with the module_usb_driver() helper function. See include/linux/usb.h.
Other than that, it looks fine to me.
Thanks,
Daniel