Skip to contentSkip to conversation

HID: Prodikeys PC-MIDI HID Driver

PATCH In review Don Prince 2 participants 2 messages May 9, 2010 – May 10, 2010 HID

lore
Share & tools
lore

Don Prince

author
#0 lore raw

PATCH v2 1/1 HID: Prodikeys PC-MIDI HID Driver

A specialised HID driver for the Creative Prodikeys PC-MIDI USB Keyboard.

The Prodikeys PC-MIDI is a multifunction keyboard comprising a qwerty

keyboard, multimedia keys and a touch sensitive musical keyboard.

The specialised HID driver adds full support for the musical keyboard

and extra multimedia keys which are not currently handled by the default

HID driver.

The specialised HID driver interfaces with Alsa, and presents the midi

keyboard as a Rawmidi device. Sustain duration, octave shifting and the

midi output channel can be read/written form userspace via sysfs.

---

Applied fixes to original patch submission suggested by Clemens Ladisch.

The keyboard can be viewed here

http://www.prodikeys.com/products/Prodikeys_PC-MIDI/

The driver (older version) and a simple wxWidgets based UI application is available (in

tar.gz format) at the Sourceforge project page

http://sourceforge.net/projects/pc-midi-linux/

Apply patch with

patch -p1 < <path to the driver patch>

---

Documentation/ABI/testing/sysfs-driver-hid-prodikeys +29 -0
diff -X /opt/scripts/diff-exclude.txt -Npaur a/Documentation/ABI/testing/sysfs-driver-hid-prodikeys b/Documentation/ABI/testing/sysfs-driver-hid-prodikeys
@@ -0,0 +1,29 @@
+What:		/sys/bus/hid/drivers/prodikeys/.../channel
+Date:		April 2010
+KernelVersion:	2.6.34
+Contact:	Don Prince <[email protected]>
+Description:
+		Allows control (via software) the midi channel to which
+		that the pc-midi keyboard will output.midi data.
+		Range: 0..15
+		Type:  Read/write
+What:		/sys/bus/hid/drivers/prodikeys/.../sustain
+Date:		April 2010
+KernelVersion:	2.6.34
+Contact:	Don Prince <[email protected]>
+Description:
+		Allows control (via software) the sustain duration of a
+		note held by the pc-midi driver.
+		0 means sustain mode is disabled.
+		Range: 0..5000 (milliseconds)
+		Type:  Read/write
+What:		/sys/bus/hid/drivers/prodikeys/.../octave
+Date:		April 2010
+KernelVersion:	2.6.34
+Contact:	Don Prince <[email protected]>
+Description:
+		Controls the octave shift modifier in the pc-midi driver.
+		The octave can be shifted via software up/down 2 octaves.
+		0 means the no ocatve shift.
+		Range: -2..2 (minus 2 to plus 2)
+		Type: Read/Write
drivers/hid/hid-core.c +1 -0
diff -X /opt/scripts/diff-exclude.txt -Npaur a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
@@ -1297,6 +1297,7 @@ static const struct hid_device_id hid_bl
 	{ HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3) },
drivers/hid/hid-ids.h +3 -0
diff -X /opt/scripts/diff-exclude.txt -Npaur a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
@@ -147,6 +147,9 @@
 #define USB_DEVICE_ID_CODEMERCS_IOW_FIRST	0x1500
 #define USB_DEVICE_ID_CODEMERCS_IOW_LAST	0x15ff
 
+#define USB_VENDOR_ID_CREATIVELABS	0x041e
+#define USB_DEVICE_ID_PRODIKEYS_PCMIDI	0x2801
+
 #define USB_VENDOR_ID_CYGNAL		0x10c4
 #define USB_DEVICE_ID_CYGNAL_RADIO_SI470X	0x818a
 
drivers/hid/hid-prodikeys.c +910 -0

910 lines not on this page · raw message

drivers/hid/Kconfig +16 -0
diff -X /opt/scripts/diff-exclude.txt -Npaur a/drivers/hid/Kconfig b/drivers/hid/Kconfig
@@ -100,6 +100,22 @@ config HID_CHICONY
 	---help---
 	Support for Chicony Tactical pad.
 
+config HID_PRODIKEYS
+	tristate "Prodikeys PC-MIDI Keyboard support" if EMBEDDED
+	depends on USB_HID && SND
+	select SND_RAWMIDI
+	default !EMBEDDED
+	---help---
+	Support for Prodikeys PC-MIDI Keyboard device support.
+	Say Y here to enable support for this device.
+	- Prodikeys PC-MIDI keyboard.
+	  The Prodikeys PC-MIDI acts as a USB Audio device, with one MIDI
+	  input and one MIDI output. These MIDI jacks appear as
+	  a sound "card" in the ALSA sound system.
+	  Note: if you say N here, this device will still function as a basic
+	  multimedia keyboard, but will lack support for the musical keyboard
+	  and some additional multimedia keys.
+
 config HID_CYPRESS
 	tristate "Cypress" if EMBEDDED
 	depends on USB_HID
drivers/hid/Makefile +1 -0
diff -X /opt/scripts/diff-exclude.txt -Npaur a/drivers/hid/Makefile b/drivers/hid/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_HID_MONTEREY)	+= hid-monter
 obj-$(CONFIG_HID_MOSART)	+= hid-mosart.o
 obj-$(CONFIG_HID_NTRIG)		+= hid-ntrig.o
 obj-$(CONFIG_HID_ORTEK)		+= hid-ortek.o
+obj-$(CONFIG_HID_PRODIKEYS)	+= hid-prodikeys.o
 obj-$(CONFIG_HID_QUANTA)	+= hid-quanta.o
 obj-$(CONFIG_HID_PANTHERLORD)	+= hid-pl.o
 obj-$(CONFIG_HID_PETALYNX)	+= hid-petalynx.o

___________________________________________________________
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html

Acked-by on v2 1/1
#1 lore raw
Quoted 10 lines · Don Prince

A specialised HID driver for the Creative Prodikeys PC-MIDI USB Keyboard.

The Prodikeys PC-MIDI is a multifunction keyboard comprising a qwerty

keyboard, multimedia keys and a touch sensitive musical keyboard.

The specialised HID driver adds full support for the musical keyboard

and extra multimedia keys which are not currently handled by the default

Quoted 7 lines

HID driver.

The specialised HID driver interfaces with Alsa, and presents the midi

keyboard as a Rawmidi device. Sustain duration, octave shifting and the

midi output channel can be read/written form userspace via sysfs.

Thunderbird does this when it reads the text from another mail (neither directly typed in nor pasted from the clipboard); the patch itself is fine.

Quoted 1 line

for the ALSA parts:

You should send the patch not only to the list but also to the HID maintainer.

Regards,
Clemens