hid-prodikeys.c (48a732dfaa77a4dfec803aa8f248373998704f76) | hid-prodikeys.c (d881427253da011495f4193663d809d0e9dfa215) |
---|---|
1/* 2 * HID driver for the Prodikeys PC-MIDI Keyboard 3 * providing midi & extra multimedia keys functionality 4 * 5 * Copyright (c) 2009 Don Prince <dhprince.devel@yahoo.co.uk> 6 * 7 * Controls for Octave Shift Up/Down, Channel, and 8 * Sustain Duration available via sysfs. --- 12 unchanged lines hidden (view full) --- 21#include <linux/device.h> 22#include <linux/module.h> 23#include <linux/usb.h> 24#include <linux/mutex.h> 25#include <linux/hid.h> 26#include <sound/core.h> 27#include <sound/initval.h> 28#include <sound/rawmidi.h> | 1/* 2 * HID driver for the Prodikeys PC-MIDI Keyboard 3 * providing midi & extra multimedia keys functionality 4 * 5 * Copyright (c) 2009 Don Prince <dhprince.devel@yahoo.co.uk> 6 * 7 * Controls for Octave Shift Up/Down, Channel, and 8 * Sustain Duration available via sysfs. --- 12 unchanged lines hidden (view full) --- 21#include <linux/device.h> 22#include <linux/module.h> 23#include <linux/usb.h> 24#include <linux/mutex.h> 25#include <linux/hid.h> 26#include <sound/core.h> 27#include <sound/initval.h> 28#include <sound/rawmidi.h> |
29#include "usbhid/usbhid.h" | |
30#include "hid-ids.h" 31 32 33#define pk_debug(format, arg...) \ 34 pr_debug("hid-prodikeys: " format "\n" , ## arg) 35#define pk_error(format, arg...) \ 36 pr_err("hid-prodikeys: " format "\n" , ## arg) 37 --- 263 unchanged lines hidden (view full) --- 301 302static void pcmidi_submit_output_report(struct pcmidi_snd *pm, int state) 303{ 304 struct hid_device *hdev = pm->pk->hdev; 305 struct hid_report *report = pm->pcmidi_report6; 306 report->field[0]->value[0] = 0x01; 307 report->field[0]->value[1] = state; 308 | 29#include "hid-ids.h" 30 31 32#define pk_debug(format, arg...) \ 33 pr_debug("hid-prodikeys: " format "\n" , ## arg) 34#define pk_error(format, arg...) \ 35 pr_err("hid-prodikeys: " format "\n" , ## arg) 36 --- 263 unchanged lines hidden (view full) --- 300 301static void pcmidi_submit_output_report(struct pcmidi_snd *pm, int state) 302{ 303 struct hid_device *hdev = pm->pk->hdev; 304 struct hid_report *report = pm->pcmidi_report6; 305 report->field[0]->value[0] = 0x01; 306 report->field[0]->value[1] = state; 307 |
309 usbhid_submit_report(hdev, report, USB_DIR_OUT); | 308 hid_hw_request(hdev, report, HID_REQ_SET_REPORT); |
310} 311 312static int pcmidi_handle_report1(struct pcmidi_snd *pm, u8 *data) 313{ 314 u32 bit_mask; 315 316 bit_mask = data[1]; 317 bit_mask = (bit_mask << 8) | data[2]; --- 577 unchanged lines hidden --- | 309} 310 311static int pcmidi_handle_report1(struct pcmidi_snd *pm, u8 *data) 312{ 313 u32 bit_mask; 314 315 bit_mask = data[1]; 316 bit_mask = (bit_mask << 8) | data[2]; --- 577 unchanged lines hidden --- |