Skip to contentSkip to conversation

usb: misc: Add driver for ALVA Nanoface

PATCH In review Lauri Niskanen 2 participants 4 messages Nov 11, 2014 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: misc: Add driver for ALVA Nanoface

ALVA Nanoface is a USB audio interface device that only works after receiving an initialization command. This driver does not handle any actual audio features, but only initializes the device enabling its audio I/O and physical controls. There are some additional USB audio features on the device that are currently not supported. The support for these features may be added later.

---
 drivers/usb/misc/Kconfig    |  9 +++++
 drivers/usb/misc/Makefile   |  1 +
 drivers/usb/misc/nanoface.c | 95 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 105 insertions(+)
 create mode 100644 drivers/usb/misc/nanoface.c
drivers/usb/misc/Kconfig +9 -0
index 76d7720..d01d5c0 100644
@@ -249,6 +249,15 @@ config USB_HSIC_USB3503
        help
          This option enables support for SMSC USB3503 HSIC to USB 2.0 Driver.
 
+config USB_NANOFACE
+	tristate "ALVA Nanoface USB driver"
+	help
+	  Say Y here if you need ALVA Nanoface device support. ALVA
+	  Nanoface is a USB audio interface device. See
+	  <http://www.alva-audio.de/nanoface/> for further information.
+	  This driver does not support USB audio features, but enables basic
+	  audio I/O connections and physical controls.
+
 config USB_LINK_LAYER_TEST
 	tristate "USB Link Layer Test driver"
 	help
drivers/usb/misc/Makefile +1 -0
index 65b0402..2ee5b73 100644
@@ -25,6 +25,7 @@ obj-$(CONFIG_USB_USS720)		+= uss720.o
 obj-$(CONFIG_USB_SEVSEG)		+= usbsevseg.o
 obj-$(CONFIG_USB_YUREX)			+= yurex.o
 obj-$(CONFIG_USB_HSIC_USB3503)		+= usb3503.o
+obj-$(CONFIG_USB_NANOFACE)		+= nanoface.o
 
 obj-$(CONFIG_USB_SISUSBVGA)		+= sisusbvga/
 obj-$(CONFIG_USB_LINK_LAYER_TEST)	+= lvstest.o
drivers/usb/misc/nanoface.c new file +95 -0

95 lines not on this page · raw message

Signature · 1 line
2.1.3
#1 lore raw
Quoted 7 lines · Lauri Niskanen

ALVA Nanoface is a USB audio interface device that only works after receiving an initialization command. This driver does not handle any actual audio features, but only initializes the device enabling its audio I/O and physical controls. There are some additional USB audio features on the device that are currently not supported. The support for these features may be added later.

Quoted 7 lines
---
 drivers/usb/misc/Kconfig    |  9 +++++
 drivers/usb/misc/Makefile   |  1 +
 drivers/usb/misc/nanoface.c | 95 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 105 insertions(+)
 create mode 100644 drivers/usb/misc/nanoface.c

Any reason this can't be a simple userspace program that writes the needed command to the device using libusb instead of being a kernel driver? This seems like overkill for a kernel driver to me.

thanks,

greg k-h

#2 lore raw
Quoted 3 lines · Greg Kroah-Hartman

Any reason this can't be a simple userspace program that writes the needed command to the device using libusb instead of being a kernel driver? This seems like overkill for a kernel driver to me.

You are probably right. It indeed should be possible to do this in userspace. I thought that having a kernel driver would still be benefical since it adds plug-and-play availability for all Linux users without having to deal with userspace driver programs.

You are far more experienced with these things than me, so I am happy to let you make the decision about whether to have a kernel driver or not.

Signature · 1 line
Lauri Niskanen
#3 lore raw
Quoted 9 lines · Lauri Niskanen
Quoted 3 lines · Greg Kroah-Hartman

Any reason this can't be a simple userspace program that writes the needed command to the device using libusb instead of being a kernel driver? This seems like overkill for a kernel driver to me.

You are probably right. It indeed should be possible to do this in userspace. I thought that having a kernel driver would still be benefical since it adds plug-and-play availability for all Linux users without having to deal with userspace driver programs.

You can do that by just providing a package that adds a udev rule to run your program when the device is seen.

Yes, it's not as "easy" as being in the main kernel tree, but we do like to keep things out of the kernel that don't have to be in the kernel. We removed a number of drivers like this about 10 years go for that very reaason.

Quoted 2 lines

You are far more experienced with these things than me, so I am happy to let you make the decision about whether to have a kernel driver or not.

I think a userspace program would be best.

sorry,

greg k-h