From b18b493f27bfb0d112a54ef24a1db32e898abff9 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 21 Nov 2007 16:45:23 +0100 Subject: [ALSA] caiaq - misc input handling fixes - link input device with its parent so that it placed in proper spot in sysfs hierarchy - drivers that allow changing their keymaps should use private copy of the keymap so that one instance of a device does not affect another instance - it is preferred for drivers to properly set up input_dev->phys to help userspace locate devices - drivers should use usb_to_input_id(), or perform endianess conversion, themselves, otherwise ID is not correct on big-endian boxes - whitespace and formatting cleanup Acked-by: Daniel Mack Signed-off-by: Dmitry Torokhov Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/usb/caiaq/caiaq-device.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sound/usb/caiaq/caiaq-device.h') diff --git a/sound/usb/caiaq/caiaq-device.h b/sound/usb/caiaq/caiaq-device.h index 79bc5be2df7..685761279f1 100644 --- a/sound/usb/caiaq/caiaq-device.h +++ b/sound/usb/caiaq/caiaq-device.h @@ -7,7 +7,7 @@ #define USB_PID_RIGKONTROL2 0x1969 #define USB_PID_RIGKONTROL3 0x1940 -#define USB_PID_KORECONTROLLER 0x4711 +#define USB_PID_KORECONTROLLER 0x4711 #define USB_PID_AK1 0x0815 #define USB_PID_AUDIO8DJ 0x1978 @@ -62,7 +62,7 @@ struct snd_usb_caiaqdev { struct urb **data_urbs_in; struct urb **data_urbs_out; struct snd_usb_caiaq_cb_info *data_cb_info; - + unsigned char ep1_in_buf[EP1_BUFSIZE]; unsigned char ep1_out_buf[EP1_BUFSIZE]; unsigned char midi_out_buf[EP1_BUFSIZE]; @@ -72,7 +72,7 @@ struct snd_usb_caiaqdev { wait_queue_head_t ep1_wait_queue; wait_queue_head_t prepare_wait_queue; int spec_received, audio_parm_answer; - + char vendor_name[CAIAQ_USB_STR_LEN]; char product_name[CAIAQ_USB_STR_LEN]; char serial[CAIAQ_USB_STR_LEN]; @@ -93,8 +93,10 @@ struct snd_usb_caiaqdev { /* Linux input */ #ifdef CONFIG_SND_USB_CAIAQ_INPUT struct input_dev *input_dev; + char phys[64]; /* physical device path */ + unsigned short keycode[10]; #endif - + /* ALSA */ struct snd_pcm *pcm; struct snd_pcm_hardware pcm_info; -- cgit v1.2.3